[Mesa-dev] [PATCH] i965: Write at least some data in SIMD8 URB write messages.

Jordan Justen jordan.l.justen at intel.com
Fri Jun 26 16:15:46 PDT 2015


On 2015-06-26 15:18:52, Kenneth Graunke wrote:
> According to the "URB SIMD8 Write > Write Data Payload" documentation,
> "The write data payload can be between 1 and 8 message phases long."

Would a more precise PRM ref location be possible?

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

> Apparently, the simulator considers it an error if you issue an URB
> SIMD8 message with only a header and no actual data to write.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index 9a4bad6..7074b5c 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -1800,14 +1800,13 @@ fs_visitor::emit_urb_writes(gl_clip_plane *clip_planes)
>     /* If we don't have any valid slots to write, just do a minimal urb write
>      * send to terminate the shader. */
>     if (vue_map->slots_valid == 0) {
> -
> -      fs_reg payload = fs_reg(GRF, alloc.allocate(1), BRW_REGISTER_TYPE_UD);
> +      fs_reg payload = fs_reg(GRF, alloc.allocate(2), BRW_REGISTER_TYPE_UD);
>        bld.exec_all().MOV(payload, fs_reg(retype(brw_vec8_grf(1, 0),
>                                                  BRW_REGISTER_TYPE_UD)));
>  
>        fs_inst *inst = bld.emit(SHADER_OPCODE_URB_WRITE_SIMD8, reg_undef, payload);
>        inst->eot = true;
> -      inst->mlen = 1;
> +      inst->mlen = 2;
>        inst->offset = 1;
>        return;
>     }
> -- 
> 1.7.10.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