Mesa (main): d3d12: add missing cmath includes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 23 14:09:11 UTC 2022


Module: Mesa
Branch: main
Commit: 849ebe3057a7f47614f1ae6c26a5380c04f135d3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=849ebe3057a7f47614f1ae6c26a5380c04f135d3

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri May 20 14:38:46 2022 +0200

d3d12: add missing cmath includes

If we want to use the std:: version of the math functions, we need to
include <cmath>.

Fixes: b171a6baa21 ("d3d12: Add video encode implementation of pipe_video_codec")
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16636>

---

 src/gallium/drivers/d3d12/d3d12_video_dec_h264.cpp                      | 2 ++
 src/gallium/drivers/d3d12/d3d12_video_enc.cpp                           | 2 ++
 src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp                      | 2 ++
 .../drivers/d3d12/d3d12_video_encoder_bitstream_builder_h264.cpp        | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/src/gallium/drivers/d3d12/d3d12_video_dec_h264.cpp b/src/gallium/drivers/d3d12/d3d12_video_dec_h264.cpp
index 41bf2e5bfae..e0bc13c6a7c 100644
--- a/src/gallium/drivers/d3d12/d3d12_video_dec_h264.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_video_dec_h264.cpp
@@ -24,6 +24,8 @@
 #include "d3d12_video_dec.h"
 #include "d3d12_video_dec_h264.h"
 
+#include <cmath>
+
 void
 d3d12_video_decoder_refresh_dpb_active_references_h264(struct d3d12_video_decoder *pD3D12Dec)
 {
diff --git a/src/gallium/drivers/d3d12/d3d12_video_enc.cpp b/src/gallium/drivers/d3d12/d3d12_video_enc.cpp
index 9f962ee8c0f..ddf232cc702 100644
--- a/src/gallium/drivers/d3d12/d3d12_video_enc.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_video_enc.cpp
@@ -48,6 +48,8 @@
 #include "util/u_memory.h"
 #include "util/u_video.h"
 
+#include <cmath>
+
 /**
  * flush any outstanding command buffers to the hardware
  * should be called before a video_buffer is acessed by the gallium frontend again
diff --git a/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp b/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp
index 226c7bf13bc..5cdb84f5cbf 100644
--- a/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp
@@ -27,6 +27,8 @@
 #include "d3d12_screen.h"
 #include "d3d12_format.h"
 
+#include <cmath>
+
 void
 d3d12_video_encoder_update_current_rate_control_h264(struct d3d12_video_encoder *pD3D12Enc,
                                                      pipe_h264_enc_picture_desc *picture)
diff --git a/src/gallium/drivers/d3d12/d3d12_video_encoder_bitstream_builder_h264.cpp b/src/gallium/drivers/d3d12/d3d12_video_encoder_bitstream_builder_h264.cpp
index f67ed9e3904..b8e133d8448 100644
--- a/src/gallium/drivers/d3d12/d3d12_video_encoder_bitstream_builder_h264.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_video_encoder_bitstream_builder_h264.cpp
@@ -23,6 +23,8 @@
 
 #include "d3d12_video_encoder_bitstream_builder_h264.h"
 
+#include <cmath>
+
 inline H264_SPEC_PROFILES
 Convert12ToSpecH264Profiles(D3D12_VIDEO_ENCODER_PROFILE_H264 profile12)
 {



More information about the mesa-commit mailing list