Timur Kristóf
f820dde201
aco: Fix convert_to_SDWA when instruction has 3 operands.
...
Previously, when the instruction had 3 operands, this would cause
possible corruption because of writing to sdwa->sel[2].
This was noticed thanks to GCC 10's -Wstringop-overflow warning.
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/6436 >
2020-08-24 15:55:14 +02:00
Timur Kristóf
0d194a70c6
aco: Fix unused variable warning by adding ASSERTED.
...
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/6436 >
2020-08-24 15:55:06 +02:00
Samuel Pitoiset
48a910d1f9
radv: use the trap handler to detect faulty shaders/instructions
...
It should reliably report the faulty shader but the faulty instruction
is inacurate, especially for memory violations because it's reported
when the addr is processed. It will be improved by emitting more
wait-states.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
8e97a61cfb
radv: enable the trap handler and configure the shader exceptions
...
When TRAP_PRESENT is not enabled, all traps and exceptions are ignored.
Only EXCP_EN.mem_viol is currently supported because the other
exceptions have to be tested/validated first.
EXCP_EN.mem_viol is used to detect any sort of invalid memory
access like VM fault. When a memory violation is reported, the
hw jumps to the trap handler.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
af3230e39e
radv: add initial trap handler support with RADV_TRAP_HANDLER=1
...
A trap handler is used to handle shader exceptions like memory
violations, divide by zero etc. The trap handler shader code will
help to identify the faulty shader/instruction and to report
more information for better debugging.
This has only been tested on GFX8, though it should work on GFX6-GFX7.
It seems we need a different implemenation for GFX9+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
8fd2f5c16d
radv: add a small interface for creating the trap handler shader
...
Similar to the GS copy shader except that NIR is unused because
the shader is written directly using ACO IR.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
a0814a873d
aco: skip unnecessary compiler pass for the trap handler program
...
The shader is written by hands with assigned registers, so most of
the pass are unnecessary.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
9c46e6fca3
aco: add a helper for building a trap handler shader
...
It's way easier to write a trap handler shader using ACO IR
instead of writing disassembly by hand + clrxasm + copy&paste.
This trap handler is quite simple for now, it just loads a
buffer descriptor from the TMA BO, it saves ttmp0-1 which
contain various info about the faulty instruction, and it
stores some hw registers about the wave/trap status.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
a6146aa598
aco: validate that SMEM operands can use fixed registers
...
To fix a validation error when loading the scalar tma buffer
descriptor because it's not a temp but a fixed reg (tma_lo/tma_hi).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
baa9268eb6
aco: add TBA/TMA/TTMP0-11 physical registers definitions
...
The TBA/TMA scalar registers are only available on GFX6-GFX8.
On GFX9+, TBA/TMA addr are stored in hardware registers and
the number of TTMP scalar registers is thus increased by 4.
Just keep in mind that tba_lo is actually ttmp0. Best would
be to support ttmp registers in RA but that's more complicated.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
7e493e510b
amd/registers: add some SQ_WAVE_* register definitions
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Samuel Pitoiset
3aa71a61dd
amd/registers: add missing TBA registers on GFX6-GFX8
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6384 >
2020-08-24 11:08:24 +00:00
Jesse Natalie
d3faac7a15
nir: Add options to nir_lower_compute_system_values to control compute ID base lowering
...
If no options are provided, existing intrinsics are used.
If the lowering pass indicates there should be offsets used for global
invocation ID or work group ID, then those instructions are lowered to
include the offset.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5891 >
2020-08-21 22:07:05 +00:00
Jesse Natalie
2e1df6a17f
nir: Move compute system value lowering to a separate pass
...
The actual variable -> intrinsic lowering stays where it is, but
ops which convert one intrinsic to be implemented in terms of
another have moved.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5891 >
2020-08-21 22:07:05 +00:00
Jesse Natalie
41e4eb9948
nir: Add new system values and intrinsics for dealing with CL work offsets
...
New intrinsics are added for global invocation IDs and work group IDs to
deal with offsets in both. The only one of these that needs a system value
is global invocation offset, for CL's get_global_offset().
Note that CL requires very large work group sizes, so these intrinsics
are modified to be able to use 64bit values, for 64bit SPIR-V.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5891 >
2020-08-21 22:07:05 +00:00
Karol Herbst
e5899c1e88
nir: rename nir_op_fne to nir_op_fneu
...
It was always fneu but naming it fne causes confusion from time to time. So
lets rename it. Later we also want to add other unordered and fne, this is
a smaller preparation for that.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6377 >
2020-08-21 17:26:21 +00:00
Rhys Perry
2133e64203
aco: use nir_intrinsic_has_access
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6402 >
2020-08-21 16:47:00 +00:00
Rhys Perry
9c1e0d86a8
aco: fix non-rtz pack_half_2x16
...
We were using the wrong conversion opcode. The high bits are also not
zero'd on GFX10, which can cause v_cvt_pk_u16_u32 to clamp.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: df645fa369 ('aco: implement VK_KHR_shader_float_controls')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6346 >
2020-08-21 16:30:26 +00:00
Samuel Pitoiset
f153151730
aco: add ACO_DEBUG=force-waitcnt to emit wait-states
...
Sounds useful for debugging missing wait-states and for improving
detection of the faulty instruction in case of memory violations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6386 >
2020-08-21 13:22:58 +02:00
Samuel Pitoiset
f811ddf5d1
radv: ignore BB labels when splitting the disassembly string
...
Ignore everything that is not an instruction. This should fix
the annotated UMR disassembly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6387 >
2020-08-21 10:34:22 +02:00
Jason Ekstrand
1ccd681109
nir: Add an LOD parameter to image_*_size
...
The OpenCL image_width/height/depth functions have variants which can
take an LOD parameter. More importantly, LLVM-SPIRV-Translator always
generates OpImageQuerySizeLod even if the LOD is guaranteed to be zero.
Given that over half the hardware out there has an LOD field for image
size queries (based on a rudimentary scan through their NIR -> whatever
code), we may as well just add the source to the NIR intrinsic. If this
is ever a problem for anyone, the lowering is pretty trivial.
I've also added asserts to everyone's drivers that should alert them if
they ever see an LOD other than zero. This will never happen with GL or
Vulkan so there's no need for panic.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6396 >
2020-08-20 20:48:10 +00:00
Eric Anholt
b3c822a0a8
radv: Move nir_opt_shrink_vectors() into the opt loop.
...
Upcoming changes to opt_undef will result in this pass doing more work and
generating vector MOVs that need re-scalarizing (which is inside of the
main opt loop).
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054 >
2020-08-20 16:44:08 +00:00
Samuel Pitoiset
58817bda8b
aco: fix file leak in ra_fail()
...
Fixes: c2b1978aa4 ("aco: rework the way various compilation/validation errors are reported")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6399 >
2020-08-20 14:42:07 +00:00
Rhys Perry
b553c7dd96
radv: fix null memcpy and zero-sized malloc
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206 >
2020-08-20 10:52:19 +00:00
Rhys Perry
b50ae77014
radv: align pipeline cache entry and header sizes
...
Fixes UBSan error:
../src/amd/vulkan/radv_pipeline_cache.c:603:42: runtime error: member access within misaligned address 0x00000152ebcc for type 'struct cache_entry', which requires 8 byte alignment
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206 >
2020-08-20 10:52:19 +00:00
Rhys Perry
4f08af6766
radv: don't pass null to _mesa_sha1_update
...
This could then pass NULL to memcpy. Fixes UBSan error:
../src/util/sha1/sha1.c:140:8: runtime error: null pointer passed as argument 2, which is declared to never be null
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6206 >
2020-08-20 10:52:19 +00:00
Samuel Pitoiset
e901b901cb
radv,aco: report ACO errors/warnings back via VK_EXT_debug_report
...
To help developers.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6318 >
2020-08-20 08:15:08 +02:00
Samuel Pitoiset
c2b1978aa4
aco: rework the way various compilation/validation errors are reported
...
The upcoming change will allow to report all ACO errors (or warnings)
directly to the app via VK_EXT_debug_report. This is similar to what
we already do for reporting various SPIRV->NIR errors.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6318 >
2020-08-20 08:15:06 +02:00
Samuel Pitoiset
bc723dfda7
aco: rename DEBUG_VALIDATE to DEBUG_VALIDATE_IR
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6318 >
2020-08-20 08:15:04 +02:00
Connor Abbott
c77716294b
radv: Use an input for the layer when lowering input attachments
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719 >
2020-08-19 16:36:43 +00:00
Connor Abbott
d243bf1032
nir/lower_input_attachments: Support loading layer id as an input
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719 >
2020-08-19 16:36:43 +00:00
Connor Abbott
e72895767b
nir/lower_input_attachments: Refactor to use an options struct
...
While we're at it, fold the details of how to load the fragcoord into
load_fragcoord().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719 >
2020-08-19 16:36:43 +00:00
Emil Velikov
41bb6459d3
radv: restrict exported symbols with static llvm
...
Like the gallium --version-script magic but for radv.
The long term goal is to make LLVM support optional, remove it even, so
let's keep the hunk in an if block.
v2: fold if checks (Eric)
v3 (Tomeu): Remove spaces within [] (Dylan)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl > (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6203 >
2020-08-19 11:19:18 +00:00
Samuel Pitoiset
d26f62c667
radv: track and report if a logical device is lost
...
This currently covers two situations where it's obvious that
the GPU hung:
1) when wait-of-idle doesn't finish in a finite time
2) when a CS submission is cancelled by the kernel
There is still probably some other situations that aren't yet handled.
According to the Vulkan spec, some operations should return
VK_ERROR_DEVICE_LOST when the corresponding logical device is
known to be lost.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5878 >
2020-08-19 07:57:51 +00:00
Bas Nieuwenhuizen
f038b3a136
radv: Fix handling of attribs 16-31.
...
We really need to update the enum for consistency, but that involves
a bunch of GL & bitfield work which is error-prone, so since this is
a fix for stable lets do the simple things.
Confirmed that nothing in radv/aco/nir/spirv uses MAX_VERT_ATTRIB
except the one thing I bumped.
CC: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6120 >
2020-08-18 20:31:21 +02:00
Bas Nieuwenhuizen
0067f89920
radv: Override the uniform buffer offset alignment for World War Z.
...
Game does the equivalent of a
ALIGN(..., minUniformBufferOffsetAlignment >> 4)
which breaks when said alignment is <16 with a SIGFPE.
CC: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6120 >
2020-08-18 20:31:15 +02:00
Bas Nieuwenhuizen
a1d4721e21
driconf: Support selection by Vulkan applicationName.
...
This adds applicationName + version through like engineName.
Rationale: A game (World War Z) includes the store name in the
executable name, so has multiple executable names.
CC: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6120 >
2020-08-18 20:31:07 +02:00
Pierre-Eric Pelloux-Prayer
b7c04b1790
ac/llvm: handle static/shared llvm init separately
...
Having a single init function works as expected for shared llvm, but
when using a static llvm only one llvm will get initialized.
This commit introduces 2 separate init function:
- shared llvm = single public init function
- static llvm = one init function for each module using llvm
Fixes: 50d20dc055 ("ac/llvm: export ac_init_llvm_once in targets")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3376
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6253 >
2020-08-17 10:47:41 +00:00
Dave Airlie
8004fa9c95
vulkan/wsi: add sw support. (v2)
...
This adds an option to the WSI support for a software path to be
used with the vulkan sw drivers. There is probably some changes
that could be made to improve this and use present, for now
just use put image.
v2: roll out flag across all drivers (Eric)
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082 >
2020-08-17 14:30:50 +10:00
Bas Nieuwenhuizen
50b039590e
radv: Use getter instead of setter to extract value.
...
Oops ...
Fixes: 64768111c3 "radv: Handle slightly different image dimensions."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3417
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6337 >
2020-08-16 23:40:03 +00:00
Bas Nieuwenhuizen
0980d1d5ab
radv: Clean up setting the surface flags.
...
If we don't give the init function access to the fields we will not
accidentally start setting them.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6274 >
2020-08-14 10:29:44 +00:00
Bas Nieuwenhuizen
d19bc94e4e
radv: When importing an image, redo the layout based on the metadata.
...
When importing a DMA-BUF, the image layout created in vkImageCreate may
not match the imported BO's. To make this work we redo the layout based
on the metadata of the imported image.
The original patch did a delayed allocation just as for AHB, but that
does not work for images that are not imported (but e.g. exported only).
Original patch by Simon Ser <contact@emersion.fr >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2801
CC: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6274 >
2020-08-14 10:29:44 +00:00
Samuel Pitoiset
d452c04aa1
aco: do not set valid_mask for POS0 exports on GFX 10.3
...
This hardware issue seems only present on GFX10.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6278 >
2020-08-13 07:13:56 +00:00
Samuel Pitoiset
431a3cf239
radv/winsys: add null winsys entries for Sienna Cichild/Navy Flounder
...
We don't know the PCI ID yet.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6257 >
2020-08-12 09:45:57 +00:00
Samuel Pitoiset
638a09b827
radv: fix emitting the border color pointer on the compute queue
...
This was just missing.
Fixes: 57e796a12a ("radv: Implement VK_EXT_custom_border_color")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: John Galt <johngaltfirstrun@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6276 >
2020-08-12 09:13:11 +02:00
Daniel Schürmann
fdb97d3d29
aco: execute branch instructions in WQM if necessary
...
It could happen that only the branch condition was computed in WQM
and not the branch instruction.
There is now some rendundancy which should be cleaned up.
Fixes: 3817fa7a4d ('aco: fix WQM handling in nested loops')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6260 >
2020-08-11 15:35:59 +00:00
Rhys Perry
7b4c24eb67
aco: don't move memory accesses to before control barriers
...
Fixes random failures of dEQP-VK.image.qualifiers.volatile.cube_array.r32i
and similar tests on Vega.
fossil-db (Navi):
Totals from 6 (0.00% of 135946) affected shaders:
VMEM: 1218 -> 1110 (-8.87%); split: +2.46%, -11.33%
SMEM: 174 -> 189 (+8.62%)
Copies: 84 -> 87 (+3.57%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: cd392a10d0 ('radv/aco,aco: use scoped barriers')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6174 >
2020-08-11 14:16:00 +01:00
Samuel Pitoiset
e4c6204d65
radv: limit LATE_ALLOC_GS to prevent a GPU hang on GFX10
...
Found by inspection, doesn't fix anything known.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6279 >
2020-08-11 12:47:33 +00:00
Samuel Pitoiset
0256250547
radv/gfx10: add missing initialization of registers
...
Found by inspection.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6277 >
2020-08-11 13:48:32 +02:00
Rhys Perry
6e70508151
aco: set constant_data_offset correctly in the case of merged shaders
...
setup_nir() is done for all shaders before any of them are selected, so
constant_data_offset could be incorrect for the first shader.
Fixes incorrect geometry in Mafia III and Max Payne 3.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2768
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6205 >
2020-08-10 18:21:47 +00:00