[Mesa-dev] [PATCH 0/2] radv/query: Use 1-bit booleans in query shaders
Rhys Perry
pendingchaos02 at gmail.com
Wed Dec 19 21:54:24 UTC 2018
You missed this change (or something functionally similar):
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index e7bb81489f6..5d35af05579 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -630,8 +630,8 @@ build_tfb_query_shader(struct radv_device *device)
avails[1] = nir_iand(&b, nir_channel(&b, &load2->dest.ssa, 1),
nir_channel(&b, &load2->dest.ssa, 3));
nir_ssa_def *result_is_available =
- nir_iand(&b, nir_iand(&b, avails[0], avails[1]),
- nir_imm_int(&b, 0x80000000));
+ nir_i2b(&b, nir_iand(&b, nir_iand(&b, avails[0], avails[1]),
+ nir_imm_int(&b, 0x80000000)));
/* Only compute result if available. */
nir_if *available_if = nir_if_create(b.shader);
Other than that, this looks fine and seems to work correctly on my Vega.
With that change (and for what it's worth), this is:
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
On Wed, 19 Dec 2018 at 19:45, Jason Ekstrand <jason at jlekstrand.net> wrote:
>
> When we switched over to 1-bit booleans, the radv query shaders ended up
> still using 32-bit booleans for most stuff. While this is technically
> valid from an IR perspective, most of the NIR passes don't really support
> 32-bit booleans correctly anymore now that we've moved to 1-bit. This tiny
> series attempts to convert the radv query shaders over to using 1-bit
> Booleans.
>
> I've only compile-tested it and read through it a couple times but am not
> really set up for testing radv. I would very much appreciate if someone
> more familiar with radv could review and test these patches (and possibly
> rewrite them if appropriate).
>
> Cc: Dave Airlie <airlied at redhat.com>
> Cc: Timothy Arceri <tarceri at itsqueeze.com>
> Cc: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
>
> Jason Ekstrand (2):
> radv/query: Add a nir_flag_set helper
> radv/query: Use 1-bit booleans in query shaders
>
> src/amd/vulkan/radv_query.c | 67 +++++++++++++++++++------------------
> 1 file changed, 34 insertions(+), 33 deletions(-)
>
> --
> 2.19.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list