mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
brw: avoid invalid URB messages
Some new CTS tests have geometry shader looking like this :
void main()
{
gl_Position = gl_in[0].gl_Position;
EmitVertex();
EndPrimitive();
// <-- some storage buffer write
}
The generate shader has :
- a message to write the position
- a message to write to the storage buffer
- a final message to end the thread
This generates an empty EOT URB messages which is apparently not legal
(simulation complains, HW hangs) :
send(8) nullUD g126UD nullUD 0x04088007 0x00000000
urb MsgDesc: offset 0 SIMD8 write masked mlen 2 ex_mlen 0 rlen 0 { align1 1Q A@1 EOT };
Instead emit a write with actual data and the mask set at 0 to discard
the effect :
mov(8) g127<1>UD 0x00000000UD { align1 WE_all 1Q };
mov(8) g125<1>UD 0x00000000UD { align1 1Q };
send(8) nullUD g126UD g125UD 0x04088007 0x00000040
urb MsgDesc: offset 0 SIMD8 write masked mlen 2 ex_mlen 1 rlen 0 { align1 1Q A@1 EOT };
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38243>
This commit is contained in:
parent
34fe598b39
commit
ff57c31696
1 changed files with 3 additions and 1 deletions
|
|
@ -52,8 +52,10 @@ brw_emit_gs_thread_end(brw_shader &s)
|
||||||
|
|
||||||
brw_reg srcs[URB_LOGICAL_NUM_SRCS];
|
brw_reg srcs[URB_LOGICAL_NUM_SRCS];
|
||||||
srcs[URB_LOGICAL_SRC_HANDLE] = s.gs_payload().urb_handles;
|
srcs[URB_LOGICAL_SRC_HANDLE] = s.gs_payload().urb_handles;
|
||||||
|
srcs[URB_LOGICAL_SRC_DATA] = brw_imm_ud(0);
|
||||||
|
srcs[URB_LOGICAL_SRC_CHANNEL_MASK] = brw_imm_ud(0);
|
||||||
urb = abld.URB_WRITE(srcs, ARRAY_SIZE(srcs));
|
urb = abld.URB_WRITE(srcs, ARRAY_SIZE(srcs));
|
||||||
urb->components = 0;
|
urb->components = 1;
|
||||||
} else {
|
} else {
|
||||||
brw_reg srcs[URB_LOGICAL_NUM_SRCS];
|
brw_reg srcs[URB_LOGICAL_NUM_SRCS];
|
||||||
srcs[URB_LOGICAL_SRC_HANDLE] = s.gs_payload().urb_handles;
|
srcs[URB_LOGICAL_SRC_HANDLE] = s.gs_payload().urb_handles;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue