Jason Ekstrand
6885cc6f65
spirv: Implement OpTraceRayKHR and OpExecuteCallableKHR
...
The old NV version (and the provisional KHR version) specified the data
payload via an integer location. This was quite annoying for the parser
and potentially error-prone. The final KHR version of the SPIR-V
ray-tracing spec replaces these integers with actual pointers. We don't
really need to implement the NV versions but we have the code and
someone might want to parse some NV ray-tracing shaders.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7734 >
2020-11-24 15:47:06 +00:00
Jason Ekstrand
946d5ca004
spirv: Update JSON and headers from Khronos main
...
This corresponds to 104ecc356c1bea4476320faca64440cd1df655a3 ("Merge
pull request #180 from dneto0/issue-179") in
https://github.com/KhronosGroup/SPIRV-Headers
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7734 >
2020-11-24 15:47:06 +00:00
Jason Ekstrand
b15caf190b
spirv: Rename some ray-tracing intrinsics to NV
...
For these intrinsics, the NV version and the provisional KHR version
have the same enum value and semantics but the final KHR version is
different on both counts. Re-name them to NV before we update the
header so the header update isn't a functional change.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7734 >
2020-11-24 15:47:06 +00:00
Daniel Schürmann
1c17223c02
nir/opt_peephole_select: respect selection_control when collapsing ifs
...
Totals from 34 (0.02% of 138013) affected shaders (RAVEN):
CodeSize: 625888 -> 626336 (+0.07%); split: -0.00%, +0.08%
Instrs: 124121 -> 124229 (+0.09%); split: -0.00%, +0.09%
Cycles: 1403072 -> 1403588 (+0.04%); split: -0.01%, +0.04%
VMEM: 5308 -> 5364 (+1.06%); split: +1.07%, -0.02%
Copies: 12773 -> 12838 (+0.51%); split: -0.08%, +0.59%
Branches: 5758 -> 5801 (+0.75%); split: -0.21%, +0.96%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7478 >
2020-11-24 08:39:35 +00:00
Daniel Schürmann
28395407eb
nir/opt_peephole_select: collapse nested IFs if applicable
...
Single-sided nested IFs can sometimes be collapsed
even if they cannot be flattened.
This optimization re-uses block_check_for_allowed_instrs()
to determine if it is beneficial to collapse the IFs.
Additionally, it is required that the phis of the outer IF
become trivial after this optimization, so that no additional
bcsel instructions are added.
This optimization turns
if (cond1) {
<allowed instruction>
if (cond2) {
<any code>
} else {
}
} else {
}
into
<allowed instruction>
if (cond1 && cond2) {
<any code>
} else {
}
Totals from 17044 (12.35% of 138013) affected shaders (RAVEN):
SGPRs: 1246416 -> 1246256 (-0.01%); split: -0.01%, +0.00%
VGPRs: 802752 -> 802736 (-0.00%); split: -0.01%, +0.01%
SpillSGPRs: 45857 -> 45850 (-0.02%); split: -0.07%, +0.05%
CodeSize: 85318240 -> 85208592 (-0.13%); split: -0.15%, +0.02%
Instrs: 16769049 -> 16738195 (-0.18%); split: -0.20%, +0.02%
Cycles: 947328732 -> 947145796 (-0.02%); split: -0.03%, +0.01%
VMEM: 7271539 -> 7274090 (+0.04%); split: +0.05%, -0.01%
SMEM: 925983 -> 927374 (+0.15%); split: +0.19%, -0.04%
VClause: 294334 -> 294340 (+0.00%); split: -0.00%, +0.00%
SClause: 633600 -> 634048 (+0.07%); split: -0.01%, +0.08%
Copies: 1589650 -> 1580573 (-0.57%); split: -0.66%, +0.09%
Branches: 540830 -> 525767 (-2.79%); split: -2.79%, +0.00%
PreSGPRs: 902500 -> 902415 (-0.01%); split: -0.02%, +0.01%
PreVGPRs: 759992 -> 760019 (+0.00%); split: -0.00%, +0.01%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7478 >
2020-11-24 08:39:35 +00:00
Samuel Pitoiset
88b5a2b80b
nir: fix gathering cross invocation info
...
Fixes: 5b77b14448 ("nir: Use src_is_invocation_id in get_deref_info.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7730 >
2020-11-23 11:00:17 +00:00
Timur Kristóf
5b77b14448
nir: Use src_is_invocation_id in get_deref_info.
...
Signed-off-by: Timur Kristof <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7622 >
2020-11-21 19:38:57 -05:00
Marek Olšák
e78c089aae
nir: fix gathering patch IO usage with lowered IO
...
Fixes: 17af07024d - nir: gather all IO info from IO intrinsics
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7622 >
2020-11-21 19:38:55 -05:00
Marek Olšák
aadfdb962f
nir: fix gathering TCS cross invocation access with lowered IO
...
Fixes: abe9588ff0 - nir: gather tess.tcs_cross_invocation info from lowered IO intrinsics
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7622 >
2020-11-21 19:38:53 -05:00
Rhys Perry
8c3abcab6d
nir/copy_prop_vars: avoid a duplicate lookup if src == vec_src
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Rhys Perry
33eeb994be
nir/copy_prop_vars: use nir_deref_and_path
...
Instead of recreating paths, create them once when needed using
nir_deref_and_path.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Rhys Perry
abc3225927
nir/deref: add helpers to lazily create paths
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Rhys Perry
7d8c06d484
nir/search: check for changes before adding uses to worklist
...
So it doesn't uselessly add instructions to the worklist.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Rhys Perry
556a20afe6
nir/search: check instr type before adding to worklist
...
nir_algebraic_instr() ignores non-ALU instructions, so there's no point.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Rhys Perry
4832262560
nir/loop_analyze: initialize loop variables on demand
...
Zero'ing the allocation and calling initialize_ssa_def() for every
ssa def can be expensive. Since we only use a subset of the allocated
variables, initialize it only when needed.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Rhys Perry
be7b20135e
nir/copy_prop_vars,nir/dead_write_vars: ignore read-only loads
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Rhys Perry
276e241b57
nir: add nir_var_vec_indexable_modes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7511 >
2020-11-20 13:57:34 +00:00
Daniel Schürmann
fb01882ddb
nir: add nir_phi_get_src_from_block() helper
...
Returns the phi_src corresponding to a given nir_block.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2804 >
2020-11-20 13:46:41 +01:00
Daniel Schürmann
8d477baa4f
nir: allow for cheap intrinsics in nir_opt_peephole_select()
...
Also added nir_instr_type_ssa_undef for convenience.
Out of the added intrinsics, it seems that only load_helper_invocation
has an effect on tested games.
Totals from 446 (0.32% of 138013) affected shaders (RAVEN):
SGPRs: 17600 -> 17688 (+0.50%); split: -0.09%, +0.59%
VGPRs: 14140 -> 14312 (+1.22%); split: -0.03%, +1.24%
CodeSize: 1157696 -> 1131208 (-2.29%)
MaxWaves: 3430 -> 3427 (-0.09%)
Instrs: 220402 -> 214200 (-2.81%)
Cycles: 900776 -> 875752 (-2.78%)
VMEM: 160894 -> 180439 (+12.15%); split: +12.19%, -0.04%
SMEM: 19854 -> 20169 (+1.59%); split: +1.74%, -0.16%
VClause: 3597 -> 3604 (+0.19%)
SClause: 7258 -> 7248 (-0.14%); split: -0.15%, +0.01%
Copies: 17060 -> 16336 (-4.24%); split: -4.44%, +0.20%
Branches: 3995 -> 2518 (-36.97%)
PreSGPRs: 11972 -> 12148 (+1.47%); split: -0.13%, +1.60%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2804 >
2020-11-20 13:46:41 +01:00
Matt Turner
df29d0a111
glcpp: Handle bison-3.6 error message changes
...
In bison's commit 72c9fa4510eb (skeletons: use "end of file" instead of
"$end") in bison-3.6, '$end' was changed to 'end of file' in error
messages. Since our glcpp test cases contain the expected output text,
they rely on the particular messages printed by bison. The test case
084-unbalanced-parentheses fails when Mesa is built with bison-3.6 due
to this change.
To allow the test to pass on all supported versions of bison, we:
1. Change '$end' -> 'end of file' in the .expected file, and
2. Normalize the error generated by the test case with the same
replacement
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3181
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7659 >
2020-11-19 15:31:15 +00:00
Michel Zou
f493fc5fa2
spirv: workaround setjmp/longjmp crash on MinGW
...
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7555 >
2020-11-18 13:53:36 +00:00
Jason Ekstrand
783b895ec9
nir: Rewrite lower_undef_to_zero
...
This both fixes its metadata handling (it was flagging dirty regardless
of progress) and reduces the entire pass to 21 LOC including whitespace
by making better use of helpers.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
ff05da7f8d
microsoft: Add CLC frontend and kernel/compute support to DXIL converter
...
This adds a standalone library which can convert through the pipeline of
OpenCL C -> SPIR -> SPIR-V -> NIR -> DXIL. It can add in the libclc
implementations of various library functions in the NIR phase, and
also massages the NIR to shift it more towards graphics-style compute.
This is leveraged by the out-of-tree OpenCLOn12 runtime
(https://github.com/microsoft/OpenCLOn12 ).
This is the combination of a lot of commits from our development branch,
containing code by several authors.
Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com >
Co-authored-by: Daniel Stone <daniels@collabora.com >
Co-authored-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
1885e356e6
spirv: Allow spirv_to_nir callers to provide a float execution mode
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
a0aaba26cd
nir_load_libclc: Mark libclc shader as internal
...
This allows NIR_PRINT to skip passes run on it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Boris Brezillon
cab995b463
nir: Make nir_build_deref_offset() support ptr_as_array
...
nir_build_deref_offset() can be extended to support calculating an
offset relative to a base pointer.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
949f8572ec
vtn/opencl: Fix alignment for half vload/vstore
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
9c4dce1d96
nir: Add nir_alu_type -> glsl_base_type conversion helper
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Boris Brezillon
7d3aec9905
compiler/spirv: Handle the LocalSizeHint execution modes
...
It's basically the same as the LocalSize version except it fills
the local_size_hint array.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Boris Brezillon
a42c846d24
nir: Fix nextafter() for hardware that don't support denorms
...
We need to make sure we never return a denorm float, either by flushing
the denorm to 0 or by adjusting the minimum non-zero value.
v2 (Rhys): Use shader float controls execution mode instead of a dedicated option
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
b94b827add
panfrost/util: Move nir_undef_to_zero into core nir and add 'lower'
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jason Ekstrand
c730ace12b
nir,clover: Drop nir_lower_mem_constant_vars
...
We have a more generic helper now so clover doesn't need quite as many
special paths.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jason Ekstrand
2e8e275075
nir: Add a more generic helper for gathering constant initializers
...
The one we had was tied to nir_var_mem_constant but we also need it for
global and, one day, I can imagine us needing it for shared (though
there's currently no spec that requires it).
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jason Ekstrand
f727e98d22
nir/lower_io: Add data OOB asserts to write_constant
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Eric Anholt
51f2b11b04
nir: Add a size_align helper function for aligning elements to 16 bytes.
...
This is useful for freedreno's intrinsic opt_large_constant lowering,
where we want arrays and struct elements aligned to 16 to avoid generating
lots of extra instructions to extract from the right component.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5810 >
2020-11-16 13:54:22 -08:00
Dave Airlie
671c850310
spirv/cl: add enqueued workgroup size.
...
Unless the non uniform work group extension is supported, this
just aliases workgroupsize, so just do that for now.
Fixes:
CL CTS basic enqueued_local_size
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7642 >
2020-11-17 05:15:10 +10:00
Lionel Landwerlin
3f91f4e2ab
nir: don't consider txf_ms_mcs a query instruction
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6172 >
2020-11-16 12:13:53 +00:00
Tony Wasserka
4e87e7863f
glsl: Fix -Wshadow warning
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7552 >
2020-11-16 08:49:18 +00:00
Alejandro Piñeiro
5169dfd1fd
nir/lower_tex: clarify nir_lower_tex_options indexing
...
This doesn't matter too much on OpenGL as texture id and sampler id
are the same, but become relevant if using the lowering for Vulkan.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7545 >
2020-11-14 15:59:02 +00:00
Rhys Perry
bf5cea7232
nir: allow reordering of loads from read-only modes
...
fossil-db (Navi):
Totals from 710 (0.51% of 138917) affected shaders:
SGPRs: 45007 -> 44791 (-0.48%)
VGPRs: 36116 -> 36284 (+0.47%); split: -0.03%, +0.50%
CodeSize: 3811540 -> 3795332 (-0.43%); split: -0.43%, +0.00%
MaxWaves: 8018 -> 8005 (-0.16%)
Instrs: 758383 -> 755084 (-0.44%); split: -0.44%, +0.01%
Cycles: 5786240 -> 5758848 (-0.47%); split: -0.48%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7600 >
2020-11-13 17:25:01 +00:00
Rhys Perry
eb7507681f
nir: add nir_var_mem_ubo to nir_var_read_only_modes
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7600 >
2020-11-13 17:25:01 +00:00
Daniel Schürmann
0ef5f3552f
nir: add strength reduction pattern for imod/irem with pow2 divisor.
...
Affected games are Detroit : Become Human and Doom : Eternal.
Totals from 6262 (4.54% of 138013) affected shaders (RAVEN):
SGPRs: 678472 -> 678640 (+0.02%)
VGPRs: 498288 -> 498360 (+0.01%)
CodeSize: 67064196 -> 65926000 (-1.70%)
MaxWaves: 19390 -> 19382 (-0.04%)
Instrs: 13175372 -> 12932517 (-1.84%)
Cycles: 1444043256 -> 1443022576 (-0.07%); split: -0.08%, +0.01%
VMEM: 929560 -> 908726 (-2.24%); split: +0.39%, -2.63%
SMEM: 406207 -> 400062 (-1.51%); split: +0.46%, -1.97%
VClause: 215168 -> 215031 (-0.06%)
SClause: 443312 -> 442324 (-0.22%); split: -0.25%, +0.03%
Copies: 1350793 -> 1344326 (-0.48%); split: -0.52%, +0.04%
Branches: 506432 -> 506370 (-0.01%); split: -0.02%, +0.01%
PreSGPRs: 619652 -> 619619 (-0.01%)
PreVGPRs: 473212 -> 473168 (-0.01%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/175 >
2020-11-13 15:59:03 +01:00
Marek Olšák
cb20d58f45
nir: optimize nir_lower_discard_to_demote to lower discard/demote both ways
...
This is smarter and also lowers demote to discard if helper invocations are
not needed.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7586 >
2020-11-12 21:02:05 +00:00
Marek Olšák
d5039f99b4
nir: gather shader_info::needs_all_helper_invocations
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7586 >
2020-11-12 21:02:05 +00:00
Marek Olšák
baa5807e36
nir: rename needs_helper_invocations to needs_quad_helper_invocations
...
This indicates that only quad operations use helper invocations.
Also handle quad_swizzle_amd.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7586 >
2020-11-12 21:02:05 +00:00
Marek Olšák
96c12b7dc2
nir: optionally shuffle local invocation IDs for compute quad derivatives
...
Used by radeonsi. local_invocation_index is lowered only when quad
derivatives are enabled.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7586 >
2020-11-12 21:02:05 +00:00
Marcin Ślusarz
6e6dab4799
nir: handle float atomics in copy propagation pass
...
Without this patch, copy propagation pass can optimize out
buffer loads out of compare & swap loop, which then leads
to infinite loop.
Triggered by a change to atomicCompSwap float test in piglit.
Fixes: 8424cd8fbd ("nir: Account for atomics in copy propagation.")
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7538 >
2020-11-12 19:20:50 +00:00
Rob Clark
f6359d2dc3
nir: Fix nir_validate fail after nir_lower_tex
...
It is UB to initialize unions on the stack and rely on bits not covered
by the initialized union member to be zero. Lets just simplify it and
move the entire nir_const_value off the stack.
While we're in there, sprinkle around some const.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3778
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7579 >
2020-11-12 17:12:17 +00:00
Vinson Lee
c432d4814a
glsl: Fix typos in comments.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7415 >
2020-11-11 19:22:08 +00:00
Vinson Lee
e7aa3cf828
glsl: Initialize ir_variable member field data.is_xfb.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member field data.is_xfb is not
initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7414 >
2020-11-11 18:59:43 +00:00