Jason Ekstrand
25249e8be2
nir/lower_blend: Expand or shrink output variables as needed
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309 >
2022-05-11 14:47:33 +00:00
Jason Ekstrand
1d22465362
nir/builder: Add a nir_resize_vector helper
...
We're about to use this a couple of places.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309 >
2022-05-11 14:47:33 +00:00
Jason Ekstrand
352e32e5ba
nir/builder: Add a nir_trim_vector helper
...
This pattern pops up a bunch and the semantics of nir_channels() aren't
very convenient much of the time. Let's add a nir_trim_vector() which
matches nir_pad_vector().
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309 >
2022-05-11 14:47:33 +00:00
Jason Ekstrand
244b654de6
nir/lower_blend: Support SNORM and integer formats for logic ops
...
This fixes 158 of the dEQP-VK.pipeline.logic_op.* tests, once we turn
the feature on.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309 >
2022-05-11 14:47:33 +00:00
Jason Ekstrand
730d2b7660
nir/lower_blend: Stop passing the whole options object around
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309 >
2022-05-11 14:47:33 +00:00
Jason Ekstrand
dcfffdcad1
nir/lower_blend: Be more explicit about deref assumptions
...
Because we pull the RT from the variable location and use that to look
up formats, we need a constant RT index. To deal with arrays (possibly
of arrays), we would either need to handle array derefs (we don't today)
or we need to require the variables to be split into one variable per
RT. Given that we have to lower indirect derefs anyway (to get constant
indices), we may as well require the client to split output variables by
calling nir_lower_io_arrays_to_elements_no_indirect().
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309 >
2022-05-11 14:47:33 +00:00
Michael Skorokhodov
fd75be7986
glsl: Fix ir_quadop_vector validation
...
Some glcts tests have failed due to incorrect processing of `ir_quadop_vector` in
`ir_validation`. e.g:
`GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_geometry`
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6461
Fixes: 23cde71b ("glsl: Stop lowering ir_quadop_vector.")
Reviewed-by: Emma Anholt <emma@anholt.net >
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16420 >
2022-05-10 23:53:33 +00:00
Georg Lehmann
60c9a45562
nir/opt_algebraic: Simple xor/ishr optimizations.
...
The first pattern here removes the xor-swap pattern.
Foz-DB GFX10_3:
Totals from 305 (0.23% of 134913) affected shaders:
CodeSize: 1589040 -> 1585164 (-0.24%)
Instrs: 284344 -> 283375 (-0.34%)
Latency: 4205148 -> 4198472 (-0.16%); split: -0.16%, +0.00%
InvThroughput: 708745 -> 708739 (-0.00%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16411 >
2022-05-10 19:29:31 +00:00
Georg Lehmann
66e917fff6
nir/opt_algebraic: Fix mask in shift by constant combining.
...
The comment above is correct, but the code to calculate the mask was broken.
No Foz-db changes outside of noise.
Fixes: 0e6581b87d ("nir/algebraic: Reassociate shift-by-constant of shift-by-constant")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15990 >
2022-05-10 18:47:21 +00:00
Timur Kristóf
7f189e3467
nir: Add upper bound for AMD shader arg intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13155 >
2022-05-10 17:16:03 +00:00
Jason Ekstrand
aea935264a
shader_info: Bump the number of images and textures supported
...
OpenCL requires up to 128 read-only images and up to 64 write images.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988 >
2022-05-10 11:23:15 -05:00
Jason Ekstrand
b37831c606
nir: Gather samplers_used separately from textures
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988 >
2022-05-10 11:23:12 -05:00
Jason Ekstrand
3c07c3e16d
shader_info: Make images_used a bitset
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988 >
2022-05-10 11:23:11 -05:00
Jason Ekstrand
28f534350c
nir: Stop assuming shader_info::textures_used is 32-bit
...
This isn't a hot path. We don't need to be manually using the
INSIDE_WORD version which will assert if we ever get a bigger texture
index.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988 >
2022-05-10 11:23:07 -05:00
Jason Ekstrand
625b352f14
nir: Set image_buffers and msaa_images in lower_samplers_as_deref
...
This is where we set images_used so it's less likely that things will
accidentally get out-of-sync.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988 >
2022-05-10 11:21:39 -05:00
Jordan Justen
1c3e584dfa
nir/divergence: handle more *_intel intrinsics
...
v2: fix topo/btd (Lionel)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16421 >
2022-05-10 08:49:58 +00:00
Emma Anholt
f3df3d4c80
glsl: Make all drivers take the GLSLOptimizeConservatively path.
...
Now that all consumers of GLSL use NIR, make the remaining drivers take
the path that relies on NIR to really do optimization.
nouveau steam shader-db runtime -6.69631% +/- 1.29235% (n=12).
No change on shader-db there.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16364 >
2022-05-10 05:03:34 +00:00
Karol Herbst
9c5fd100cc
nir: add a nir_remove_non_entrypoints helper
...
This code just got duplicated a lot. There is still more, but the
remaining instances do a bit more than just removing other functions.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16348 >
2022-05-10 03:37:44 +00:00
Jason Ekstrand
4b67d70d22
nir: Fix constant folding for non-32-bit ifind_msb and clz
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16348 >
2022-05-10 03:37:44 +00:00
Emma Anholt
23cde71bb9
glsl: Stop lowering ir_quadop_vector.
...
Now that everybody goes through NIR, glsl_to_nir is happy to handle the
instruction and turn it into nir_op_vec4 instead of going to a temp
variable and back.
No changes on freedreno shader-db.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16363 >
2022-05-09 22:13:31 +00:00
Lionel Landwerlin
35d82ecf1e
nir/lower_shader_calls: put inserted instructions into a dummy block
...
When moving code into the main block or loop blocks, put the code into
its own :
if(true) { ... }
block so that we avoid break/continue/return issues.
v2: Also take care of the main block with return instructions
v3: Make deletion more obvious with dummy if blocks (Jason)
v4: Fixup assert for loops (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 8dfb240b1f ("nir: Add raytracing shader call lowering pass.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16036 >
2022-05-09 08:43:40 +00:00
Lionel Landwerlin
9cf986dcff
nir/lower_shader_calls: don't insert code after break/continue
...
When moving code from below to the insertion cursor point, if the
cursor points to a jump instruction, don't bother inserting the code.
It would break the break/continue assumptions of NIR and would not be
executed anyway.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 8dfb240b1f ("nir: Add raytracing shader call lowering pass.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16036 >
2022-05-09 08:43:40 +00:00
Lionel Landwerlin
51dea59eb4
nir/lower_shader_calls: don't use nop instructions as cursors
...
Stop using nop instructions which are causing issues with
break/continue, instead use a nir_cursor (which brings its share of
pain).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 8dfb240b1f ("nir: Add raytracing shader call lowering pass.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16036 >
2022-05-09 08:43:40 +00:00
Jason Ekstrand
25661ea028
nir/cf: Return a cursor from nir_cf_extract as well
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16036 >
2022-05-09 08:43:40 +00:00
Lionel Landwerlin
d65cf403f3
nir/cf: return cursor after insertion of cf_list
...
This will be useful to cut code from one location and paste it at
another place and later keep pasting after the previous insertions.
v2: update comment (Jason)
deal with stiching 2 empty blocks (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16036 >
2022-05-09 08:43:40 +00:00
Icecream95
ad864a7c15
nir/lower_tex: Copy more fields in lower_tex_to_txd and friends
...
Fixes NIR validation errors for OpenMW on Panfrost.
Fixes: 1f97819fbe ("panfrost: Emulate GL_CLAMP on Bifrost")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15939 >
2022-05-07 10:51:10 +00:00
Mike Blumenkrantz
5c24eb721a
nir/gather_info: flag fbfetch on subpass image loads
...
might not be able to determine which output is being read, but these
are definitely fbfetch uses (from lavapipe)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16346 >
2022-05-06 17:04:34 +00:00
Emma Anholt
dd3179aff0
glsl: Remove unused lower_variable_index_to_cond_assign.
...
It's been replaced by nir_lower_indirect_derefs().
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044 >
2022-05-05 22:25:03 +00:00
Emma Anholt
2529690ee3
glsl: Remove EmitNoLoops and the associated lower_jumps(lower_break=true) code.
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044 >
2022-05-05 22:25:03 +00:00
Emma Anholt
c03cc83ef1
compiler/glsl: Remove the dead parts of build_program_resource_list().
...
These have all moved to NIR linking.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044 >
2022-05-05 22:25:03 +00:00
Emma Anholt
3a42e92a4f
glsl: Drop the dead MOD_TO_FLOOR path.
...
It's now called lower_fmod in NIR.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044 >
2022-05-05 22:25:03 +00:00
Emma Anholt
7f13763690
glsl: Remove the unused lower_if_to_cond_assign.
...
Now that everything goes through NIR, nir_opt_peephole_select has replaced
it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044 >
2022-05-05 22:25:03 +00:00
Emma Anholt
9617184bc2
glsl: Retire the non-NIR GLSL linking paths.
...
Now that we have only GLSL->NIR as a path in the frontend, we can rely on
the NIR linking support.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044 >
2022-05-05 22:25:03 +00:00
Eric Anholt
e566b54a59
glsl: Remove UBO reference lowering.
...
All UBO-supporting drivers now go through the NIR path, which does a
better job of it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8044 >
2022-05-05 22:25:03 +00:00
Georg Lehmann
5833fab766
nir/lower_mediump: Add a new pass to fold 16bit image load/store.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15179 >
2022-05-04 09:58:03 +00:00
Emma Anholt
695587413b
nir: Don't assert on tg4 offset range.
...
From the GL 4.6 spec: "If the value of any non-ignored component of the
offset vector operand is outside implementation-dependent limits, the
results of the texture lookup are undefined." We shouldn't assertion
fail, then.
GLSL-to-NIR shouldn't be enforcing limits on TG4 offsets, since it doesn't
for non-TG4 tex_src_offset either. Leave it up to the driver to handle
it.
Fixes a crash in a piglit test on nouveau that supplies a negative random
number up to 10,000 as the first coordinate for some reason. Other NIR
drivers lowered TG4 explicit offsets to tex_src_offset, so they weren't
affected.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16261 >
2022-05-03 21:45:49 +00:00
Alyssa Rosenzweig
ca280b2283
nir: Don't set writes_memory for reading XFB
...
That's a read, not a write. Fixes optimizations getting disabled for fragment
shaders when linked with a shader producing transform feedback varyings.
Fixes: 85a723975b ("nir: add and gather shader_info::writes_memory")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16285 >
2022-05-03 19:02:17 +00:00
Emma Anholt
e3607e96bb
nir: Eliminate out-of-bounds read/writes in local lowering.
...
Avoids nir validation assertion failures, and it's not like backend
drivers would want to see definitely-out-of-bounds read/writes either.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16066 >
2022-05-03 18:32:47 +00:00
Timothy Arceri
180398f785
nir: fix sorting before assigning varying driver locations
...
We need to make sure we also properly sort varyings sharing a single
slot otherwise we can end up assigning earlier components to the next
slot if we have already processed later components.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6392
Fixes: 1e93b0caa1 ("mesa/st: add support for NIR as possible driver IR")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16208 >
2022-05-03 00:04:30 +00:00
Karol Herbst
93144175fa
vtn: clamp SpvOpImageQuerySize dest to 32 bit
...
CL image arrays slice is 64 bit for whatever reason...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16205 >
2022-04-29 00:01:20 +00:00
Jason Ekstrand
c31db58f65
nir/deref: Add an alu-of-cast optimization
...
Casts shouldn't change the bit pattern of the deref and you have to cast
again after you're done with the ALU anyway so we can ignore casts on
ALU sources. This means we can actually start constant folding NULL
checks even if there are annoying casts in the way.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15673 >
2022-04-28 23:05:48 +00:00
Emma Anholt
536c8ee96d
nir/lower_tex: Make the adding a 0 LOD to nir_op_tex in the VS optional.
...
This controls the whole lowering of "make tex ops with implicit
derivatives on non-implicit-derivative stages be tex ops with an explicit
lod of 0 instead", but it's really hard to describe that in a git commit
summary.
All existing callers get it added except:
- nir_to_tgsi which didn't want it.
- nouveau, which didn't want it (fixes regressions in shadowcube and
shadow2darray with NIR, since the shading languages don't expose txl of
those sampler types and thus it's not supported in HW)
- optional lowering passes in mesa/st (lower_rect, YUV lowering, etc)
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16156 >
2022-04-28 21:26:08 +00:00
Karol Herbst
a2c9e1cb50
nir: add 16 and 64 bit fisnormal lowering
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16206 >
2022-04-28 18:36:52 +00:00
Gert Wollny
47d3f7c69f
nir: Don't optimize to 64 bit fsub if the driver doesn't support it
...
Fixes: a4840e15ab
r600: Use nir-to-tgsi instead of TGSI when the NIR debug opt is disabled.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16130 >
2022-04-27 00:01:20 +00:00
Jason Ekstrand
e24d8760e9
nir: Constant fold sampler/texture offsets
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16171 >
2022-04-26 22:34:39 +00:00
Jason Ekstrand
9332598b26
nir/constant_folding: Break TXB folding into a helper function
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16171 >
2022-04-26 22:34:39 +00:00
Yevhenii Kolesnikov
65caf46b3b
nir: Remove single-source phis before opt_if_loop_last_continue
...
We might have some single-source phis leftover after prior optimizations. We
want to get rid of them before merging the blocks.
Fixes: 5921a19d4b ("nir: add if opt opt_if_loop_last_continue()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6312
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16095 >
2022-04-26 17:06:07 +00:00
Jason Ekstrand
ef9d97ec1f
spirv: Handle Op*MulExtended for non-32-bit types
...
Fixes: 58bcebd987 ("spirv: Allow [i/u]mulExtended to use new nir opcode")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6306
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16060 >
2022-04-26 15:16:11 +00:00
Alyssa Rosenzweig
94b01ddcdd
nir: Use u_worklist to back nir_block_worklist
...
u_worklist is nir_block_worklist, suitably generalized. All we need to do is
define the macros to translate between the APIs.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16046 >
2022-04-25 23:50:57 +00:00
Jason Ekstrand
1755730362
nir: Lower all bit sizes of usub_borrow
...
It's not clear why this is restricted to 32-bit besides that being the
only bit size where GLSL has an intrinsic for this. All drivers that
set this probably want it lowered for all bit sizes as far as I can
tell.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6353
Fixes: 8a3e344180 ("nir/opt_algebraic: Fix some expressions with ambiguous bit sizes")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16146 >
2022-04-25 21:27:09 +00:00