[Mesa-dev] [PATCH 06/22] vtn: handle SpvExecutionModelKernel
Karol Herbst
kherbst at redhat.com
Tue Nov 13 15:48:10 UTC 2018
Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
src/compiler/spirv/spirv_to_nir.c | 3 +++
src/compiler/spirv/vtn_private.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 2c214324774..650eb6a977c 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -3318,6 +3318,9 @@ stage_for_execution_model(struct vtn_builder *b, SpvExecutionModel model)
return MESA_SHADER_FRAGMENT;
case SpvExecutionModelGLCompute:
return MESA_SHADER_COMPUTE;
+ case SpvExecutionModelKernel:
+ b->kernel_mode = true;
+ return MESA_SHADER_COMPUTE;
default:
vtn_fail("Unsupported execution model");
}
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
index 643a88d1abe..df6356f50fe 100644
--- a/src/compiler/spirv/vtn_private.h
+++ b/src/compiler/spirv/vtn_private.h
@@ -605,6 +605,8 @@ struct vtn_builder {
unsigned func_param_idx;
bool has_loop_continue;
+
+ bool kernel_mode;
};
nir_ssa_def *
--
2.19.1
More information about the mesa-dev
mailing list