nir/serialize: Support texop >= 16

Extend the packed_instr struct to support texops above
nir_texop_fragment_fetch_amd.

Fixes: 603e6ba972 ("nir: add two new texture ops for multisample fragment color/mask fetches")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17186>
(cherry picked from commit 370ca07482)
This commit is contained in:
Boris Brezillon 2022-06-23 16:32:12 +02:00 committed by Dylan Baker
parent d11aac3443
commit 7aabd41655
2 changed files with 4 additions and 4 deletions

View file

@ -454,7 +454,7 @@
"description": "nir/serialize: Support texop >= 16",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "603e6ba972dae06fe0a198fc00b6aa4a0a33d479"
},

View file

@ -663,8 +663,8 @@ union packed_instr {
struct {
unsigned instr_type:4;
unsigned num_srcs:4;
unsigned op:4;
unsigned _pad:12;
unsigned op:5;
unsigned _pad:11;
unsigned dest:8;
} tex;
struct {
@ -1498,7 +1498,7 @@ static void
write_tex(write_ctx *ctx, const nir_tex_instr *tex)
{
assert(tex->num_srcs < 16);
assert(tex->op < 16);
assert(tex->op < 32);
union packed_instr header;
header.u32 = 0;