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

Jordan Justen jljusten at gmail.com
Sun Apr 7 18:34:28 PDT 2013


On Sun, Apr 7, 2013 at 6:42 AM, Paul Berry <stereotype441 at gmail.com> 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.
> ---
>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> index 8bd2fd8..ca1cfe8 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> @@ -2664,10 +2664,8 @@ vec4_visitor::emit_urb_writes()
>           emit_urb_slot(mrf++, c->prog_data.vue_map.slot_to_varying[slot]);
>        }

Regarding partially visible loop just above, how about adding a comment like:
"Emit URBs until eot"

>
> -      if (eot) {
> -         if (INTEL_DEBUG & DEBUG_SHADER_TIME)
> -            emit_shader_time_end();
> -      }
> +      if (INTEL_DEBUG & DEBUG_SHADER_TIME)
> +         emit_shader_time_end();

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

>
>        current_annotation = "URB write";
>        inst = emit(VS_OPCODE_URB_WRITE);
> --
> 1.8.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list