Mesa (main): dxil: Fixes warning about comparing different enum value and enum literal
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 12:23:41 UTC 2022
Module: Mesa
Branch: main
Commit: beaaa84cea85e3accdc51a5b31f2a7b9a16671a3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=beaaa84cea85e3accdc51a5b31f2a7b9a16671a3
Author: Yonggang Luo <luoyonggang at gmail.com>
Date: Sat May 7 09:31:20 2022 +0800
dxil: Fixes warning about comparing different enum value and enum literal
warnings:
../../src/microsoft/spirv_to_dxil/spirv_to_dxil.c: In function 'spirv_to_dxil':
../../src/microsoft/spirv_to_dxil/spirv_to_dxil.c:101:14: warning: comparison between 'dxil_spirv_shader_stage' and 'enum <anonymous>' [-Wenum-compare]
101 | if (stage == MESA_SHADER_NONE || stage == MESA_SHADER_KERNEL)
| ^~
../../src/microsoft/spirv_to_dxil/spirv_to_dxil.c:101:43: warning: comparison between 'dxil_spirv_shader_stage' and 'enum <anonymous>' [-Wenum-compare]
101 | if (stage == MESA_SHADER_NONE || stage == MESA_SHADER_KERNEL)
| ^~
Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16671>
---
src/microsoft/spirv_to_dxil/spirv_to_dxil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
index 49d12fb0864..b00140fd80c 100644
--- a/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
+++ b/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
@@ -98,7 +98,7 @@ spirv_to_dxil(const uint32_t *words, size_t word_count,
const struct dxil_spirv_runtime_conf *conf,
struct dxil_spirv_object *out_dxil)
{
- if (stage == MESA_SHADER_NONE || stage == MESA_SHADER_KERNEL)
+ if (stage == DXIL_SPIRV_SHADER_NONE || stage == DXIL_SPIRV_SHADER_KERNEL)
return false;
struct spirv_to_nir_options spirv_opts = {
More information about the mesa-commit
mailing list