mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
d3d12: Fix warnings reported by debug layer
Fixing below debug layer report ID3D12Device::CreateCommittedResource: Ignoring InitialState D3D12_RESOURCE_STATE_COPY_DEST. Buffers are effectively created in state D3D12_RESOURCE_STATE_COMMON. Buffer resource will be automatically promoted to D3D12_RESOURCE_STATE_COPY_DEST at the very first COPY operation time. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895>
This commit is contained in:
parent
e1ecd1de2f
commit
7f2b4b6b09
3 changed files with 6 additions and 7 deletions
|
@ -458,8 +458,7 @@ struct BackgroundRender
|
|||
heap_prop = CD3DX12_HEAP_PROPERTIES (D3D12_HEAP_TYPE_DEFAULT);
|
||||
hr = device_handle->CreateCommittedResource (&heap_prop,
|
||||
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED, &buffer_desc,
|
||||
D3D12_RESOURCE_STATE_COPY_DEST,
|
||||
nullptr, IID_PPV_ARGS (&vertex_index_buf));
|
||||
D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS (&vertex_index_buf));
|
||||
if (!gst_d3d12_result (hr, device)) {
|
||||
GST_ERROR_OBJECT (device, "Couldn't create index buffer");
|
||||
return;
|
||||
|
|
|
@ -766,7 +766,7 @@ gst_d3d12_converter_setup_resource (GstD3D12Converter * self,
|
|||
sizeof (g_indices));
|
||||
hr = device->CreateCommittedResource (&heap_prop,
|
||||
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED,
|
||||
&resource_desc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
|
||||
&resource_desc, D3D12_RESOURCE_STATE_COMMON, nullptr,
|
||||
IID_PPV_ARGS (&priv->vertex_index_buf));
|
||||
if (!gst_d3d12_result (hr, self->device)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't create vertex buffer");
|
||||
|
@ -808,7 +808,7 @@ gst_d3d12_converter_setup_resource (GstD3D12Converter * self,
|
|||
resource_desc = CD3DX12_RESOURCE_DESC::Buffer (sizeof (PSConstBuffer));
|
||||
hr = device->CreateCommittedResource (&heap_prop,
|
||||
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED,
|
||||
&resource_desc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
|
||||
&resource_desc, D3D12_RESOURCE_STATE_COMMON, nullptr,
|
||||
IID_PPV_ARGS (&priv->ps_const_buf));
|
||||
if (!gst_d3d12_result (hr, self->device)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't create const buffer");
|
||||
|
|
|
@ -560,7 +560,7 @@ setup_snow_render (GstD3D12TestSrc * self, RenderContext * ctx,
|
|||
ComPtr < ID3D12Resource > vertex_index_buf;
|
||||
hr = device->CreateCommittedResource (&heap_prop,
|
||||
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED,
|
||||
&buffer_desc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
|
||||
&buffer_desc, D3D12_RESOURCE_STATE_COMMON, nullptr,
|
||||
IID_PPV_ARGS (&vertex_index_buf));
|
||||
if (!gst_d3d12_result (hr, self->device)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't create index buffer");
|
||||
|
@ -938,7 +938,7 @@ setup_smpte_render (GstD3D12TestSrc * self, RenderContext * ctx)
|
|||
ComPtr < ID3D12Resource > vertex_index_buf;
|
||||
hr = device->CreateCommittedResource (&heap_prop,
|
||||
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED,
|
||||
&buffer_desc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
|
||||
&buffer_desc, D3D12_RESOURCE_STATE_COMMON, nullptr,
|
||||
IID_PPV_ARGS (&vertex_index_buf));
|
||||
if (!gst_d3d12_result (hr, self->device)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't create index buffer");
|
||||
|
@ -1104,7 +1104,7 @@ setup_checker_render (GstD3D12TestSrc * self, RenderContext * ctx,
|
|||
ComPtr < ID3D12Resource > vertex_index_buf;
|
||||
hr = device->CreateCommittedResource (&heap_prop,
|
||||
D3D12_HEAP_FLAG_CREATE_NOT_ZEROED,
|
||||
&buffer_desc, D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
|
||||
&buffer_desc, D3D12_RESOURCE_STATE_COMMON, nullptr,
|
||||
IID_PPV_ARGS (&vertex_index_buf));
|
||||
if (!gst_d3d12_result (hr, self->device)) {
|
||||
GST_ERROR_OBJECT (self, "Couldn't create index buffer");
|
||||
|
|
Loading…
Reference in a new issue