mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-30 03:30:45 +00:00
Fixed crash when using stock shader and HDR and previous optimisation
This commit is contained in:
parent
32b8560858
commit
f3bda542d6
@ -1528,22 +1528,19 @@ static bool d3d12_gfx_frame(
|
||||
|
||||
if(d3d12->hdr.enable)
|
||||
{
|
||||
if(use_back_buffer)
|
||||
{
|
||||
memset(&d3d12->chain.back_buffer,
|
||||
0, sizeof(d3d12->chain.back_buffer));
|
||||
d3d12->chain.back_buffer.desc.Width = video_width;
|
||||
d3d12->chain.back_buffer.desc.Height = video_height;
|
||||
d3d12->chain.back_buffer.desc.Format = back_buffer_format;
|
||||
d3d12->chain.back_buffer.desc.Flags =
|
||||
memset(&d3d12->chain.back_buffer,
|
||||
0, sizeof(d3d12->chain.back_buffer));
|
||||
d3d12->chain.back_buffer.desc.Width = video_width;
|
||||
d3d12->chain.back_buffer.desc.Height = video_height;
|
||||
d3d12->chain.back_buffer.desc.Format = back_buffer_format;
|
||||
d3d12->chain.back_buffer.desc.Flags =
|
||||
D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
|
||||
d3d12->chain.back_buffer.srv_heap = &d3d12->desc.srv_heap;
|
||||
d3d12->chain.back_buffer.rt_view.ptr =
|
||||
d3d12->chain.back_buffer.srv_heap = &d3d12->desc.srv_heap;
|
||||
d3d12->chain.back_buffer.rt_view.ptr =
|
||||
d3d12->desc.rtv_heap.cpu.ptr
|
||||
+ countof(d3d12->chain.renderTargets)
|
||||
* d3d12->desc.rtv_heap.stride;
|
||||
d3d12_init_texture(d3d12->device, &d3d12->chain.back_buffer);
|
||||
}
|
||||
d3d12_init_texture(d3d12->device, &d3d12->chain.back_buffer);
|
||||
|
||||
dxgi_swapchain_color_space(d3d12->chain.handle,
|
||||
&d3d12->chain.color_space,
|
||||
|
@ -2669,7 +2669,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
if (!(vk->hdr.support = vk->context->swapchain_colour_space == VK_COLOR_SPACE_HDR10_ST2084_EXT))
|
||||
vk->context->hdr_enable = false;
|
||||
|
||||
if(vk->context->hdr_enable && use_main_buffer)
|
||||
if(vk->context->hdr_enable)
|
||||
{
|
||||
memset(&vk->main_buffer, 0, sizeof(vk->main_buffer));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user