From: Jason Ekstrand Date: Fri, 21 Aug 2020 16:31:18 +0000 (-0500) Subject: iris: Normalize all compute shaders to MESA_SHADER_COMPUTE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4b39b802bda1a9cc91ee3192c8c23c9eba2e155;p=mesa.git iris: Normalize all compute shaders to MESA_SHADER_COMPUTE Reviewed-by: Kenneth Graunke Part-of: --- 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;