[Mesa-dev] [PATCH] i965/vs: Fix DEBUG_SHADER_TIME when VS terminates with 2 URB writes.

Paul Berry stereotype441 at gmail.com
Mon Apr 8 11:17:43 PDT 2013


On 8 April 2013 10:37, Ian Romanick <idr at freedesktop.org> wrote:

> On 04/07/2013 06:42 AM, Paul Berry wrote:
>
>> The call to emit_shader_time_end() before the second URB write was
>> conditioned with "if (eot)", but eot is always false in this code
>> path, so emit_shader_time_end() was never being called for vertex
>> shaders that performed 2 URB writes.
>>
>
> I had to look at that code for way to long to convince myself that your
> patch was correct.  I think it might be better to remove both the
> conditional emit_shader_time_end calls and put this block of code at the
> very bottom (unless emit_shader_time_end has some side effect that I don't
> see):
>
>    if (inst->eot) {
>       if (INTEL_DEBUG & DEBUG_SHADER_TIME)
>          emit_shader_time_end();
>    }
>
> Or does the last URB write have to be the last instruction?


The last URB write has to be the last instruction, since it's actually the
URB write that ends the thread ("eot" stands for "end of thread").

For GL 3.2 we're going to need to refactor this function to use a loop,
since GL 3.2 doubles the number of varying components permitted for VS->GS
linkage (so we'll need up to 4 URB writes instead of 2).  I think once that
change is made the function is going to be a lot easier to follow.  Maybe I
should just do that refactor now?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130408/557373aa/attachment.html>


More information about the mesa-dev mailing list