brw/emit: Fix BROADCAST when value is uniform and index is immediate
Fixes: c74511f5dc
("i965: Introduce the BROADCAST pseudo-opcode.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Tried-to-help-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32668>
This commit is contained in:
@@ -1936,7 +1936,7 @@ brw_broadcast(struct brw_codegen *p,
|
||||
* We will typically not get here if the optimizer is doing its job, but
|
||||
* asserting would be mean.
|
||||
*/
|
||||
const unsigned i = idx.file == IMM ? idx.ud : 0;
|
||||
const unsigned i = (src.vstride == 0 && src.hstride == 0) ? 0 : idx.ud;
|
||||
src = stride(suboffset(src, i), 0, 1, 0);
|
||||
|
||||
if (brw_type_size_bytes(src.type) > 4 && !devinfo->has_64bit_int) {
|
||||
|
Reference in New Issue
Block a user