Skip to content

Commit

Permalink
Merge pull request #6293 from aliaspider/master
Browse files Browse the repository at this point in the history
(D3D) better handling of frame duping.
  • Loading branch information
fr500 authored Feb 12, 2018
2 parents c58af0d + 72e6909 commit 521433d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gfx/drivers/d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,9 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i

d3d11->frame.texture[0].desc.Format = d3d11->format;
d3d11->frame.texture[0].desc.Usage = D3D11_USAGE_DEFAULT;
d3d11->frame.texture[0].desc.Width = 4;
d3d11->frame.texture[0].desc.Height = 4;
d3d11_init_texture(d3d11->device, &d3d11->frame.texture[0]);

d3d11->menu.texture.desc.Usage = D3D11_USAGE_DEFAULT;

Expand Down
6 changes: 5 additions & 1 deletion gfx/drivers/d3d12.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,10 @@ d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
d3d12->chain.vsync = video->vsync;
d3d12->format = video->rgb32 ? DXGI_FORMAT_B8G8R8X8_UNORM : DXGI_FORMAT_B5G6R5_UNORM;
d3d12->frame.texture[0].desc.Format = d3d12->format;
d3d12->frame.texture[0].desc.Width = 4;
d3d12->frame.texture[0].desc.Height = 4;
d3d12->frame.texture[0].srv_heap = &d3d12->desc.srv_heap;
d3d12_init_texture(d3d12->device, &d3d12->frame.texture[0]);

font_driver_init_osd(d3d12, false, video->is_threaded, FONT_DRIVER_RENDER_D3D12_API);

Expand Down Expand Up @@ -1171,7 +1175,7 @@ static bool d3d12_gfx_frame(

D3D12IASetPrimitiveTopology(d3d12->queue.cmd, D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);

if (data && width && height)
if (frame && width && height)
{
if (d3d12->shader_preset)
{
Expand Down

0 comments on commit 521433d

Please sign in to comment.