diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2022-06-23 16:32:12 +0200 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-06-28 15:53:29 -0700 |
commit | 7aabd4165550664333d95bfdb7b1f9a589df21cc (patch) | |
tree | 08863b30b442df73a775831c5bb853c555da7926 | |
parent | d11aac344356525a16af882d856d9b578bb6c002 (diff) |
nir/serialize: Support texop >= 16
Extend the packed_instr struct to support texops above
nir_texop_fragment_fetch_amd.
Fixes: 603e6ba972da ("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 370ca07482a29847b1de60bd71963b307de4f48b)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_serialize.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/.pick_status.json b/.pick_status.json index fb1850b079f..fed61ebc53e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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" }, diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c index 6e1a8dd12b4..73bf7cd44e9 100644 --- a/src/compiler/nir/nir_serialize.c +++ b/src/compiler/nir/nir_serialize.c @@ -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; |