d3d12: Fixes warnings: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'HRESULT'
../../src/gallium/drivers/d3d12/d3d12_video_dec.cpp:839:114: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'HRESULT' {aka 'long int'} [-Wformat=]
839 | "[d3d12_video_decoder] d3d12_video_decoder_create_command_objects - Call to CreateFence failed with HR %x\n",
| ~^
| |
| unsigned int
| %lx
840 | hr);
| ~~
| |
| HRESULT {aka long int}
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36864>
This commit is contained in:
@@ -52,7 +52,7 @@ get_dxcore_factory()
|
||||
IDXCoreAdapterFactory *factory = NULL;
|
||||
HRESULT hr = DXCoreCreateAdapterFactory(IID_IDXCoreAdapterFactory, (void **)&factory);
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("D3D12: DXCoreCreateAdapterFactory failed: %08x\n", hr);
|
||||
debug_printf("D3D12: DXCoreCreateAdapterFactory failed: %08x\n", (unsigned)hr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ get_dxgi_factory()
|
||||
IDXGIFactory4 *factory = NULL;
|
||||
HRESULT hr = CreateDXGIFactory2(flags, IID_IDXGIFactory4, (void **)&factory);
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("D3D12: CreateDXGIFactory2 failed: %08x\n", hr);
|
||||
debug_printf("D3D12: CreateDXGIFactory2 failed: %08x\n", (unsigned)hr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ d3d12_resource_from_handle(struct pipe_screen *pscreen,
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("d3d12: Error %x - Couldn't export incoming resource com_obj "
|
||||
"(%p) via shared NT handle.\n", hr, handle->com_obj);
|
||||
"(%p) via shared NT handle.\n", (unsigned)hr, handle->com_obj);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ d3d12_array_of_textures_dpb_manager::create_reconstructed_picture_allocations(ID
|
||||
nullptr,
|
||||
IID_PPV_ARGS(ppResource));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", (unsigned)hr);
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ d3d12_video_create_decoder(struct pipe_context *context, const struct pipe_video
|
||||
&pD3D12Dec->m_decodeFormatInfo,
|
||||
sizeof(pD3D12Dec->m_decodeFormatInfo));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ d3d12_video_decoder_begin_frame(struct pipe_video_codec *codec,
|
||||
HRESULT hr = pD3D12Dec->m_spDecodeCommandList->Reset(
|
||||
pD3D12Dec->m_inflightResourcesPool[d3d12_video_decoder_pool_current_index(pD3D12Dec)].m_spCommandAllocator.Get());
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] resetting ID3D12GraphicsCommandList failed with HR %x\n", hr);
|
||||
debug_printf("[d3d12_video_decoder] resetting ID3D12GraphicsCommandList failed with HR %x\n", (unsigned)hr);
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ d3d12_video_decoder_flush(struct pipe_video_codec *codec)
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_flush"
|
||||
" - D3D12Device was removed BEFORE commandlist "
|
||||
"execution with HR %x.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -784,7 +784,7 @@ d3d12_video_decoder_flush(struct pipe_video_codec *codec)
|
||||
|
||||
hr = pD3D12Dec->m_spDecodeCommandList->Close();
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_flush - Can't close command list with HR %x\n", hr);
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_flush - Can't close command list with HR %x\n", (unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -801,7 +801,7 @@ d3d12_video_decoder_flush(struct pipe_video_codec *codec)
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_flush"
|
||||
" - D3D12Device was removed AFTER commandlist "
|
||||
"execution with HR %x, but wasn't before.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -829,7 +829,7 @@ d3d12_video_decoder_create_command_objects(const struct d3d12_screen *pD3D12Scre
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_create_command_objects - Call to CreateCommandQueue "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -837,7 +837,7 @@ d3d12_video_decoder_create_command_objects(const struct d3d12_screen *pD3D12Scre
|
||||
if (FAILED(hr)) {
|
||||
debug_printf(
|
||||
"[d3d12_video_decoder] d3d12_video_decoder_create_command_objects - Call to CreateFence failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -849,7 +849,7 @@ d3d12_video_decoder_create_command_objects(const struct d3d12_screen *pD3D12Scre
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_create_command_objects - Call to "
|
||||
"CreateCommandAllocator failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -872,7 +872,7 @@ d3d12_video_decoder_create_command_objects(const struct d3d12_screen *pD3D12Scre
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_create_command_objects - Call to CreateCommandList "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -908,7 +908,7 @@ d3d12_video_decoder_check_caps_and_create_decoder(const struct d3d12_screen *pD3
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_check_caps_and_create_decoder - CheckFeatureSupport "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -942,7 +942,7 @@ d3d12_video_decoder_check_caps_and_create_decoder(const struct d3d12_screen *pD3
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_check_caps_and_create_decoder - CreateVideoDecoder "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@ d3d12_video_decoder_create_staging_bitstream_buffer(const struct d3d12_screen *p
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_create_staging_bitstream_buffer - "
|
||||
"CreateCommittedResource failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1151,7 +1151,7 @@ d3d12_video_decoder_reconfigure_dpb(struct d3d12_video_decoder *pD3D12Dec,
|
||||
if (FAILED(hr)) {
|
||||
debug_printf(
|
||||
"[d3d12_video_decoder] d3d12_video_decoder_reconfigure_dpb - CreateVideoDecoder failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
// Update state after CreateVideoDecoder succeeds only.
|
||||
@@ -1203,7 +1203,7 @@ d3d12_video_decoder_reconfigure_dpb(struct d3d12_video_decoder *pD3D12Dec,
|
||||
if (FAILED(hr)) {
|
||||
debug_printf(
|
||||
"[d3d12_video_decoder] d3d12_video_decoder_reconfigure_dpb - CreateVideoDecoderHeap failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
// Update pD3D12Dec after CreateVideoDecoderHeap succeeds only.
|
||||
@@ -1655,7 +1655,7 @@ d3d12_video_decoder_sync_completion(struct pipe_video_codec *codec,
|
||||
|
||||
hr = pool_entry.m_spCommandAllocator->Reset();
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("failed with %x.\n", hr);
|
||||
debug_printf("failed with %x.\n", (unsigned)hr);
|
||||
goto sync_with_token_fail;
|
||||
}
|
||||
|
||||
@@ -1665,7 +1665,7 @@ d3d12_video_decoder_sync_completion(struct pipe_video_codec *codec,
|
||||
debug_printf("[d3d12_video_decoder] d3d12_video_decoder_sync_completion"
|
||||
" - D3D12Device was removed AFTER d3d12_video_decoder_ensure_fence_finished "
|
||||
"execution with HR %x, but wasn't before.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto sync_with_token_fail;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ d3d12_video_encoder_flush(struct pipe_video_codec *codec)
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_flush"
|
||||
" - D3D12Device was removed BEFORE commandlist "
|
||||
"execution with HR %x.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ d3d12_video_encoder_flush(struct pipe_video_codec *codec)
|
||||
|
||||
hr = pD3D12Enc->m_spEncodeCommandList->Close();
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_flush - Can't close command list with HR %x\n", hr);
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_flush - Can't close command list with HR %x\n", (unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ d3d12_video_encoder_flush(struct pipe_video_codec *codec)
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_flush"
|
||||
" - D3D12Device was removed AFTER commandlist "
|
||||
"execution with HR %x, but wasn't before.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ d3d12_video_encoder_sync_completion(struct pipe_video_codec *codec,
|
||||
pool_entry.m_spCommandAllocator.Get());
|
||||
hr = pool_entry.m_spCommandAllocator->Reset();
|
||||
if(FAILED(hr)) {
|
||||
debug_printf("failed with %x.\n", hr);
|
||||
debug_printf("failed with %x.\n", (unsigned)hr);
|
||||
goto sync_with_token_fail;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ d3d12_video_encoder_sync_completion(struct pipe_video_codec *codec,
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_sync_completion"
|
||||
" - D3D12Device was removed AFTER d3d12_video_encoder_ensure_fence_finished "
|
||||
"execution with HR %x, but wasn't before.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto sync_with_token_fail;
|
||||
}
|
||||
|
||||
@@ -866,7 +866,7 @@ d3d12_video_encoder_reconfigure_encoder_objects(struct d3d12_video_encoder *pD3D
|
||||
HRESULT hr = pD3D12Enc->m_spD3D12VideoDevice->CreateVideoEncoder(&encoderDesc,
|
||||
IID_PPV_ARGS(pD3D12Enc->m_spVideoEncoder.GetAddressOf()));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CreateVideoEncoder failed with HR %x\n", hr);
|
||||
debug_printf("CreateVideoEncoder failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -980,7 +980,7 @@ d3d12_video_encoder_reconfigure_encoder_objects(struct d3d12_video_encoder *pD3D
|
||||
}
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CreateVideoEncoderHeap failed with HR %x\n", hr);
|
||||
debug_printf("CreateVideoEncoderHeap failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1957,7 +1957,7 @@ bool d3d12_video_encoder_query_d3d12_driver_caps(struct d3d12_video_encoder *pD3
|
||||
sizeof(capEncoderSupportData1));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT2 failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT2 failed with HR %x\n", (unsigned)hr);
|
||||
debug_printf("Falling back to check previous query version D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1...\n");
|
||||
|
||||
// D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT2 extends D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
|
||||
@@ -1975,7 +1975,7 @@ bool d3d12_video_encoder_query_d3d12_driver_caps(struct d3d12_video_encoder *pD3
|
||||
#endif
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1 failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1 failed with HR %x\n", (unsigned)hr);
|
||||
debug_printf("Falling back to check previous query version D3D12_FEATURE_VIDEO_ENCODER_SUPPORT...\n");
|
||||
|
||||
// D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 extends D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT
|
||||
@@ -1999,7 +1999,7 @@ bool d3d12_video_encoder_query_d3d12_driver_caps(struct d3d12_video_encoder *pD3
|
||||
casted_down_cap_data,
|
||||
sizeof(D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2051,7 +2051,7 @@ bool d3d12_video_encoder_query_d3d12_driver_caps(struct d3d12_video_encoder *pD3
|
||||
sizeof(pD3D12Enc->m_currentEncodeConfig.m_DirtyRectsDesc.MapInfo.capInputLayoutDirtyRegion));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOLVE_INPUT_PARAM_LAYOUT failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOLVE_INPUT_PARAM_LAYOUT failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2089,7 +2089,7 @@ bool d3d12_video_encoder_query_d3d12_driver_caps(struct d3d12_video_encoder *pD3
|
||||
sizeof(pD3D12Enc->m_currentEncodeConfig.m_QuantizationMatrixDesc.GPUInput.capInputLayoutQPMap));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOLVE_INPUT_PARAM_LAYOUT failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOLVE_INPUT_PARAM_LAYOUT failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2127,7 +2127,7 @@ bool d3d12_video_encoder_query_d3d12_driver_caps(struct d3d12_video_encoder *pD3
|
||||
sizeof(pD3D12Enc->m_currentEncodeConfig.m_MoveRectsDesc.MapInfo.capInputLayoutMotionVectors));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOLVE_INPUT_PARAM_LAYOUT failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOLVE_INPUT_PARAM_LAYOUT failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2148,7 +2148,7 @@ bool d3d12_video_encoder_check_subregion_mode_support(struct d3d12_video_encoder
|
||||
capDataSubregionLayout.SubregionMode = requestedSlicesMode;
|
||||
HRESULT hr = pD3D12Enc->m_spD3D12VideoDevice->CheckFeatureSupport(D3D12_FEATURE_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE, &capDataSubregionLayout, sizeof(capDataSubregionLayout));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
return capDataSubregionLayout.IsSupported;
|
||||
@@ -2326,7 +2326,7 @@ d3d12_video_encoder_create_command_objects(struct d3d12_video_encoder *pD3D12Enc
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_create_command_objects - Call to CreateCommandQueue "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2334,7 +2334,7 @@ d3d12_video_encoder_create_command_objects(struct d3d12_video_encoder *pD3D12Enc
|
||||
if (FAILED(hr)) {
|
||||
debug_printf(
|
||||
"[d3d12_video_encoder] d3d12_video_encoder_create_command_objects - Call to CreateFence failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2348,7 +2348,7 @@ d3d12_video_encoder_create_command_objects(struct d3d12_video_encoder *pD3D12Enc
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_create_command_objects - Call to "
|
||||
"CreateCommandAllocator failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2372,7 +2372,7 @@ d3d12_video_encoder_create_command_objects(struct d3d12_video_encoder *pD3D12Enc
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_encoder] d3d12_video_encoder_create_command_objects - Call to CreateCommandList "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2486,7 +2486,7 @@ d3d12_video_encoder_prepare_output_buffers(struct d3d12_video_encoder *pD3D12Enc
|
||||
sizeof(pD3D12Enc->m_currentEncodeCapabilities.m_ResourceRequirementsCaps));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 failed with HR %x\n", (unsigned)hr);
|
||||
debug_printf("Falling back to check previous query version D3D12_FEATURE_VIDEO_ENCODER_RESOURCE_REQUIREMENTS...\n");
|
||||
|
||||
// D3D12_FEATURE_VIDEO_ENCODER_RESOURCE_REQUIREMENTS1 extends D3D12_FEATURE_VIDEO_ENCODER_RESOURCE_REQUIREMENTS
|
||||
@@ -2504,7 +2504,7 @@ d3d12_video_encoder_prepare_output_buffers(struct d3d12_video_encoder *pD3D12Enc
|
||||
#endif
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2538,7 +2538,7 @@ d3d12_video_encoder_prepare_output_buffers(struct d3d12_video_encoder *pD3D12Enc
|
||||
IID_PPV_ARGS(pD3D12Enc->m_spEncodedFrameMetadata[current_metadata_slot].spBuffer.GetAddressOf()));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2559,7 +2559,7 @@ d3d12_video_encoder_prepare_output_buffers(struct d3d12_video_encoder *pD3D12Enc
|
||||
IID_PPV_ARGS(pD3D12Enc->m_spEncodedFrameMetadata[current_metadata_slot].m_spMetadataOutputBuffer.GetAddressOf()));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -2592,7 +2592,7 @@ d3d12_video_encoder_prepare_input_buffers(struct d3d12_video_encoder *pD3D12Enc)
|
||||
IID_PPV_ARGS(&pD3D12Enc->m_inflightResourcesPool[d3d12_video_encoder_pool_current_index(pD3D12Enc)].m_spDirtyRectsResolvedOpaqueMap));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
debug_printf("CreateCommittedResource for m_spDirtyRectsResolvedOpaqueMap failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource for m_spDirtyRectsResolvedOpaqueMap failed with HR %x\n", (unsigned)hr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2617,7 +2617,7 @@ d3d12_video_encoder_prepare_input_buffers(struct d3d12_video_encoder *pD3D12Enc)
|
||||
IID_PPV_ARGS(&pD3D12Enc->m_inflightResourcesPool[d3d12_video_encoder_pool_current_index(pD3D12Enc)].m_spQPMapResolvedOpaqueMap));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
debug_printf("CreateCommittedResource for m_spQPMapResolvedOpaqueMap failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource for m_spQPMapResolvedOpaqueMap failed with HR %x\n", (unsigned)hr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2639,7 +2639,7 @@ d3d12_video_encoder_prepare_input_buffers(struct d3d12_video_encoder *pD3D12Enc)
|
||||
IID_PPV_ARGS(&pD3D12Enc->m_inflightResourcesPool[d3d12_video_encoder_pool_current_index(pD3D12Enc)].m_spMotionVectorsResolvedOpaqueMap));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
debug_printf("CreateCommittedResource for m_spMotionVectorsResolvedOpaqueMap failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource for m_spMotionVectorsResolvedOpaqueMap failed with HR %x\n", (unsigned)hr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2723,7 +2723,7 @@ d3d12_video_encoder_begin_frame(struct pipe_video_codec * codec,
|
||||
if (FAILED(hr)) {
|
||||
debug_printf(
|
||||
"[d3d12_video_encoder] d3d12_video_encoder_flush - resetting ID3D12GraphicsCommandList failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -2846,7 +2846,7 @@ d3d12_video_encoder_get_slice_bitstream_data(struct pipe_video_codec *codec,
|
||||
if (hr != S_OK) {
|
||||
debug_printf("Error: d3d12_video_encoder_get_slice_bitstream_data for Encode GPU command for fence %" PRIu64 " failed with GetDeviceRemovedReason: %x\n",
|
||||
requested_metadata_fence,
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
assert(false);
|
||||
if (codec_unit_metadata_count)
|
||||
*codec_unit_metadata_count = 0u;
|
||||
@@ -3197,7 +3197,7 @@ d3d12_video_encoder_encode_bitstream_impl(struct pipe_video_codec *codec,
|
||||
IID_PPV_ARGS(pD3D12Enc->m_spEncodedFrameMetadata[current_metadata_slot].spStagingBitstreams[slice_idx].GetAddressOf()));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", (unsigned)hr);
|
||||
pD3D12Enc->m_inflightResourcesPool[d3d12_video_encoder_pool_current_index(pD3D12Enc)].encode_result = PIPE_VIDEO_FEEDBACK_METADATA_ENCODE_FLAG_FAILED;
|
||||
pD3D12Enc->m_spEncodedFrameMetadata[d3d12_video_encoder_metadata_current_index(pD3D12Enc)].encode_result = PIPE_VIDEO_FEEDBACK_METADATA_ENCODE_FLAG_FAILED;
|
||||
assert(false);
|
||||
@@ -4195,7 +4195,7 @@ d3d12_video_encoder_get_feedback(struct pipe_video_codec *codec,
|
||||
opt_metadata.encode_result = PIPE_VIDEO_FEEDBACK_METADATA_ENCODE_FLAG_FAILED;
|
||||
debug_printf("Error: d3d12_video_encoder_get_feedback for Encode GPU command for fence %" PRIu64 " failed with GetDeviceRemovedReason: %x\n",
|
||||
requested_metadata_fence,
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
assert(false);
|
||||
if(pMetadata)
|
||||
*pMetadata = opt_metadata;
|
||||
|
||||
@@ -594,7 +594,7 @@ d3d12_video_encoder_negotiate_current_av1_tiles_configuration(struct d3d12_video
|
||||
sizeof(capDataTilesSupport));
|
||||
if (FAILED(hr) || !capDataTilesSupport.IsSupported) {
|
||||
debug_printf("D3D12_FEATURE_VIDEO_ENCODER_SUBREGION_TILES_SUPPORT HR (0x%x) error or IsSupported: (%d).\n",
|
||||
hr,
|
||||
(unsigned)hr,
|
||||
capDataTilesSupport.IsSupported);
|
||||
return false;
|
||||
}
|
||||
@@ -1075,7 +1075,7 @@ d3d12_video_encoder_update_current_encoder_config_state_av1(struct d3d12_video_e
|
||||
&pD3D12Enc->m_currentEncodeConfig.m_encodeFormatInfo,
|
||||
sizeof(pD3D12Enc->m_currentEncodeConfig.m_encodeFormatInfo));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR 0x%x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR 0x%x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -969,7 +969,7 @@ d3d12_video_encoder_update_current_encoder_config_state_h264(struct d3d12_video_
|
||||
&pD3D12Enc->m_currentEncodeConfig.m_encodeFormatInfo,
|
||||
sizeof(pD3D12Enc->m_currentEncodeConfig.m_encodeFormatInfo));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1302,7 +1302,7 @@ d3d12_video_encoder_update_current_encoder_config_state_hevc(struct d3d12_video_
|
||||
&pD3D12Enc->m_currentEncodeConfig.m_encodeFormatInfo,
|
||||
sizeof(pD3D12Enc->m_currentEncodeConfig.m_encodeFormatInfo));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ d3d12_video_processor_begin_frame(struct pipe_video_codec * codec,
|
||||
if (FAILED(hr)) {
|
||||
debug_printf(
|
||||
"[d3d12_video_processor] resetting ID3D12GraphicsCommandList failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
assert(false);
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ d3d12_video_processor_flush(struct pipe_video_codec * codec)
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_flush"
|
||||
" - D3D12Device was removed BEFORE commandlist "
|
||||
"execution with HR %x.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ d3d12_video_processor_flush(struct pipe_video_codec * codec)
|
||||
|
||||
hr = pD3D12Proc->m_spCommandList->Close();
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_flush - Can't close command list with HR %x\n", hr);
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_flush - Can't close command list with HR %x\n", (unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ d3d12_video_processor_flush(struct pipe_video_codec * codec)
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_flush"
|
||||
" - D3D12Device was removed AFTER commandlist "
|
||||
"execution with HR %x, but wasn't before.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto flush_fail;
|
||||
}
|
||||
|
||||
@@ -609,7 +609,7 @@ d3d12_video_processor_check_caps_and_create_processor(struct d3d12_video_process
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_check_caps_and_create_processor - CheckFeatureSupport "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ d3d12_video_processor_check_caps_and_create_processor(struct d3d12_video_process
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_check_caps_and_create_processor - CreateVideoProcessor "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ d3d12_video_processor_create_command_objects(struct d3d12_video_processor *pD3D1
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_create_command_objects - Call to CreateCommandQueue "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -670,7 +670,7 @@ d3d12_video_processor_create_command_objects(struct d3d12_video_processor *pD3D1
|
||||
if (FAILED(hr)) {
|
||||
debug_printf(
|
||||
"[d3d12_video_processor] d3d12_video_processor_create_command_objects - Call to CreateFence failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ d3d12_video_processor_create_command_objects(struct d3d12_video_processor *pD3D1
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_create_command_objects - Call to "
|
||||
"CreateCommandAllocator failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -704,7 +704,7 @@ d3d12_video_processor_create_command_objects(struct d3d12_video_processor *pD3D1
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_create_command_objects - Call to CreateCommandList "
|
||||
"failed with HR %x\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -781,7 +781,7 @@ d3d12_video_processor_ensure_fence_finished(struct pipe_video_codec *codec,
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_ensure_fence_finished - SetEventOnCompletion for "
|
||||
"fenceValue %" PRIu64 " failed with HR %x\n",
|
||||
fenceValueToWaitOn,
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto ensure_fence_finished_fail;
|
||||
}
|
||||
|
||||
@@ -822,7 +822,7 @@ d3d12_video_processor_sync_completion(struct pipe_video_codec *codec, uint64_t f
|
||||
hr =
|
||||
pD3D12Proc->m_spCommandAllocators[fenceValueToWaitOn % D3D12_VIDEO_PROC_ASYNC_DEPTH]->Reset();
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("m_spCommandAllocator->Reset() failed with %x.\n", hr);
|
||||
debug_printf("m_spCommandAllocator->Reset() failed with %x.\n", (unsigned)hr);
|
||||
goto sync_with_token_fail;
|
||||
}
|
||||
|
||||
@@ -832,7 +832,7 @@ d3d12_video_processor_sync_completion(struct pipe_video_codec *codec, uint64_t f
|
||||
debug_printf("[d3d12_video_processor] d3d12_video_processor_sync_completion"
|
||||
" - D3D12Device was removed AFTER d3d12_video_processor_ensure_fence_finished "
|
||||
"execution with HR %x, but wasn't before.\n",
|
||||
hr);
|
||||
(unsigned)hr);
|
||||
goto sync_with_token_fail;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ d3d12_video_encode_supported_references_per_frame_structures(const D3D12_VIDEO_E
|
||||
&capPictureControlData,
|
||||
sizeof(capPictureControlData));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
}
|
||||
|
||||
if (capPictureControlData.IsSupported) {
|
||||
@@ -334,7 +334,7 @@ d3d12_video_encode_supported_references_per_frame_structures(const D3D12_VIDEO_E
|
||||
&capPictureControlData,
|
||||
sizeof(capPictureControlData));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
}
|
||||
|
||||
if (capPictureControlData.IsSupported) {
|
||||
@@ -372,7 +372,7 @@ d3d12_video_encode_supported_references_per_frame_structures(const D3D12_VIDEO_E
|
||||
&capPictureControlData,
|
||||
sizeof(capPictureControlData));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
}
|
||||
|
||||
if (capPictureControlData.IsSupported) {
|
||||
@@ -527,7 +527,7 @@ d3d12_video_encode_supported_slice_structures(const D3D12_VIDEO_ENCODER_CODEC &c
|
||||
&capDataSubregionLayout,
|
||||
sizeof(capDataSubregionLayout));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
} else if (capDataSubregionLayout.IsSupported) {
|
||||
/* This would be setting N subregions per frame in this D3D12 mode where N = (height/blocksize) / K */
|
||||
supportedSliceStructuresBitMask |= PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_MULTI_ROWS;
|
||||
@@ -545,7 +545,7 @@ d3d12_video_encode_supported_slice_structures(const D3D12_VIDEO_ENCODER_CODEC &c
|
||||
&capDataSubregionLayout,
|
||||
sizeof(capDataSubregionLayout));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
} else if (capDataSubregionLayout.IsSupported) {
|
||||
/* This would be setting K rows per subregions in this D3D12 mode */
|
||||
supportedSliceStructuresBitMask |= PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_MULTI_ROWS;
|
||||
@@ -563,7 +563,7 @@ d3d12_video_encode_supported_slice_structures(const D3D12_VIDEO_ENCODER_CODEC &c
|
||||
&capDataSubregionLayout,
|
||||
sizeof(capDataSubregionLayout));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
} else if (capDataSubregionLayout.IsSupported) {
|
||||
/* This would be setting K rows per subregions in this D3D12 mode */
|
||||
supportedSliceStructuresBitMask |= PIPE_VIDEO_CAP_SLICE_STRUCTURE_EQUAL_MULTI_ROWS;
|
||||
@@ -582,7 +582,7 @@ d3d12_video_encode_supported_slice_structures(const D3D12_VIDEO_ENCODER_CODEC &c
|
||||
&capDataSubregionLayout,
|
||||
sizeof(capDataSubregionLayout));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport failed with HR %x\n", (unsigned)hr);
|
||||
} else if (capDataSubregionLayout.IsSupported) {
|
||||
supportedSliceStructuresBitMask |= PIPE_VIDEO_CAP_SLICE_STRUCTURE_MAX_SLICE_SIZE;
|
||||
}
|
||||
@@ -701,7 +701,7 @@ d3d12_video_encode_support_caps(const D3D12_VIDEO_ENCODER_CODEC &argTargetCodec,
|
||||
capCodecConfigData.CodecSupportLimits.DataSize = sizeof(av1CodecSupport);
|
||||
HRESULT hr = pD3D12VideoDevice->CheckFeatureSupport(D3D12_FEATURE_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT, &capCodecConfigData, sizeof(capCodecConfigData));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
} else if (!capCodecConfigData.IsSupported) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT IsSupported is false\n");
|
||||
@@ -728,7 +728,7 @@ d3d12_video_encode_support_caps(const D3D12_VIDEO_ENCODER_CODEC &argTargetCodec,
|
||||
sizeof(capEncoderSupportData1));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT2 failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT2 failed with HR %x\n", (unsigned)hr);
|
||||
debug_printf("Falling back to check previous query version D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1...\n");
|
||||
|
||||
// D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT2 extends D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1
|
||||
@@ -746,7 +746,7 @@ d3d12_video_encode_support_caps(const D3D12_VIDEO_ENCODER_CODEC &argTargetCodec,
|
||||
#endif
|
||||
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1 failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1 failed with HR %x\n", (unsigned)hr);
|
||||
debug_printf("Falling back to check previous query version D3D12_FEATURE_VIDEO_ENCODER_SUPPORT...\n");
|
||||
|
||||
// D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT1 extends D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT
|
||||
@@ -756,7 +756,7 @@ d3d12_video_encode_support_caps(const D3D12_VIDEO_ENCODER_CODEC &argTargetCodec,
|
||||
casted_down_cap_data,
|
||||
sizeof(D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT failed with HR %x\n", hr);
|
||||
debug_printf("CheckFeatureSupport D3D12_FEATURE_VIDEO_ENCODER_SUPPORT failed with HR %x\n", (unsigned)hr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ d3d12_texture_array_dpb_manager::create_reconstructed_picture_allocations(ID3D12
|
||||
nullptr,
|
||||
IID_PPV_ARGS(ppResource));
|
||||
if (FAILED(hr)) {
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", hr);
|
||||
debug_printf("CreateCommittedResource failed with HR %x\n", (unsigned)hr);
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user