Commit Graph

127914 Commits

Author SHA1 Message Date
Samuel Pitoiset bc1d24e552 radv: re-introduce missing skip list for Polaris10
The list shouldn't have been removed but replaced.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10448>
2021-04-26 08:43:13 +02:00
Timothy Arceri a02a0df2a2 mesa: fix incomplete GL_NV_half_float implementation
All of the VertexAttrib* functions were missing.

Fixes: ef66e02a40 ("src/mesa: add GL_NV_half_float extension support (v2)")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10431>
2021-04-26 03:35:21 +00:00
Jesse Natalie 7e905bd00f microsoft/spirv_to_dxil: Treat read-only storage images as SRVs
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>
2021-04-23 23:16:15 +00:00
Jesse Natalie 05d90ed9da microsoft/compiler: Treat read-only SSBOs as SRVs
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>
2021-04-23 23:16:15 +00:00
Jesse Natalie 2775b9139b nir_lower_readonly_images_to_tex: Use nir_shader_lower_instructions
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>
2021-04-23 23:16:15 +00:00
Jesse Natalie fa677c8644 nir_lower_readonly_images_to_tex: Support non-CL semantics
For non-CL, intrinsic access isn't set, because the image type doesn't
have access qualifier. Instead, the access qualifier is set on the variable.

So, add a mode to this pass which can chase back to the variable in addition
to the intrinsic access. Also, update the variable type and the deref chain
types so everything is consistent, that the tex is accessing a sampler. Note
we can't do this for CL, because void-typed samplers don't exist.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>
2021-04-23 23:16:15 +00:00
Jesse Natalie 29c9731400 nir: Rename nir_lower_cl_images_to_tex, replace 'cl' with 'readonly'
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>
2021-04-23 23:16:15 +00:00
Jesse Natalie 1c41f63e26 vtn: Propagate access data from UBO/SSBO/push constant types to variables of that type, not just their pointers
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>
2021-04-23 23:16:15 +00:00
Jesse Natalie 9936463ef6 vtn: Propagate access data that's present on all struct members to the struct itself
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>
2021-04-23 23:16:15 +00:00
Ian Romanick 939bf7a419 tgsi_exec: Fix NaN behavior of min and max
Modern shader APIs, like DX10 and GLSL 1.30, want min() and max() to
"cleanse" NaN.  If one source is NaN, the other value should be chosen.
If both sources are NaN, the result may be either.

There are many cases where TGSI is generate from NIR, and many
optimizations in NIR expect this behavior.  Not meeting these
expectations can lead to unexpected results.

Reviewed-by: Eric Anholt <eric@anholt.net>
Fixes: ffe58739da ("Softpipe: import TGSI tree. Not hooked-up yet.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10419>
2021-04-23 22:01:45 +00:00
Ian Romanick d1c0f62b42 tgsi_exec: Fix NaN behavior of saturate
Modern shader APIs, like DX10 and GLSL 1.30, want saturate or
clamp(..., 0.0, 1.0) to "cleanse" NaN.  If the source is NaN, the
result should be zero.

There are many cases where TGSI is generate from NIR, and many
optimizations in NIR expect this behavior.  Not meeting these
expectations can lead to unexpected results.

Reviewed-by: Eric Anholt <eric@anholt.net>
Fixes: 56c30bf17b ("tgsi: Saturate modifier obeys ExecMask. Implement NVIDIA [-1;+1] saturate mode.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10419>
2021-04-23 22:01:45 +00:00
Charlie Turner c6ef4047d0 radv: Merge dEQP default skips into all generation-specific skip lists
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8147
obsoleted
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4656 so the
default skips are not being used.

Instead, merge the defaults into each generation's skip list. Also
remove the "Fixed by CTS 3dddaeca8 ("Fix source blit image size")",
since the VK-GL-CTS has been updated to vulkan-cts-1.2.6.0 already,
which includes 3dddaeca8

Nowadays, the only option is to have default skips per GPU
version (c.f. GPU_VERSION variable in deqp-runner), since the runner
doesn't have a "skip list merge" feature.

v2.
  - Removed deqp-radv-polaris10-skips.txt in response to Samuel's feedback.

v3.
  - Add review tags.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10413>
2021-04-23 21:39:17 +00:00
Adam Jackson 01ba8a8d02 glx: Implement GLX_EXT_no_config_context
This is the GLX counterpart to EGL_KHR_no_config_context. Contexts may
now be created without reference to an fbconfig, in which case it is
treated as compatible with any fbconfig (and thus any GLX drawable).

Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8999>
2021-04-23 21:15:19 +00:00
Eric Anholt f9d57207a3 ci/radeonsi: Mark a glx_arb_sync_control/timing flake.
I've seen this one happen at least twice today. Log shows something like:

    Wallclock time between MSCs 16982.888889us does not match
    glXGetMscRateOML 16668.071966us

or

    Wallclock time between MSCs 16500.333333us does not match
    glXGetMscRateOML 16668.071966us

Incidentally, both runs I've looked into had one run too fast and one run
too slow.

Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10414>
2021-04-23 12:11:54 -07:00
Alyssa Rosenzweig aed18bca64 d3d12: Switch to nir_lower_fragcolor
Does everything your pass did, with some bug fixes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>
2021-04-23 17:20:43 +00:00
Alyssa Rosenzweig c84804f167 nir/lower_fragcolor: Take max cbufs as argument
One step closer to generalizing this pass to more drivers.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>
2021-04-23 17:20:43 +00:00
Alyssa Rosenzweig 73eb497b86 nir/lower_fragcolor: Fix driver_location assignment
Fixes crash in
dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data
when using this pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>
2021-04-23 17:20:43 +00:00
Samuel Pitoiset fe989df347 radv: enable DCC stores with the LLVM backend
Just to make it consistent compared to ACO.

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/10436>
2021-04-23 16:01:22 +00:00
Samuel Pitoiset 00f0fae037 radv/llvm: implement the image load DCC bug
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/10436>
2021-04-23 16:01:22 +00:00
Samuel Pitoiset 12048309a8 radv: remove warnings about RADV_PERFTEST=aco,llvm
These warnings have been introduced after switching ACO by default
for Mesa 20.2. I think it's time to remove them for 21.2.

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/10435>
2021-04-23 15:51:42 +00:00
Tony Wasserka 336e5aea35 radv: Remove assert about pDepthStencilState
RenderDoc's serialization code replaces unused references with NULL
pointers, which caused this assert to fire when the NULL state wasn't
really dereferenced.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8860>
2021-04-23 15:41:18 +00:00
Boris Brezillon ab409fbf9f panfrost/ci: Skip draw_indirect.compute_interop.large.*
Some of the dEQP-GLES31.functional.draw_indirect.compute_interop.large
tests create heavy compute jobs which might takes more than the
maximum allowed by the kernel driver (0.5s). Skip them for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10425>
2021-04-23 14:59:09 +00:00
Icecream95 d01f2d0c65 pan/decode: Print errors when closing dump file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>
2021-04-23 14:40:55 +00:00
Icecream95 1cc9b28a76 pan/decode: Allow frame shader DCDs to be in another BO than the FBD
Fixes: 96b71a59c0 ("panfrost: Decode pre/post frame DCDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>
2021-04-23 14:40:55 +00:00
Icecream95 c7076e03e5 panfrost: Fix shader texture count
Instead of using num_textures, determine the texture count from the
last bit set in textures_used.

Fixes ADDR_RANGE_FAULTs when draw_textured_quad writes only stencil.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>
2021-04-23 14:40:55 +00:00
Alyssa Rosenzweig c220976fd0 panfrost: Fix formats converting uninit from AFBC
If no slices were valid (the resource is uninitialized), we were reading
a bogus PIPE_FORMAT_NONE format from the blit.dst.format. Fix this --
and guard against scope similar issues -- by hoisting the blit
assignments out of the loop so they're valid.

Fixes: 9d0ad7fd2e ("panfrost: Patch the gallium driver to use pan_image_layout_init()")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10415>
2021-04-23 14:23:41 +00:00
Samuel Pitoiset 3d979c9169 radv: make sure CP DMA is idle before executing secondary command buffers
Buffer copies with CP DMA aren't synced.

Fix dEQP-VK.memory.pipeline_barrier.transfer_src_transfer_dst.65536
flakes on GFX10+.

Fixes: e870796113 ("radv: prefer CP DMA for GTT buffer copies/clears on dGPUs due to slow PCIe")
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/10427>
2021-04-23 13:45:24 +02:00
Samuel Pitoiset f9e9b21e10 radv/winsys: fix resetting the number of padded IB words
The number of padded words is per IB, so it should be reset.

Found with Valgrind and dEQP-VK.api.command_buffers.record_many_draws*

Cc: 21.1 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/10376>
2021-04-23 11:40:05 +00:00
Samuel Pitoiset ec0d3701cd radv/winsys: fix allocating the number of CS in the sysmem path
Found with Valgrind and dEQP-VK.api.command_buffers.record_many_draws*.

Cc: 21.1 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/10376>
2021-04-23 11:40:05 +00:00
Samuel Pitoiset bba6be03f9 radv: remove RADV_DEBUG=nothreadllvm
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/10429>
2021-04-23 11:26:48 +00:00
James Park d7da6000fe llvmpipe: Remove stray ## operator for MSVC
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 6de0317e5a draw/clip: Use NAN to make MSVC happy
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 74f95e719b radv: Add <io.h> on WIndows for missing close()
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 288f6b81d6 radv: Fix unused label warning on Windows
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 8e73ed66ad radv: Add _WIN32 guard in radv_check_gpu_hangs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
James Park 1351fcf3c3 amd: Fix warnings around variable sizes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
2021-04-23 10:37:22 +00:00
Samuel Pitoiset 9a0098ee50 radv: cleanup LLVM related includes
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/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset 1c702a8239 ac: move ac_lower_indirect_derefs() outside of the LLVM dir
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset 0b7c442d39 radv: remove old comment about LLVM <= 8
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/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset 24b52a9b69 radv/winsys: remove set but never used use_llvm
It's no longer necessary since LLVM version has been bumped.

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/10403>
2021-04-23 11:52:01 +02:00
Samuel Pitoiset a12b844d40 radv: fix emitting default depth bounds state on GFX6
GFX6 has no CLEAR_STATE.

One step towards Vulkan conformance on these old chips.

Cc: 21.1 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/10347>
2021-04-23 08:37:11 +02:00
Mike Blumenkrantz 79790e276f zink: when performing an implicit reset, sync qbos
resetting a query pool+qbo dumpsters the existing qbo results,
so these need to be copied to the new qbo if they exist, and then the query
id needs to be updated to match the expected result offset so everything
keeps working as expected

Fixes: 00fc85a011 ("zink: reset queries when suspending if >50% of total pool is used")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10268>
2021-04-23 03:52:47 +00:00
Mike Blumenkrantz 55b2b9b389 zink: only reset query on suspend if the query has previously been stopped
if the query has never been stopped, then doing an implicit reset here does
nothing except give the gpu more work

Fixes: 00fc85a011 ("zink: reset queries when suspending if >50% of total pool is used")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10268>
2021-04-23 03:52:47 +00:00
Mike Blumenkrantz 42658ab70c zink: init timeline semaphore on screen creation, not first batch creation
this is less racy

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10214>
2021-04-23 03:43:05 +00:00
Mike Blumenkrantz e34dc0840b zink: use cached memory for staging resources
I think at one point before staging resource flagging was less reliable
this method made sense, but now it's worse

Fixes: 6ff6d01c37 ("zink: don't use cached mem for staging resources")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10363>
2021-04-23 03:31:34 +00:00
Mike Blumenkrantz 67d22bd8e0 zink: restore previous semaphore (prev_sem) handling
this was accidentally lost during refactoring

Fixes: fa36a16c68 ("zink: make timeline semaphores per-screen")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10421>
2021-04-23 03:20:02 +00:00
Mike Blumenkrantz de31a510cc zink: track persistent resource objects, not resources
this is broken after the backing object split because resources themselves
no longer have guaranteed lifetimes

Fixes: 616720d6ae ("zink: track resource_object usage instead of resource usage")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10270>
2021-04-23 03:08:18 +00:00
Mike Blumenkrantz 90315b14d1 softpipe: ci updates
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10398>
2021-04-23 01:08:43 +00:00
Mike Blumenkrantz fa2b32b3b1 softpipe: fix streamout queries
these need to always use the query index in order to access the correct
vertex stream

Fixes: ddb9ad363d ("softpipe: add support for indexed queries.")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10398>
2021-04-23 01:08:43 +00:00
Mike Blumenkrantz 8dbb022b8a softpipe: fix render condition checking
always casting this to a u64 is invalid if the value is just a bool,
and it even generates ASAN/valgrind errors about uninitialized reads

Fixes: 41450b03a8 ("softpipe: implement conditional rendering")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10398>
2021-04-23 01:08:43 +00:00