[Mesa-dev] [PATCH] i965: Add an option to not generate the SIMD8 fragment shader

Kristian Høgsberg krh at bitplanet.net
Fri Jul 11 12:01:35 PDT 2014


On Fri, Jul 11, 2014 at 11:35 AM, Matt Turner <mattst88 at gmail.com> wrote:
> On Fri, Jul 11, 2014 at 11:26 AM, Kristian Høgsberg <krh at bitplanet.net> wrote:
>> For now, this can only be triggered with a new 'no8' INTEL_DEBUG option
>>
>> Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
>> ---
>>  src/mesa/drivers/dri/i965/brw_context.h   |  2 ++
>>  src/mesa/drivers/dri/i965/brw_fs.cpp      | 14 ++++++++++++--
>>  src/mesa/drivers/dri/i965/gen7_wm_state.c |  4 ++--
>>  src/mesa/drivers/dri/i965/gen8_ps_state.c |  4 ++--
>>  src/mesa/drivers/dri/i965/intel_debug.c   |  1 +
>>  src/mesa/drivers/dri/i965/intel_debug.h   |  1 +
>>  6 files changed, 20 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
>> index 2943a20..11cea04 100644
>> --- a/src/mesa/drivers/dri/i965/brw_context.h
>> +++ b/src/mesa/drivers/dri/i965/brw_context.h
>> @@ -340,6 +340,7 @@ struct brw_wm_prog_data {
>>        /** @} */
>>     } binding_table;
>>
>> +   bool no_8;
>>     bool dual_src_blend;
>>     bool uses_pos_offset;
>>     bool uses_omask;
>> @@ -1039,6 +1040,7 @@ struct brw_context
>>     bool has_compr4;
>>     bool has_negative_rhw_bug;
>>     bool has_pln;
>> +   bool no_simd8;
>
> I don't think you need this? These bools are for device-specific features.

Right, not for this patch.  It's there for compiling the replicated
write shader I'm using in the fast clear work, but it's not used here.

>>
>>     /**
>>      * Some versions of Gen hardware don't do centroid interpolation correctly
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> index a3ad375..f018d94 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> @@ -3258,15 +3258,25 @@ brw_wm_fs_emit(struct brw_context *brw,
>>        }
>>     }
>>
>> +   exec_list *simd8_instructions;
>> +   int no_simd8 = (INTEL_DEBUG & DEBUG_NO8) || brw->no_simd8;
>> +   if (no_simd8 && simd16_instructions) {
>
> ... it's only used here.


More information about the mesa-dev mailing list