On 04/08/2013 11:17 AM, Paul Berry wrote:
On 8 April 2013 10:37, Ian Romanick <i...@freedesktop.org
<mailto:i...@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").

I suspected it was something like that.

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?

It's up to you.  I think the code in your patch is okay for now.

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to