mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
d3d12: fix invalid framebuffer crash and shader compile
This commit is contained in:
parent
ac53fc54dc
commit
c5074ba81f
@ -83,7 +83,7 @@ std::string getFunctionImp(FUNCTION f)
|
||||
case FUNCTION::FUNCTION_DFDY:
|
||||
return "ddy($0)";
|
||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLE2D_DEPTH_RGBA:
|
||||
return "texture2DReconstruct($t.Sample($tsampler, $0.xy * $t_scale, texture_parameters[$_i].z))";
|
||||
return "texture2DReconstruct($t.Sample($tsampler, $0.xy * $t_scale), texture_parameters[$_i].z)";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,11 +103,15 @@ namespace
|
||||
|
||||
void D3D12GSRender::clear_surface(u32 arg)
|
||||
{
|
||||
if ((arg & 0xf3) == 0) return;
|
||||
|
||||
std::chrono::time_point<steady_clock> start_duration = steady_clock::now();
|
||||
|
||||
std::chrono::time_point<steady_clock> rtt_duration_start = steady_clock::now();
|
||||
prepare_render_targets(get_current_resource_storage().command_list.Get());
|
||||
|
||||
if (!framebuffer_status_valid) return;
|
||||
|
||||
std::chrono::time_point<steady_clock> rtt_duration_end = steady_clock::now();
|
||||
m_timers.prepare_rtt_duration += std::chrono::duration_cast<std::chrono::microseconds>(rtt_duration_end - rtt_duration_start).count();
|
||||
|
||||
@ -186,6 +190,8 @@ void D3D12GSRender::prepare_render_targets(ID3D12GraphicsCommandList *copycmdlis
|
||||
get_color_surface_addresses(), get_zeta_surface_address(),
|
||||
m_device.Get(), clear_color, 1.f, 0);
|
||||
|
||||
framebuffer_status_valid = true;
|
||||
|
||||
// write descriptors
|
||||
DXGI_FORMAT dxgi_format = get_color_surface_format(rsx::method_registers.surface_color());
|
||||
D3D12_RENDER_TARGET_VIEW_DESC rtt_view_desc = {};
|
||||
|
Loading…
Reference in New Issue
Block a user