mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
rsx: Remove deprecated do_method path that has been superceded by c++ inheritance for many years
This commit is contained in:
parent
0b78404337
commit
8dfea032f2
@ -1100,7 +1100,7 @@ void GLGSRender::on_exit()
|
||||
|
||||
void GLGSRender::clear_surface(u32 arg)
|
||||
{
|
||||
if (skip_current_frame || !framebuffer_status_valid) return;
|
||||
if (skip_current_frame) return;
|
||||
|
||||
// If stencil write mask is disabled, remove clear_stencil bit
|
||||
if (!rsx::method_registers.stencil_mask()) arg &= ~0x2u;
|
||||
@ -1108,6 +1108,14 @@ void GLGSRender::clear_surface(u32 arg)
|
||||
// Ignore invalid clear flags
|
||||
if ((arg & 0xf3) == 0) return;
|
||||
|
||||
u8 ctx = rsx::framebuffer_creation_context::context_draw;
|
||||
if (arg & 0xF0) ctx |= rsx::framebuffer_creation_context::context_clear_color;
|
||||
if (arg & 0x3) ctx |= rsx::framebuffer_creation_context::context_clear_depth;
|
||||
|
||||
init_buffers((rsx::framebuffer_creation_context)ctx, true);
|
||||
|
||||
if (!framebuffer_status_valid) return;
|
||||
|
||||
GLbitfield mask = 0;
|
||||
|
||||
gl::command_context cmd{ gl_state };
|
||||
@ -1223,46 +1231,6 @@ void GLGSRender::clear_surface(u32 arg)
|
||||
glClear(mask);
|
||||
}
|
||||
|
||||
bool GLGSRender::do_method(u32 cmd, u32 arg)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
case NV4097_CLEAR_SURFACE:
|
||||
{
|
||||
if (arg & 0xF3)
|
||||
{
|
||||
//Only do all this if we have actual work to do
|
||||
u8 ctx = rsx::framebuffer_creation_context::context_draw;
|
||||
if (arg & 0xF0) ctx |= rsx::framebuffer_creation_context::context_clear_color;
|
||||
if (arg & 0x3) ctx |= rsx::framebuffer_creation_context::context_clear_depth;
|
||||
|
||||
init_buffers(rsx::framebuffer_creation_context{ctx}, true);
|
||||
clear_surface(arg);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
case NV4097_CLEAR_ZCULL_SURFACE:
|
||||
{
|
||||
// NOP
|
||||
// Clearing zcull memory does not modify depth/stencil buffers 'bound' to the zcull region
|
||||
return true;
|
||||
}
|
||||
case NV4097_TEXTURE_READ_SEMAPHORE_RELEASE:
|
||||
{
|
||||
// Texture barrier, seemingly not very useful
|
||||
return true;
|
||||
}
|
||||
case NV4097_BACK_END_WRITE_SEMAPHORE_RELEASE:
|
||||
{
|
||||
//flush_draw_buffers = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GLGSRender::load_program()
|
||||
{
|
||||
if (m_graphics_state & rsx::pipeline_state::invalidate_pipeline_bits)
|
||||
|
@ -137,7 +137,6 @@ private:
|
||||
gl::vertex_upload_info set_vertex_buffer();
|
||||
rsx::vertex_input_layout m_vertex_layout = {};
|
||||
|
||||
void clear_surface(u32 arg);
|
||||
void init_buffers(rsx::framebuffer_creation_context context, bool skip_reading = false);
|
||||
|
||||
bool load_program();
|
||||
@ -162,12 +161,12 @@ public:
|
||||
void discard_occlusion_query(rsx::reports::occlusion_query_info* query) override;
|
||||
|
||||
protected:
|
||||
void clear_surface(u32 arg) override;
|
||||
void begin() override;
|
||||
void end() override;
|
||||
|
||||
void on_init_thread() override;
|
||||
void on_exit() override;
|
||||
bool do_method(u32 cmd, u32 arg) override;
|
||||
void flip(const rsx::display_flip_info_t& info) override;
|
||||
|
||||
void do_local_task(rsx::FIFO_state state) override;
|
||||
|
@ -11,11 +11,6 @@ NullGSRender::NullGSRender() : GSRender()
|
||||
{
|
||||
}
|
||||
|
||||
bool NullGSRender::do_method(u32 cmd, u32 value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void NullGSRender::end()
|
||||
{
|
||||
rsx::method_registers.current_draw_clause.end();
|
||||
|
@ -8,6 +8,5 @@ public:
|
||||
NullGSRender();
|
||||
|
||||
private:
|
||||
bool do_method(u32 cmd, u32 value) final;
|
||||
void end() override;
|
||||
};
|
||||
|
@ -687,13 +687,13 @@ namespace rsx
|
||||
void run_FIFO();
|
||||
|
||||
public:
|
||||
virtual void clear_surface(u32 arg) {};
|
||||
virtual void begin();
|
||||
virtual void end();
|
||||
virtual void execute_nop_draw();
|
||||
|
||||
virtual void on_init_rsx() = 0;
|
||||
virtual void on_init_thread() = 0;
|
||||
virtual bool do_method(u32 /*cmd*/, u32 /*value*/) { return false; }
|
||||
virtual void on_frame_end(u32 buffer, bool forced = false);
|
||||
virtual void flip(const display_flip_info_t& info) = 0;
|
||||
virtual u64 timestamp();
|
||||
|
@ -2485,24 +2485,6 @@ void VKGSRender::do_local_task(rsx::FIFO_state state)
|
||||
}
|
||||
}
|
||||
|
||||
bool VKGSRender::do_method(u32 cmd, u32 arg)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
case NV4097_CLEAR_SURFACE:
|
||||
clear_surface(arg);
|
||||
return true;
|
||||
case NV4097_TEXTURE_READ_SEMAPHORE_RELEASE:
|
||||
// Texture barrier, seemingly not very useful
|
||||
return true;
|
||||
case NV4097_BACK_END_WRITE_SEMAPHORE_RELEASE:
|
||||
//sync_at_semaphore_release();
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool VKGSRender::load_program()
|
||||
{
|
||||
if (m_graphics_state & rsx::pipeline_state::invalidate_pipeline_bits)
|
||||
|
@ -426,7 +426,6 @@ public:
|
||||
~VKGSRender() override;
|
||||
|
||||
private:
|
||||
void clear_surface(u32 mask);
|
||||
void prepare_rtts(rsx::framebuffer_creation_context context);
|
||||
|
||||
void open_command_buffer();
|
||||
@ -478,13 +477,13 @@ public:
|
||||
void emergency_query_cleanup(vk::command_buffer* commands);
|
||||
|
||||
protected:
|
||||
void clear_surface(u32 mask) override;
|
||||
void begin() override;
|
||||
void end() override;
|
||||
void emit_geometry(u32 sub_index) override;
|
||||
|
||||
void on_init_thread() override;
|
||||
void on_exit() override;
|
||||
bool do_method(u32 cmd, u32 arg) override;
|
||||
void flip(const rsx::display_flip_info_t& info) override;
|
||||
|
||||
void do_local_task(rsx::FIFO_state state) override;
|
||||
|
@ -152,11 +152,7 @@ namespace rsx
|
||||
{
|
||||
void clear(thread* rsx, u32 _reg, u32 arg)
|
||||
{
|
||||
// TODO: every backend must override method table to insert its own handlers
|
||||
if (!rsx->do_method(NV4097_CLEAR_SURFACE, arg))
|
||||
{
|
||||
//
|
||||
}
|
||||
rsx->clear_surface(arg);
|
||||
|
||||
if (capture_current_frame)
|
||||
{
|
||||
@ -166,8 +162,6 @@ namespace rsx
|
||||
|
||||
void clear_zcull(thread* rsx, u32 _reg, u32 arg)
|
||||
{
|
||||
rsx->do_method(NV4097_CLEAR_ZCULL_SURFACE, arg);
|
||||
|
||||
if (capture_current_frame)
|
||||
{
|
||||
rsx->capture_frame("clear zcull memory");
|
||||
@ -212,11 +206,6 @@ namespace rsx
|
||||
// lle-gcm likes to inject system reserved semaphores, presumably for system/vsh usage
|
||||
// Avoid calling render to avoid any havoc(flickering) they may cause from invalid flush/write
|
||||
const u32 offset = method_registers.semaphore_offset_4097() & -16;
|
||||
if (offset > 63 * 4 && !rsx->do_method(NV4097_TEXTURE_READ_SEMAPHORE_RELEASE, arg))
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
vm::_ref<atomic_t<RsxSemaphore>>(get_address(offset, method_registers.semaphore_context_dma_4097())).store(
|
||||
{
|
||||
arg,
|
||||
@ -228,14 +217,10 @@ namespace rsx
|
||||
void back_end_write_semaphore_release(thread* rsx, u32 _reg, u32 arg)
|
||||
{
|
||||
// Full pipeline barrier
|
||||
const u32 offset = method_registers.semaphore_offset_4097() & -16;
|
||||
if (offset > 63 * 4 && !rsx->do_method(NV4097_BACK_END_WRITE_SEMAPHORE_RELEASE, arg))
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
rsx->sync();
|
||||
u32 val = (arg & 0xff00ff00) | ((arg & 0xff) << 16) | ((arg >> 16) & 0xff);
|
||||
|
||||
const u32 offset = method_registers.semaphore_offset_4097() & -16;
|
||||
const u32 val = (arg & 0xff00ff00) | ((arg & 0xff) << 16) | ((arg >> 16) & 0xff);
|
||||
vm::_ref<atomic_t<RsxSemaphore>>(get_address(offset, method_registers.semaphore_context_dma_4097())).store(
|
||||
{
|
||||
val,
|
||||
|
Loading…
x
Reference in New Issue
Block a user