mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
d3d12: Fix debug_printf format strings for cross platform builds
Reviewed-By: Jesse Natalie <jenatali@microsoft.com> Tested-by: Andrew Falcon <bluestang2006@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17260>
This commit is contained in:
parent
d4f7f21fa5
commit
a9a7a20318
6 changed files with 12 additions and 11 deletions
|
|
@ -243,10 +243,11 @@ d3d12_array_of_textures_dpb_manager::get_new_tracked_picture_allocation()
|
|||
|
||||
if (!bAvailableResourceInPool) {
|
||||
// Expand resources pool by one
|
||||
assert(m_ResourcesPool.size() < UINT32_MAX);
|
||||
debug_printf(
|
||||
"[d3d12_array_of_textures_dpb_manager] ID3D12Resource Pool capacity (%ld) exceeded - extending capacity "
|
||||
"[d3d12_array_of_textures_dpb_manager] ID3D12Resource Pool capacity (%" PRIu32 ") exceeded - extending capacity "
|
||||
"and appending new allocation at the end",
|
||||
m_ResourcesPool.size());
|
||||
static_cast<uint32_t>(m_ResourcesPool.size()));
|
||||
d3d12_reusable_resource newPoolEntry = {};
|
||||
newPoolEntry.isFree = false;
|
||||
create_reconstructed_picture_allocations(newPoolEntry.pResource.GetAddressOf());
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ d3d12_video_decoder_prepare_dxva_slices_control_h264(struct d3d12_video_decoder
|
|||
debug_printf("[d3d12_video_decoder_h264] Upper layer reported %d slices for this frame, parsing them below...\n",
|
||||
picture_h264->slice_count);
|
||||
size_t processedBitstreamBytes = 0u;
|
||||
size_t sliceIdx = 0;
|
||||
uint32_t sliceIdx = 0;
|
||||
bool sliceFound = false;
|
||||
do {
|
||||
DXVA_Slice_H264_Short currentSliceEntry = {};
|
||||
|
|
@ -156,7 +156,7 @@ d3d12_video_decoder_prepare_dxva_slices_control_h264(struct d3d12_video_decoder
|
|||
pD3D12Dec->m_stagingDecodeBitstream[currentSliceEntry.BSNALunitDataLocation +
|
||||
(DXVA_H264_START_CODE_LEN_BITS / 8)] &
|
||||
0x1F);
|
||||
debug_printf("[d3d12_video_decoder_h264] Detected slice (NALU Type %d) index %ld with size %d and offset %d "
|
||||
debug_printf("[d3d12_video_decoder_h264] Detected slice (NALU Type %d) index %" PRIu32 " with size %d and offset %d "
|
||||
"for frame with "
|
||||
"fenceValue: %d\n",
|
||||
naluType,
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ d3d12_video_decoder_references_manager::print_dpb()
|
|||
debug_printf("[D3D12 Video Decoder Picture Manager] Decode session information:\n"
|
||||
"\tDPB Maximum Size (max_ref_count + one_slot_curpic): %d\n"
|
||||
"\tDXGI_FORMAT: %d\n"
|
||||
"\tTexture resolution: (%ld, %d)\n"
|
||||
"\tTexture resolution: (%" PRIu64 ", %d)\n"
|
||||
"\tD3D12_RESOURCE_FLAG_VIDEO_DECODE_REFERENCE_ONLY enforced: %d\n"
|
||||
"\tAllocation Mode: %s\n"
|
||||
"\n ----------------------\n\tCurrent frame information:\n"
|
||||
|
|
|
|||
|
|
@ -645,7 +645,7 @@ bool d3d12_video_encoder_negotiate_requested_features_and_d3d12_driver_caps(stru
|
|||
bool isClientRequestingVBVSizes = ((pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Flags & D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_VBV_SIZES) != 0);
|
||||
|
||||
if(isClientRequestingVBVSizes && !isRequestingVBVSizesSupported) {
|
||||
debug_printf("[d3d12_video_encoder] WARNING: Requested D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_VBV_SIZES with VBVCapacity (bits): %ld and InitialVBVFullness (bits) %ld is not supported, will continue encoding unsetting this feature as fallback.\n",
|
||||
debug_printf("[d3d12_video_encoder] WARNING: Requested D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_VBV_SIZES with VBVCapacity (bits): %" PRIu64 " and InitialVBVFullness (bits) %" PRIu64 " is not supported, will continue encoding unsetting this feature as fallback.\n",
|
||||
pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Config.m_Configuration_CBR.VBVCapacity,
|
||||
pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Config.m_Configuration_CBR.InitialVBVFullness);
|
||||
|
||||
|
|
@ -658,7 +658,7 @@ bool d3d12_video_encoder_negotiate_requested_features_and_d3d12_driver_caps(stru
|
|||
bool isClientRequestingPeakFrameSize = ((pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Flags & D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_MAX_FRAME_SIZE) != 0);
|
||||
|
||||
if(isClientRequestingPeakFrameSize && !isRequestingPeakFrameSizeSupported) {
|
||||
debug_printf("[d3d12_video_encoder] WARNING: Requested D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_MAX_FRAME_SIZE with MaxFrameBitSize %ld but the feature is not supported, will continue encoding unsetting this feature as fallback.\n",
|
||||
debug_printf("[d3d12_video_encoder] WARNING: Requested D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_MAX_FRAME_SIZE with MaxFrameBitSize %" PRIu64 " but the feature is not supported, will continue encoding unsetting this feature as fallback.\n",
|
||||
pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Config.m_Configuration_VBR.MaxFrameBitSize);
|
||||
|
||||
pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Flags &= ~D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_MAX_FRAME_SIZE;
|
||||
|
|
@ -1461,7 +1461,7 @@ d3d12_video_encoder_get_feedback(struct pipe_video_codec *codec, void *feedback,
|
|||
|
||||
// Read metadata from encoderMetadata
|
||||
if (encoderMetadata.EncodeErrorFlags != D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAG_NO_ERROR) {
|
||||
debug_printf("[d3d12_video_encoder] Encode GPU command failed - EncodeErrorFlags: %ld\n",
|
||||
debug_printf("[d3d12_video_encoder] Encode GPU command failed - EncodeErrorFlags: %" PRIu64 "\n",
|
||||
encoderMetadata.EncodeErrorFlags);
|
||||
*size = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ d3d12_video_encoder_update_current_rate_control_h264(struct d3d12_video_encoder
|
|||
*/
|
||||
if (D3D12_VIDEO_ENC_CBR_FORCE_VBV_EQUAL_BITRATE) {
|
||||
debug_printf("[d3d12_video_encoder_h264] d3d12_video_encoder_update_current_rate_control_h264 D3D12_VIDEO_ENC_CBR_FORCE_VBV_EQUAL_BITRATE environment variable is set, "
|
||||
", forcing VBV Size = Target Bitrate = %ld (bits)\n", pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Config.m_Configuration_CBR.TargetBitRate);
|
||||
", forcing VBV Size = Target Bitrate = %" PRIu64 " (bits)\n", pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Config.m_Configuration_CBR.TargetBitRate);
|
||||
pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Flags |=
|
||||
D3D12_VIDEO_ENCODER_RATE_CONTROL_FLAG_ENABLE_VBV_SIZES;
|
||||
pD3D12Enc->m_currentEncodeConfig.m_encoderRateControlDesc.m_Config.m_Configuration_CBR.VBVCapacity =
|
||||
|
|
|
|||
|
|
@ -252,8 +252,8 @@ d3d12_texture_array_dpb_manager::get_new_tracked_picture_allocation()
|
|||
}
|
||||
|
||||
if (!bAvailableResourceInPool) {
|
||||
debug_printf("[d3d12_texture_array_dpb_manager] ID3D12Resource pool is full - Pool capacity (%ld) - Returning null allocation",
|
||||
m_ResourcesPool.size());
|
||||
debug_printf("[d3d12_texture_array_dpb_manager] ID3D12Resource pool is full - Pool capacity (%" PRIu32 ") - Returning null allocation",
|
||||
static_cast<uint32_t>(m_ResourcesPool.size()));
|
||||
}
|
||||
|
||||
return freshAllocation;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue