summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-08-21 11:31:18 -0500
committerMarge Bot <eric+marge@anholt.net>2020-08-21 22:49:54 +0000
commitb4b39b802bda1a9cc91ee3192c8c23c9eba2e155 (patch)
tree1e1c4d13fafb20467eb62af8dfecf3c973ec80af
parentd0a8ad77e99385175b8266f4dc4d66dd2baa85e7 (diff)
iris: Normalize all compute shaders to MESA_SHADER_COMPUTE
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6405>
-rw-r--r--src/gallium/drivers/iris/iris_disk_cache.c1
-rw-r--r--src/gallium/drivers/iris/iris_program.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_disk_cache.c b/src/gallium/drivers/iris/iris_disk_cache.c
index 47da9e670e6..0383512b295 100644
--- a/src/gallium/drivers/iris/iris_disk_cache.c
+++ b/src/gallium/drivers/iris/iris_disk_cache.c
@@ -132,7 +132,6 @@ static const enum iris_program_cache_id cache_id_for_stage[] = {
[MESA_SHADER_GEOMETRY] = IRIS_CACHE_GS,
[MESA_SHADER_FRAGMENT] = IRIS_CACHE_FS,
[MESA_SHADER_COMPUTE] = IRIS_CACHE_CS,
- [MESA_SHADER_KERNEL] = IRIS_CACHE_CS,
};
/**
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index 7d63bc185e0..bdad2abcf70 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -2415,6 +2415,14 @@ iris_create_compute_state(struct pipe_context *ctx,
unreachable("Unsupported IR");
}
+ /* Most of iris doesn't really care about the difference between compute
+ * shaders and kernels. We also tend to hard-code COMPUTE everywhere so
+ * it's way easier if we just normalize to COMPUTE here.
+ */
+ assert(nir->info.stage == MESA_SHADER_COMPUTE ||
+ nir->info.stage == MESA_SHADER_KERNEL);
+ nir->info.stage = MESA_SHADER_COMPUTE;
+
struct iris_uncompiled_shader *ish =
iris_create_uncompiled_shader(ctx, nir, NULL);
ish->kernel_input_size = state->req_input_mem;