Commit Graph

142443 Commits

Author SHA1 Message Date
Emma Anholt 54210c685f i915g: Fix backface stencil when front_ccw is set.
If we're doing separate front/back stencil ops, then in the absence of a
hardware bit for setting front_ccw (which you can already see from how we
manage cull face) we need to flip front/back stencil register settings.

Closes: #4974, #4975
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11706>
2021-07-12 18:12:05 +00:00
Emma Anholt ba11a30bf7 i915g: Fix dumping of 3DSTATE_BACKFACE_STENCIL_OPS.
Its length was overly long and it meant we skipped the name of
3DSTATE_BACKFACE_STENCIL_MASKS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11706>
2021-07-12 18:12:05 +00:00
Samuel Pitoiset ee79b87c62 radv: lower primitive shading rate in NIR
This allows more potential compiler optimizations if the value is a
constant or from a scalar load.

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/11579>
2021-07-12 17:54:07 +00:00
Emma Anholt a7e753cb96 turnip: Fix allocation size for vkCmdUpdateBuffer.
tu_cs_alloc() takes a size in dwords, not bytes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11743>
2021-07-12 17:15:56 +00:00
Erik Faye-Lund 3720447204 lavapipe: expose more storage-image features
I believe these Gallium caps imply these Vulkan features. If they don't,
then we got things wrong on the Zink side as well ;)

While we're at it, query shaderStorageImageWriteWithoutFormat based on
the PIPE_SHADER_CAP_MAX_SHADER_IMAGES cap. This matches what the gallium
OpenGL frontend does.

This brings Zink on Lavapipe up to OpenGL 4.5.

For some reason, a bunch of PBO tests starts failing on CI for Zink, but
that doesn't seem like a Lavapipe problem...

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Erik Faye-Lund 2e29857bb6 llvmpipe: only report supported shader-image formats
LLVMpipe has a rather limited implementation of shader-images, so let's
limit what we report to the formats required by the spec, as all of
those seems to work fine.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Erik Faye-Lund dc9343b42d lavapipe: query formats for shader-image support
Assuming all formats are supported here isn't a good plan; we
don't actually support all formats.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Erik Faye-Lund 3baeb1c4d1 llvmpipe: reject unsupported shader-image formats
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Daniel Stone 9c8c0c2bb3 ci/panfrost: Temporarily disable sun50i/RK3288
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11825>
2021-07-12 16:07:23 +01:00
Jason Ekstrand 81670a47f0 docs: Add docs for running a local Mesa build
I'm tired of explaining this to people.  Let's put it in the actual
project docs.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11809>
2021-07-12 14:40:50 +00:00
Marcin Ślusarz f3742b9c13 intel/compiler: document register types
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11677>
2021-07-12 13:27:41 +00:00
Daniel Schürmann 9de4fe95e2 aco: remove (wrong) GCC array-bounds warning
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00
Daniel Schürmann 036be42d6f aco: refactor SDWA opcode validation
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00
Daniel Schürmann 5e3297a97d aco/meson: remove unnecessary dependencies
Also moves idep_vulkan_util_headers to /tests/meson.build

Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00
Daniel Schürmann 0eea0e55ad aco: add 'common/' and 'llvm/' prefix to #includes
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00
Daniel Schürmann 3f9e986d33 aco: add missing Licenses and remove Authors from files
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00
Daniel Schürmann 59fdaa1985 aco: reorder and cleanup #includes
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00
Daniel Schürmann 452c4c8ba1 aco/util: replace DIV_ROUND_UP(n+1,m) by n/m+1
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00
Thomas H.P. Andersen cf05a7e66f broadcom/compiler: fix add vs. mul
Spotted by a compile warning

Fixes: 7f61ff7b4d ("broadcom/compiler: Merge instructions more efficiently")

Reviewed-by: Iago Torral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11764>
2021-07-12 11:54:03 +00:00
Thomas H.P. Andersen 458801e2c3 broadcom/compiler: use correct flag enum
They have the same value, so no functional change

Reviewed-by: Iago Torral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11764>
2021-07-12 11:54:03 +00:00
Lionel Landwerlin 91dcbf1f56 intel/compiler: Track latency/perf of LSC fences
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11759>
2021-07-12 11:39:03 +00:00
Icecream95 48af341b36 panfrost: Fix GPU ID for t76x in get_perf_config
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11824>
2021-07-12 09:07:48 +00:00
Iago Toral Quiroga 642812239e v3dv: expose geometry shaders
A run of dEQP-VK.*geom* has 6328 test passes and 16 failures. 14 of
these failures are related to a CTS bug affecting atomic operations
for which I submitted a CL to Khronos. Another fail looks like it might
be a case of the error threshold in CTS being slightly low. There is
only one test fail in that list that looks like it might be an actual
driver bug, but it is a variable pointers test, so it might be unrelated
to geometry shaders in the end.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 09:25:28 +02:00
Iago Toral Quiroga 126eb5c8b9 broadcom/ci: update expected fails for v3dv after enabling geometry shaders
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 09:25:28 +02:00
Iago Toral Quiroga c188d06326 v3dv: remove deferred vkCmdClearAtachments path
This was required to handle the case of secondary command buffers that
did not have framebuffer information available from the primary, since
we used to have an implementation that required this information to
be available for the fallback path of vkCmdClearAttachments. Now that
we can handle our our attachment clears in the current subpass by
emitting draw calls, we no longer need the framebuffer information to
be available and we can remove this.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 09:25:28 +02:00
Iago Toral Quiroga 5ba7f64b45 v3dv: remove fallback path for vkCmdClearAttachments
Now that we support layered clears this code is dead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 09:25:28 +02:00
Iago Toral Quiroga 26d1c6893a v3dv: implement layered attachment clears
Now that we have geometry shaders, we can leverage this to implement
clears of layered framebuffers by adding a geometry shader in our
clear pipelines that redirects the clear rect to the appropriate
layer in the framebuffer, instead of falling back to emitting separate
clear jobs for each layer, which is a lot slower.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 09:25:28 +02:00
Iago Toral Quiroga ee11e9183d broadcom/compiler: don't ignore constant offset on per-vertex input loads
Fixes:
dEQP-VK.clipping.user_defined.clip_distance.vert_geom.{5,6,7,8}

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:56 +02:00
Iago Toral Quiroga e1a24a0047 broadcom/compiler: handle compact input arrays for geometry shaders
Clip distance arrays will come as compact array variables, so we need
to handle them as such, like we did for vertex inputs.

Fixes:
dEQP-VK.clipping.user_defined.clip_distance.vert_geom.{1,2,3,4}

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:56 +02:00
Iago Toral Quiroga df1d08533c v3dv: fix copy buffer to image TFU path for 3D images
This bug was exposed by the following CTS tests (requires
geometry shaders):
dEQP-VK.geometry.layered.3d.*.readback

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:56 +02:00
Iago Toral Quiroga 31a786c80a v3dv: handle QUNIFORM_FB_LAYERS
There is a bit of a corner case here for secondary buffers that
don't inherit framebuffer information, since those won't have
access to the number of layers in the framebuffer by the time
we get here. Since we only emit this to sanitize the value of
gl_Layer produced from geometry shaders, I think it is probably
fine to lie about it and just use the maximum number of layers
we support. The only issue with that is that broken shaders that
emit out of bounds layer indices (which the spect states may lead
to unfined shading results) may cause undefined results.

In the future we could do better and patch the uniform streams
later when the secondary is executed inside a primary, since we
will have the required framebuffer information at that point,
but for now this seems like a reasonable compromise.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga 991cca2e77 v3dv: emit state packets for geometry shaders
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga 353f0a180f broadcom/compiler: create a helper for computing VPM config
This code is the same across drivers.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga 9e7d9a6efb v3dv: add support for geometry shaders to pipelines
This gets our graphics pipelines (and pipeline cache) to accept
and compile geometry shader modules.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga 2733a17b14 broadcom/compiler: track if geometry shaders write gl_PointSize
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga 4c94f93413 v3dv: add a few more broadcom shader stage helpers
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga 9803336016 v3dv: define a generic helper to create binning pipeline stages
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga 81b22d5aba v3dv: extend broadcom stages to include geometry
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Iago Toral Quiroga d448dafcd4 v3dv: always free pipeline stages after compiling
We were not freeing this when the pipeline was loaded from the cache.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11783>
2021-07-12 08:35:55 +02:00
Dave Airlie 8dcd4e4849 crocus: add GL_CLAMP emulation in driver again.
I removed this because I thought the state tracker could handle it,
and it really should handle it, but it has some minecraft side effects
I'm unsure about. This fixes the problem for now, we can revisit it later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11822>
2021-07-12 15:18:13 +10:00
Dave Airlie ead3340262 crocus/gen8: fix wrap mode needs border color.
missing piece here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11821>
2021-07-12 14:24:35 +10:00
Alyssa Rosenzweig dd98918a5a agx: Flip point coordinates because OpenGL
Fixes dEQP-GLES2.functional.shaders.builtin_variable.pointcoord

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig 3291779c21 asahi: Handle point coordinates
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig 3d75cff7d7 asahi: Identify triangle/lines vs point varyings
Seems to allow skipping over point coords?

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig e2176490d6 asahi: Unpack varying descriptors (1x)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig d37bb48211 asahi: Lower PIPE_CAPF_MAX_POINT_WIDTH to hw limit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig 2468b123bb asahi: Set bit for psiz
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig 88a8d7f76f asahi: Set point magic bit in rasterizer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Alyssa Rosenzweig af2a4bc163 asahi: Set bits in UNK11 needed for points
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11818>
2021-07-11 22:32:41 +00:00
Mike Blumenkrantz 73f6bff07f zink: fix mem info query to be more permissive
airlied was right, this was way too conservative

Fixes: ff4ba3d4a7 ("zink: support PIPE_CAP_QUERY_MEMORY_INFO")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11803>
2021-07-11 20:18:16 +00:00