From: Xavier Claessens Date: Fri, 25 Mar 2022 17:26:52 +0000 (-0400) Subject: d3d11: Fix example build error X-Git-Tag: 1.22.0~2038 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=924574a608bc90ed915ca613c1a423509a8f10a5;p=platform%2Fupstream%2Fgstreamer.git d3d11: Fix example build error ``` ../subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11device.cpp:129:50: error: invalid conversion from ‘int’ to ‘DXGI_FORMAT’ [-fpermissive] 129 | D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc = { 0, }; ``` Part-of: --- diff --git a/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11device.cpp b/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11device.cpp index a016edf9f5..659103fb59 100644 --- a/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11device.cpp +++ b/subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11device.cpp @@ -126,7 +126,7 @@ prepare_shared_texture (ID3D11Device * d3d11_device, guint width, ComPtr shader_resource_view; if (srv) { - D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc = { 0, }; + D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc = { DXGI_FORMAT_UNKNOWN, }; srv_desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; srv_desc.Texture2D.MipLevels = 1; srv_desc.Format = format; @@ -262,7 +262,7 @@ prepare_shader (ID3D11Device * d3d11_device, ID3D11DeviceContext * context, " return input;\n" "}\n"; - D3D11_SAMPLER_DESC sampler_desc = { 0, }; + D3D11_SAMPLER_DESC sampler_desc = { D3D11_FILTER_MIN_MAG_MIP_POINT, }; sampler_desc.Filter = D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT; sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; sampler_desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;