Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
446 changes: 223 additions & 223 deletions hw/xbox/nv2a/pgraph/gl/blit.c → hw/xbox/nv2a/pgraph/blit.c

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion hw/xbox/nv2a/pgraph/gl/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
specific_ss.add([sdl, gloffscreen, files(
'blit.c',
'debug.c',
'display.c',
'draw.c',
Expand Down
4 changes: 3 additions & 1 deletion hw/xbox/nv2a/pgraph/gl/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "hw/xbox/nv2a/pgraph/pgraph.h"
#include "debug.h"
#include "renderer.h"
#include "hw/xbox/nv2a/pgraph/surface.h"

GloContext *g_nv2a_context_render;
GloContext *g_nv2a_context_display;
Expand Down Expand Up @@ -196,14 +197,15 @@ static PGRAPHRenderer pgraph_gl_renderer = {
.flip_stall = pgraph_gl_flip_stall,
.flush_draw = pgraph_gl_flush_draw,
.get_report = pgraph_gl_get_report,
.image_blit = pgraph_gl_image_blit,
.pre_savevm_trigger = pgraph_gl_pre_savevm_trigger,
.pre_savevm_wait = pgraph_gl_pre_savevm_wait,
.pre_shutdown_trigger = pgraph_gl_pre_shutdown_trigger,
.pre_shutdown_wait = pgraph_gl_pre_shutdown_wait,
.process_pending = pgraph_gl_process_pending,
.process_pending_reports = pgraph_gl_process_pending_reports,
.surface_update = pgraph_gl_surface_update,
.surface_get = pgraph_gl_surface_get,
.surface_download_if_dirty = pgraph_gl_surface_download_if_dirty,
.set_surface_scale_factor = pgraph_gl_set_surface_scale_factor,
.get_surface_scale_factor = pgraph_gl_get_surface_scale_factor,
.get_framebuffer_surface = pgraph_gl_get_framebuffer_surface,
Expand Down
1 change: 0 additions & 1 deletion hw/xbox/nv2a/pgraph/gl/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ void pgraph_gl_draw_begin(NV2AState *d);
void pgraph_gl_draw_end(NV2AState *d);
void pgraph_gl_flush_draw(NV2AState *d);
void pgraph_gl_get_report(NV2AState *d, uint32_t parameter);
void pgraph_gl_image_blit(NV2AState *d);
void pgraph_gl_mark_textures_possibly_dirty(NV2AState *d, hwaddr addr, hwaddr size);
void pgraph_gl_process_pending_reports(NV2AState *d);
void pgraph_gl_surface_flush(NV2AState *d);
Expand Down
1 change: 1 addition & 0 deletions hw/xbox/nv2a/pgraph/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
specific_ss.add(files(
'blit.c',
'pgraph.c',
'profile.c',
'rdi.c',
Expand Down
2 changes: 1 addition & 1 deletion hw/xbox/nv2a/pgraph/pgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ int pgraph_method(NV2AState *d, unsigned int subchannel,
image_blit->height = parameter >> 16;

if (image_blit->width && image_blit->height) {
d->pgraph.renderer->ops.image_blit(d);
pgraph_common_image_blit(d);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should've pointed it out before, but "common" seems unnecessary if there are no renderer-spec. Maybe just "pgraph_image_blit"?

}
break;
default:
Expand Down
4 changes: 3 additions & 1 deletion hw/xbox/nv2a/pgraph/pgraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ typedef struct NV2AState NV2AState;
typedef struct PGRAPHNullState PGRAPHNullState;
typedef struct PGRAPHGLState PGRAPHGLState;
typedef struct PGRAPHVkState PGRAPHVkState;
typedef struct SurfaceBinding SurfaceBinding;

Comment thread
abaire marked this conversation as resolved.
typedef struct VertexAttribute {
bool dma_select;
Expand Down Expand Up @@ -119,7 +120,6 @@ typedef struct PGRAPHRenderer {
void (*flip_stall)(NV2AState *d);
void (*flush_draw)(NV2AState *d);
void (*get_report)(NV2AState *d, uint32_t parameter);
void (*image_blit)(NV2AState *d);
void (*pre_savevm_trigger)(NV2AState *d);
void (*pre_savevm_wait)(NV2AState *d);
void (*pre_shutdown_trigger)(NV2AState *d);
Expand All @@ -128,6 +128,8 @@ typedef struct PGRAPHRenderer {
void (*process_pending_reports)(NV2AState *d);
void (*surface_flush)(NV2AState *d);
void (*surface_update)(NV2AState *d, bool upload, bool color_write, bool zeta_write);
void *(*surface_get)(NV2AState *d, hwaddr addr);
void (*surface_download_if_dirty)(NV2AState *d, void *surface);
void (*set_surface_scale_factor)(NV2AState *d, unsigned int scale);
unsigned int (*get_surface_scale_factor)(NV2AState *d);
int (*get_framebuffer_surface)(NV2AState *d);
Expand Down
227 changes: 0 additions & 227 deletions hw/xbox/nv2a/pgraph/vk/blit.c

This file was deleted.

1 change: 0 additions & 1 deletion hw/xbox/nv2a/pgraph/vk/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ if vulkan.found()

specific_ss.add([sdl, volk, libglslang, vma, vulkan, spirv_reflect, gloffscreen,
files(
'blit.c',
'buffer.c',
'command.c',
'debug.c',
Expand Down
5 changes: 3 additions & 2 deletions hw/xbox/nv2a/pgraph/vk/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "hw/xbox/nv2a/nv2a_int.h"
#include "renderer.h"

#include "hw/xbox/nv2a/pgraph/surface.h"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already included (via nv2a_int.h, which includes pgraph.h, which includes surface.h)

#include "gloffscreen.h"

#if HAVE_EXTERNAL_MEMORY
Expand Down Expand Up @@ -218,14 +218,15 @@ static PGRAPHRenderer pgraph_vk_renderer = {
.flip_stall = pgraph_vk_flip_stall,
.flush_draw = pgraph_vk_flush_draw,
.get_report = pgraph_vk_get_report,
.image_blit = pgraph_vk_image_blit,
.pre_savevm_trigger = pgraph_vk_pre_savevm_trigger,
.pre_savevm_wait = pgraph_vk_pre_savevm_wait,
.pre_shutdown_trigger = pgraph_vk_pre_shutdown_trigger,
.pre_shutdown_wait = pgraph_vk_pre_shutdown_wait,
.process_pending = pgraph_vk_process_pending,
.process_pending_reports = pgraph_vk_process_pending_reports,
.surface_update = pgraph_vk_surface_update,
.surface_get = pgraph_vk_surface_get,
.surface_download_if_dirty = pgraph_vk_surface_download_if_dirty,
.set_surface_scale_factor = pgraph_vk_set_surface_scale_factor,
.get_surface_scale_factor = pgraph_vk_get_surface_scale_factor,
.get_framebuffer_surface = pgraph_vk_get_framebuffer_surface,
Expand Down
2 changes: 0 additions & 2 deletions hw/xbox/nv2a/pgraph/vk/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,6 @@ void pgraph_vk_ensure_not_in_render_pass(PGRAPHState *pg);
VkCommandBuffer pgraph_vk_begin_nondraw_commands(PGRAPHState *pg);
void pgraph_vk_end_nondraw_commands(PGRAPHState *pg, VkCommandBuffer cmd);

// blit.c
void pgraph_vk_image_blit(NV2AState *d);

// gpuprops.c
void pgraph_vk_determine_gpu_properties(NV2AState *d);
Expand Down
Loading