diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 225df2d04e6..f9744fe8ab7 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -8940,7 +8940,7 @@ fs_visitor::allocate_registers(bool allow_spilling) prog_data->total_scratch = MAX2(brw_get_scratch_size(last_scratch), prog_data->total_scratch); - if (stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL) { + if (gl_shader_stage_is_compute(stage)) { if (devinfo->platform == INTEL_PLATFORM_HSW) { /* According to the MEDIA_VFE_STATE's "Per Thread Scratch Space" * field documentation, Haswell supports a minimum of 2kB of @@ -9304,7 +9304,7 @@ fs_visitor::run_fs(bool allow_spilling, bool do_rep_send) bool fs_visitor::run_cs(bool allow_spilling) { - assert(stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL); + assert(gl_shader_stage_is_compute(stage)); setup_cs_payload(); diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index cf5126e64f6..e8faa29e00d 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -108,8 +108,7 @@ fs_visitor::nir_setup_uniforms() uniforms = nir->num_uniforms / 4; - if ((stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL) && - devinfo->verx10 < 125) { + if (gl_shader_stage_is_compute(stage) && devinfo->verx10 < 125) { /* Add uniforms for builtins after regular NIR uniforms. */ assert(uniforms == prog_data->nr_params);