[Mesa-dev] [PATCH 2/3] i965: Add forgotten multi-stream code to Gen8 SOL state.

Pohjolainen, Topi topi.pohjolainen at intel.com
Sun Apr 5 00:51:39 PDT 2015


On Sat, Apr 04, 2015 at 03:46:32AM -0700, Kenneth Graunke wrote:
> Fixes Piglit's arb_gpu_shader5-xfb-streams-without-invocations.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/mesa/drivers/dri/i965/gen8_sol_state.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen8_sol_state.c b/src/mesa/drivers/dri/i965/gen8_sol_state.c
> index 1f122ec..d98a226 100644
> --- a/src/mesa/drivers/dri/i965/gen8_sol_state.c
> +++ b/src/mesa/drivers/dri/i965/gen8_sol_state.c
> @@ -128,6 +128,15 @@ gen8_upload_3dstate_streamout(struct brw_context *brw, bool active,
>        dw2 |= urb_entry_read_offset << SO_STREAM_0_VERTEX_READ_OFFSET_SHIFT;
>        dw2 |= (urb_entry_read_length - 1) << SO_STREAM_0_VERTEX_READ_LENGTH_SHIFT;
>  
> +      dw2 |= urb_entry_read_offset << SO_STREAM_1_VERTEX_READ_OFFSET_SHIFT;

Can we use SET_FIELD() instead? I know the original code isn't using it
either but I thought we aimed in some point moving to using it instead:

         dw2 |= SET_FIELD(urb_entry_read_offset, SO_STREAM_0_VERTEX_READ_OFFSET);

> +      dw2 |= (urb_entry_read_length - 1) << SO_STREAM_1_VERTEX_READ_LENGTH_SHIFT;
> +
> +      dw2 |= urb_entry_read_offset << SO_STREAM_2_VERTEX_READ_OFFSET_SHIFT;
> +      dw2 |= (urb_entry_read_length - 1) << SO_STREAM_2_VERTEX_READ_LENGTH_SHIFT;
> +
> +      dw2 |= urb_entry_read_offset << SO_STREAM_3_VERTEX_READ_OFFSET_SHIFT;
> +      dw2 |= (urb_entry_read_length - 1) << SO_STREAM_3_VERTEX_READ_LENGTH_SHIFT;
> +
>        /* Set buffer pitches; 0 means unbound. */
>        if (xfb_obj->Buffers[0])
>           dw3 |= linked_xfb_info->BufferStride[0] * 4;
> -- 
> 2.3.4
> 
> _______________________________________________
> 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