summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2022-05-19 09:37:07 +0800
committerMarge Bot <emma+marge@anholt.net>2022-06-23 09:27:06 +0000
commit6b181fe1b2e0c188d8a4175c91d31ab2420c6e7c (patch)
tree45e7451b5be8cf5455433f825e489112592b167e
parentdeb36dc6c2e52a428db55b6d8fefbe1011288862 (diff)
d3d12: Use static_cast instead of dynamic_cast in d3d12_video_enc_h264.cpp
Because we may compile mesa with both rtti=enabled and rtti=disabled because of LLVM Fixes errors: ../../src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp:777:7: error: 'dynamic_cast' not permitted with '-fno-rtti' 777 | dynamic_cast<d3d12_video_bitstream_builder_h264 *>(pD3D12Enc->m_upBitstreamBuilder.get()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>
-rw-r--r--src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp b/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp
index 5cdb84f5cbf..3ceceb12dae 100644
--- a/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp
@@ -113,7 +113,7 @@ d3d12_video_encoder_update_current_frame_pic_params_info_h264(struct d3d12_video
{
struct pipe_h264_enc_picture_desc *h264Pic = (struct pipe_h264_enc_picture_desc *) picture;
d3d12_video_bitstream_builder_h264 *pH264BitstreamBuilder =
- dynamic_cast<d3d12_video_bitstream_builder_h264 *>(pD3D12Enc->m_upBitstreamBuilder.get());
+ static_cast<d3d12_video_bitstream_builder_h264 *>(pD3D12Enc->m_upBitstreamBuilder.get());
assert(pH264BitstreamBuilder != nullptr);
bUsedAsReference = !h264Pic->not_referenced;
@@ -774,7 +774,7 @@ d3d12_video_encoder_build_codec_headers_h264(struct d3d12_video_encoder *pD3D12E
D3D12_VIDEO_ENCODER_SEQUENCE_CONTROL_FLAG_RESOLUTION_CHANGE) != 0);
d3d12_video_bitstream_builder_h264 *pH264BitstreamBuilder =
- dynamic_cast<d3d12_video_bitstream_builder_h264 *>(pD3D12Enc->m_upBitstreamBuilder.get());
+ static_cast<d3d12_video_bitstream_builder_h264 *>(pD3D12Enc->m_upBitstreamBuilder.get());
assert(pH264BitstreamBuilder);
uint32_t active_seq_parameter_set_id = pH264BitstreamBuilder->get_active_sps_id();