mirror of https://github.com/RPCS3/rpcs3.git
rsx: dont silently ignore null shader address
This commit is contained in:
parent
7c4693e271
commit
efbd77deb4
|
@ -81,8 +81,8 @@ namespace rsx
|
|||
|
||||
// capture fragment shader mem
|
||||
const u32 shader_program = method_registers.shader_program_address();
|
||||
if (shader_program != 0)
|
||||
{
|
||||
verify("Null shader address!" HERE), shader_program != 0;
|
||||
|
||||
const u32 program_location = (shader_program & 0x3) - 1;
|
||||
const u32 program_offset = (shader_program & ~0x3);
|
||||
|
||||
|
@ -98,7 +98,6 @@ namespace rsx
|
|||
block_data.data.resize(ucode_size + program_start);
|
||||
std::memcpy(block_data.data.data(), vm::base(addr), ucode_size + program_start);
|
||||
insert_mem_block_in_map(mem_changes, std::move(block), std::move(block_data));
|
||||
}
|
||||
|
||||
// vertex shader is passed in registers, so it can be ignored
|
||||
|
||||
|
|
|
@ -181,8 +181,7 @@ void GLGSRender::end()
|
|||
std::chrono::time_point<steady_clock> state_check_start = steady_clock::now();
|
||||
|
||||
if (skip_frame || !framebuffer_status_valid ||
|
||||
(conditional_render_enabled && conditional_render_test_failed) ||
|
||||
!check_program_state())
|
||||
(conditional_render_enabled && conditional_render_test_failed))
|
||||
{
|
||||
rsx::thread::end();
|
||||
return;
|
||||
|
@ -1140,11 +1139,6 @@ bool GLGSRender::do_method(u32 cmd, u32 arg)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool GLGSRender::check_program_state()
|
||||
{
|
||||
return (rsx::method_registers.shader_program_address() != 0);
|
||||
}
|
||||
|
||||
bool GLGSRender::load_program()
|
||||
{
|
||||
if (m_graphics_state & rsx::pipeline_state::invalidate_pipeline_bits)
|
||||
|
|
|
@ -359,7 +359,6 @@ private:
|
|||
void clear_surface(u32 arg);
|
||||
void init_buffers(rsx::framebuffer_creation_context context, bool skip_reading = false);
|
||||
|
||||
bool check_program_state();
|
||||
bool load_program();
|
||||
void load_program_env(const gl::vertex_upload_info& upload_info);
|
||||
|
||||
|
|
|
@ -1946,11 +1946,6 @@ namespace rsx
|
|||
auto &result = current_fragment_program = {};
|
||||
|
||||
const u32 shader_program = rsx::method_registers.shader_program_address();
|
||||
if (shader_program == 0)
|
||||
{
|
||||
current_fp_metadata = {};
|
||||
return;
|
||||
}
|
||||
|
||||
const u32 program_location = (shader_program & 0x3) - 1;
|
||||
const u32 program_offset = (shader_program & ~0x3);
|
||||
|
@ -2083,9 +2078,6 @@ namespace rsx
|
|||
auto &result = current_fragment_program = {};
|
||||
|
||||
const u32 shader_program = rsx::method_registers.shader_program_address();
|
||||
if (shader_program == 0)
|
||||
return;
|
||||
|
||||
const u32 program_location = (shader_program & 0x3) - 1;
|
||||
const u32 program_offset = (shader_program & ~0x3);
|
||||
|
||||
|
|
|
@ -1098,8 +1098,7 @@ void VKGSRender::close_render_pass()
|
|||
void VKGSRender::end()
|
||||
{
|
||||
if (skip_frame || !framebuffer_status_valid || renderer_unavailable ||
|
||||
(conditional_render_enabled && conditional_render_test_failed) ||
|
||||
!check_program_status())
|
||||
(conditional_render_enabled && conditional_render_test_failed))
|
||||
{
|
||||
rsx::thread::end();
|
||||
return;
|
||||
|
@ -2211,11 +2210,6 @@ bool VKGSRender::do_method(u32 cmd, u32 arg)
|
|||
}
|
||||
}
|
||||
|
||||
bool VKGSRender::check_program_status()
|
||||
{
|
||||
return (rsx::method_registers.shader_program_address() != 0);
|
||||
}
|
||||
|
||||
bool VKGSRender::load_program()
|
||||
{
|
||||
if (m_graphics_state & rsx::pipeline_state::invalidate_pipeline_bits)
|
||||
|
|
|
@ -404,7 +404,6 @@ private:
|
|||
vk::vertex_upload_info upload_vertex_data();
|
||||
|
||||
public:
|
||||
bool check_program_status();
|
||||
bool load_program();
|
||||
void load_program_env(const vk::vertex_upload_info& vertex_info);
|
||||
void init_buffers(rsx::framebuffer_creation_context context, bool skip_reading = false);
|
||||
|
|
|
@ -461,6 +461,8 @@ namespace rsx
|
|||
if (!(rsx::method_registers.current_draw_clause.first_count_commands.empty() &&
|
||||
rsx::method_registers.current_draw_clause.inline_vertex_array.empty()))
|
||||
{
|
||||
verify("Null shader address!" HERE), (method_registers.shader_program_address());
|
||||
|
||||
rsxthr->end();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue