From: Kenneth Graunke Date: Wed, 13 Jan 2016 23:23:48 +0000 (-0800) Subject: i965: Make an is_scalar boolean in brw_compile_gs(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa7135107f462fad8cda4731c037e393041e9369;p=mesa.git i965: Make an is_scalar boolean in brw_compile_gs(). Shorter than compiler->scalar_stage[MESA_SHADER_GEOMETRY], which can help with line-wrapping. Signed-off-by: Kenneth Graunke Reviewed-by: Jason Ekstrand Reviewed-by: Iago Toral Quiroga --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp index 3f30f5b92d1..183fe3509f2 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp @@ -594,11 +594,11 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data, memset(&c, 0, sizeof(c)); c.key = *key; + const bool is_scalar = compiler->scalar_stage[MESA_SHADER_GEOMETRY]; nir_shader *shader = nir_shader_clone(mem_ctx, src_shader); shader = brw_nir_apply_sampler_key(shader, compiler->devinfo, &key->tex, - compiler->scalar_stage[MESA_SHADER_GEOMETRY]); - shader = brw_postprocess_nir(shader, compiler->devinfo, - compiler->scalar_stage[MESA_SHADER_GEOMETRY]); + is_scalar); + shader = brw_postprocess_nir(shader, compiler->devinfo, is_scalar); prog_data->include_primitive_id = (shader->info.inputs_read & VARYING_BIT_PRIMITIVE_ID) != 0; @@ -807,7 +807,7 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data, brw_print_vue_map(stderr, &prog_data->base.vue_map); } - if (compiler->scalar_stage[MESA_SHADER_GEOMETRY]) { + if (is_scalar) { /* TODO: Support instanced GS. We have basically no tests... */ assert(prog_data->invocations == 1);