[Mesa-dev] [PATCH] i965: Fix INTEL_DEBUG=shader_time for SIMD8 VS (and GS).

Francisco Jerez currojerez at riseup.net
Thu Feb 5 01:44:21 PST 2015


Kenneth Graunke <kenneth at whitecape.org> writes:

> On Thursday, January 15, 2015 02:05:18 AM Kenneth Graunke wrote:
>> We were incorrectly attributing VS time to FS8 on Gen8+, which now use
>> fs_visitor for vertex shaders.
>> 
>> We don't hit this for geometry shaders yet, but we may as well add
>> support now - the fix is obvious, and we'll just forget later.
>> 
>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>> ---
>>  src/mesa/drivers/dri/i965/brw_fs.cpp | 34 +++++++++++++++++++++++++---------
>>  1 file changed, 25 insertions(+), 9 deletions(-)
>> 
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> index cbe4fda..aca5066 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> @@ -728,15 +728,31 @@ fs_visitor::emit_shader_time_end()
>>     current_annotation = "shader time end";
>>  
>>     enum shader_time_shader_type type, written_type, reset_type;
>> -   if (dispatch_width == 8) {
>> -      type = ST_FS8;
>> -      written_type = ST_FS8_WRITTEN;
>> -      reset_type = ST_FS8_RESET;
>> -   } else {
>> -      assert(dispatch_width == 16);
>> -      type = ST_FS16;
>> -      written_type = ST_FS16_WRITTEN;
>> -      reset_type = ST_FS16_RESET;
>> +   switch (stage) {
>> +   case MESA_SHADER_VERTEX:
>> +      type = ST_VS;
>> +      written_type = ST_VS_WRITTEN;
>> +      reset_type = ST_VS_RESET;
>> +      break;
>> +   case MESA_SHADER_GEOMETRY:
>> +      type = ST_GS;
>> +      written_type = ST_GS_WRITTEN;
>> +      reset_type = ST_GS_RESET;
>> +      break;
>> +   case MESA_SHADER_FRAGMENT:
>> +      if (dispatch_width == 8) {
>> +         type = ST_FS8;
>> +         written_type = ST_FS8_WRITTEN;
>> +         reset_type = ST_FS8_RESET;
>> +      } else {
>> +         assert(dispatch_width == 16);
>> +         type = ST_FS16;
>> +         written_type = ST_FS16_WRITTEN;
>> +         reset_type = ST_FS16_RESET;
>> +      }
>> +      break;
>> +   default:
>> +      unreachable("fs_visitor::emit_shader_time_end missing code");
>>     }
>>  
>>     fs_reg shader_end_time = get_timestamp();
>> 
>
> Hmm.  I don't think this patch ever landed, and I don't see any review.
> Any comments?  Otherwise, I'll probably push it...shader_time isn't much
> use on Gen8+ without it.


Looks reasonable to me,
Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150205/993e1da8/attachment.sig>


More information about the mesa-dev mailing list