Commit Graph

138856 Commits

Author SHA1 Message Date
Marek Olšák 1f8fa96412 radeonsi: make the gfx9 DCC MSAA clear shader depend on the number of samples
because different DCC equations are used.

Fixes: 3120113ee7 - radeonsi: implement DCC MSAA 4x/8x fast clear using DCC equations on gfx9

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10343>
2021-04-26 22:53:30 +00:00
Marek Olšák f3112c532b ac/surface: document more meta equation dependencies
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10343>
2021-04-26 22:53:30 +00:00
Mike Blumenkrantz 9712cd3186 zink: use non-atomic load/store ops if intrinsic is not actually coherent
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10475>
2021-04-26 18:04:30 -04:00
Mike Blumenkrantz c8dfed0c12 nir/gl_lower_buffers: set access for ssbo load/store instrs
this is the last place where the information is available, so set the info before
it gets lost

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10074>
2021-04-26 21:31:44 +00:00
Mauro Rossi a02328395d android: amd/common: add nir include path
$(MESA_TOP)/src/compiler/nir include path is added
for both clarity and build errors preventive reasons

Cc: 21.0 21.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10443>
2021-04-26 23:14:56 +02:00
Mauro Rossi e213bfd330 android: gallium/radeonsi: add nir include path
Since generated nir headers are included, it makes sense to include nir path

Fixes the following building error:

FAILED: out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeonsi_intermediates/si_shader_nir.o
...
In file included from external/mesa/src/gallium/drivers/radeonsi/si_shader_nir.c:26:
external/mesa/src/amd/common/ac_nir.h:29:10: fatal error: 'nir.h' file not found
         ^~~~~~~
1 error generated.

Cc: 21.0 21.1 <mesa-stable@lists.freedesktop.org>
Fixes: 1c702a8239 ("ac: move ac_lower_indirect_derefs() outside of the LLVM dir")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10443>
2021-04-26 23:14:52 +02:00
Mike Blumenkrantz 7888ef8c48 zink: update docs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>
2021-04-26 20:19:48 +00:00
Mike Blumenkrantz cd4637cf1f zink: ci updates
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>
2021-04-26 20:19:48 +00:00
Mike Blumenkrantz bee38fba1b zink: implement VK_EXT_provoking_vertex
this only needs to be set if the mode is LAST, otherwise the normal
pipeline state can be used and this one can be omitted

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>
2021-04-26 20:19:48 +00:00
Mike Blumenkrantz 78232665db zink: hook up VK_EXT_provoking_vertex
ideally we would want to require transformFeedbackPreservesTriangleFanProvokingVertex,
but as there is no fallback path, any amount of provoking vertex support
is still better than none, so tests related to this will continue to fail
for that hardware (intel)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>
2021-04-26 20:19:48 +00:00
Mike Blumenkrantz 0e439541a5 lavapipe: implement VK_EXT_provoking_vertex
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>
2021-04-26 20:19:48 +00:00
Keith Packard a60767ec26 vulkan/x11: Mark present complete using serial instead of MSC
Present operations do not necessarily complete after the requested
time; if the CRTC has been blanked, they will complete
immediately. This means we cannot use the MSC value to tell when a
present has finished.

Instead of using MSC, track whether each present is complete by serial
number, which is the low 32-bits of the SBC value. This value is
provided in the present_pixmap request and returned in the present
complete notify event.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2021-04-26 11:55:46 -07:00
Gert Wollny ad853fc0e1 r600: update pipe_draw_info::restart_index only when primitive_restart is enabled
This avoids the use of uninitialized memory:

Conditional jump or move depends on uninitialised value(s)
   at 0x5EDBF87: r600_draw_vbo (r600_state_common.c:2232)
   by 0x5DEFA00: u_vbuf_draw_vbo (u_vbuf.c:1329)
   by 0x5D990EF: cso_multi_draw (cso_context.c:1445)
   by 0x59B7EF4: _mesa_draw_arrays (draw.c:1346)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10442>
2021-04-26 17:32:20 +00:00
Gert Wollny d42c9e4787 virgl: use pipe_draw_info::restart_index only when primitive_restart is enabled
Closes #5651

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10442>
2021-04-26 17:32:20 +00:00
Connor Abbott a07ab4f914 freedreno: Don't lower indirects in GLSL IR
nir_lower_io_to_temporaries should generate better code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7274>
2021-04-26 17:07:02 +00:00
Connor Abbott 643f2cb8a3 ir3, tu: Cleanup indirect i/o lowering
Do all the necessary lowering in one place, during finalization, and
stop uselessly calling nir_lower_indirect_derefs in turnip. Splitting
i/o to elements should no longer be necessary since we use the i/o
semantics instead of variables now.

This has the side effect that we no longer generate enormous if-ladders
for tess/GS shaders with turnip.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7274>
2021-04-26 17:07:02 +00:00
Connor Abbott 77fcb01f7f nir/lower_clip_disable: Fix store writemask
We're storing into the array element, not the whole variable.

Fixes: fb2fe80 ("nir: add lowering pass for clip plane enabling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7274>
2021-04-26 17:07:02 +00:00
Connor Abbott decfea2f4e ir3: Prevent oob writes to inputs/outputs array
Don't setup inputs and outputs if we aren't using
load_input/store_output intrinsics. While it's mostly harmless, there
may be more outputs than expected which would lead to an oob write of
the outputs array when setting the register id to INVALID_REG.

Also be more paranoid with asserts to catch this.

Fixes: a6291b1 ("freedreno/ir3: rework setup_{input,output} to make struct varyings work")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7274>
2021-04-26 17:07:02 +00:00
Erik Faye-Lund b2b8b6c0e3 zink: enable required instance ext
VK_KHR_swapchain requires VK_KHR_surface in the instance to be enabled.

This fixes a validation-error.

Fixes: bbeee415ee ("zink: Learn about VK_KHR_swapchain")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10461>
2021-04-26 16:56:40 +00:00
Erik Faye-Lund 72eca47c66 docs: someome -> someone
A typo in the section about choice of language is a bit funny, but
let's fix it anyway ;)

Thanks to Ilia Mirkin for pointing this out.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10464>
2021-04-26 18:08:29 +02:00
Jason Ekstrand 3c8ac6a129 anv: Implement VK_EXT_provoking_vertex
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10460>
2021-04-26 15:13:19 +00:00
Jason Ekstrand d5ee5f6104 vulkan: Update the XML and headers to 1.2.177
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10460>
2021-04-26 15:13:19 +00:00
Jason Ekstrand 22b8bcda2c anv: Use the same re-order mode for streamout as for GS
This makes the vertex order of TRISTRIP and TRISTRIP_ADJ primitves
consistent between XFB output and GS input.  Technically, the Vulkan
spec allows us to XFB out in whatever order we want but being consistent
with GS inputs is probably nicer to apps.

Fixes: 36ee2fd61c "anv: Implement the basic form of VK_EXT_transform_feedback"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10460>
2021-04-26 15:13:19 +00:00
Erik Faye-Lund ecac7f3da1 docs: add missing zink-requirement
We need this feature in order to enable OpenGL 4.2 on Zink.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10456>
2021-04-26 14:22:12 +00:00
Erik Faye-Lund 341332b23a zink: correct image cap checks
PIPE_CAP_IMAGE_LOAD_FORMATTED doesn't depend on
shaderStorageImageExtendedFormats or
shaderStorageImageWriteWithoutFormat.

PIPE_SHADER_CAP_MAX_SHADER_IMAGES enables
GL_EXT_shader_image_load_store, which *does* require
shaderStorageImageExtendedFormats. Having
shaderStorageImageWriteWithoutFormat and
shaderStorageImageReadWithoutFormat isn't enough to support this.

It *might* be possible to lower extended formats to format-less
reads or writes, but we don't currently do that, so we should
just correct the test for now.

Fixes: 3f9a6d333b ("zink: export shader image caps using features")
Fixes: 5282210c0b ("zink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10456>
2021-04-26 14:22:12 +00:00
Timothy Arceri 5ec8cbb9c0 mesa: fix _mesa_add_state_reference() declaration mismatch
Fixed gcc warnings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>
2021-04-26 13:48:11 +00:00
Timothy Arceri 8d84a89cf6 mesa: fix _mesa_add{_typed}_unnamed_constant() declarations
The function may be passed in a single float or a vec4. Fixes
gcc warnings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>
2021-04-26 13:48:11 +00:00
Timothy Arceri db717677e7 mesa: make _mesa_find_temp_intervals() a static function
It is no longer used externally.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>
2021-04-26 13:48:11 +00:00
Erik Faye-Lund a7e95dfca5 docs: fix quoting around a few limits
These two were quoted differently than the other limits in this
document. Let's fix that to be consistent.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10455>
2021-04-26 12:59:33 +00:00
Erik Faye-Lund 0747fb546c docs: fixup link to extension
I accidentally missed the actual link-definition here, so let's add
that.

Fixes: ff007afce2 ("zink: document requirement of VK_EXT_custom_border_color")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10455>
2021-04-26 12:59:33 +00:00
Erik Faye-Lund 6e540ca7ca zink: remove memory-model leftovers
We also need to stop emitting these details, otherwise we need to answer
to the validator!

Fixes: 95d9d811c9 ("zink: do not require vulkan memory model for shader-images")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10377>
2021-04-26 12:41:52 +00:00
Rhys Perry 816ec3ecb4 radv: disable VK_FORMAT_R64_SFLOAT
This format was enabled by accident, isn't useful, and doesn't work.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4701
Cc: 21.1 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10450>
2021-04-26 12:10:13 +01:00
Erik Faye-Lund 496f99e8d1 zink: only emit extended-formats cap if needed
We do not require the extended formats feature to enable shader-images,
so we can end up accidentally enabling the cap even when we don't need
to, which can lead to validation issues.

This also prepares us for the SPV_EXT_shader_image_int64 extension, if
we ever want to support that.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10370>
2021-04-26 09:28:49 +00:00
Erik Faye-Lund 7ef9379040 docs: use code-block for ini
These code-blocks are close enough to INI-files to parse that way, so
let's use that for some syntax-coloring :)

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund dc2eca51ed docs: use code-block for c
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund 63496d25de docs: use code-block for glsl
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund 54ad6f91c6 docs: use code-block for console-content
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund e6e002fc34 docs: use math notation for example matrices
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund 525f7b6a23 docs: use tables instead of pre-formatted text
This makes this easier to read.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund 1e4e22e6ba docs: nest cherry-pick example under note
This example relates to the message in the note, so it should be nested
under that note.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund de0fbffb81 docs: remove documentation of MESA_HPCR_CLEAR
We haven't respected this variable for about 10 years, as the support
was removed in bc63b226bc ("xlib: remove a ton of old xlib driver
cruft").

So let's also remove the documentation.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund 67f46d70de docs: remove documentation of MESA_PRIVATE_CMAP
This is used in the Mesa GLUT implementation, which has been separated
out into its own repo, and is largely abandoned in favour of FreeGLUT.

So let's not try to document MESA_PRIVATE_CMAP, as it's just going to
confuse users.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund 1637f1dedf docs: remove documentation of MESA_CI_VISUAL
The support for color-indexed rendering was removed from mesa all the
way back in 2010, in commit 81fe9949ef ("mesa/xlib: Remove support for
color-index rendering").

So let's drop it from our documentation as well. This environment
variable does nothing.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
Erik Faye-Lund dc310fc2e7 docs: remove out-of-date gles info
This info is no longer true, so let's delete it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>
2021-04-26 08:39:02 +00:00
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
Erico Nunes 48d48fbf3c docs/lima: add an initial page for Lima
This is a cleaned up and updated version of the readme page for Lima
that was until now being maintained separately.
Let's move it in-tree so it is maintained along with the pages for
other similar drivers.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10406>
2021-04-24 16:42:01 +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