Commit Graph

141446 Commits

Author SHA1 Message Date
Jan Beich aefa40886b anv: adjust headers for non-GNU after e9e1e0362b
src/intel/vulkan/anv_device.c:27:10: fatal error: 'sys/sysmacros.h' file not found
 #include <sys/sysmacros.h>
          ^~~~~~~~~~~~~~~~~

Fixes: e9e1e036 ("anv: implement VK_EXT_physical_device_drm")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11516>
2021-06-22 13:38:26 +00:00
Simon Ser 7aaa54feb5 radv: implement VK_EXT_physical_device_drm
This adds support for the Vulkan extension introduced in [1]. The
extension allows to get a VkPhysicalDevice's DRM node device IDs.

[1]: https://github.com/KhronosGroup/Vulkan-Docs/pull/1356

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8390>
2021-06-22 13:18:18 +00:00
Mike Blumenkrantz 60ff9dea27 zink: use multidraw
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11498>
2021-06-22 13:06:35 +00:00
Mike Blumenkrantz b6855b2e18 zink: support multidraw
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11498>
2021-06-22 13:06:35 +00:00
Mike Blumenkrantz 84199077d9 zink: clear the fb clears array instead of freeing it on reset
this cuts cpu usage by ~2% in sourcemark due to not reallocating the array
on every draw

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11499>
2021-06-22 12:55:37 +00:00
Mike Blumenkrantz 6cc2929e87 zink: add more clear hooks
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11466>
2021-06-22 12:45:39 +00:00
Mike Blumenkrantz 3f420b3f55 zink: add a flag for disabling conditional render during blit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11466>
2021-06-22 12:45:39 +00:00
Charlie Turner 786fa3435c spirv_to_nir: Add environment variable to change default log level
During dEQP runs for radv, I see a lot of warnings like,

ERROR - dEQP error: SPIR-V WARNING:
ERROR - dEQP error:     In file ../src/compiler/spirv/spirv_to_nir.c:1073
ERROR - dEQP error:     Decoration not allowed on struct members: SpvDecorationRestrict
ERROR - dEQP error:     408 bytes into the SPIR-V binary

This fails jobs on Gitlab, due to,

Job's log exceeded limit of 4194304 bytes.
Job execution will continue but no more output will be collected.

Since it doesn't seem feasible right now to fix the many shaders in
the VK-CTS triggering this warning, add an environment toggle that
allows test runners to only see the level of commentary they want.

v2 from Martin:
 - Add my SoB

v3 from Martin:
 - fix the indentation (suggested by Eric)
 - put the declarations at the top of the function

v4 from Martin:
 - make vtn_default_log_level() static (Marcin)
 - cache the default level in vtn_log (Marcin)
 - move vtn_log_level_strings inside vtn_default_log_level()
 - Fix the build issue on MSC

Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11491>
2021-06-22 13:59:43 +03:00
Charlie Turner e9991d5ff1 radv: Provide a toggle to avoid warnings about unsupported devices.
In the CI, we have such devices, and this message is printed many
hundreds of times. This results in a useless spam which makes it
difficult to see real issues.

v2 from Martin:
 - Reword the commit message a bit
 - Add a SoB

Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11491>
2021-06-22 13:59:43 +03:00
Alejandro Piñeiro 26af7ef67f v3dv/build: meson infrastructure for multi-hw-version support
We follow the same approach that v3d. We compile the files that
depends on the version several times, passing a different version each
time. We link all those per-version libs on the main library.

Note that right now we only support version == 42, so the array of
supported versions is one-sized.

Also note that although we were doing a previous work to split
hw-version dependant code from general code, this is the first commit
that only inject the current V3D_VERSION on the former.

We have two cases where we hardcode the V3D_VERSION (as a full
wrapping would be an overkill) that we need to include here to avoid
warnings/errors if we do that before or after.

Having some exceptions also happens on v3d. As we are here we add some
comment on v3d clarifying that.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro f257c79ea4 v3dv: remove gen-dependant includes from v3dv_private
As we are here, we move the hooks for the packet definitions (used by
the broadcom packets helpers) to v3dv_cl

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro 2e40f13f9a v3dv: don't use cl_packet_length for prepacked data
cl_packet_length depends on the specific hw generation packets, so it
is can't be included directly by main header.

The straight forward solution would be to allocate them dynamically,
based on the current generation. That ended to be complex and
messy. Also, even if that change between hw versions, it will not
change significantly.

So we just add some definition with the size of the packets we
prepack. We just need to be careful that this needs to be the maximum
value considering all the versions supported.

Note that on Opengl v3d does something similar, using hardcoded
values, but without a define, neither a runtime check.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro 1bea0d76b8 v3dv: split v3dv_descriptor hw version dependant to a new source file.
As part of this, we get rid of the v3dv_xxx_descriptor structs to
v3dv_descriptor. The main reason is that in order to support several
versions, we would need to define them several times. Also, they were
somewhat an overkill even before, as their main advantage was getting
the offset for each data on the combined case. That functionality is
replaced with some new helpers.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro 67f4624c0c v3dv: move several hw version dependant code to their own (v3dvx) source file
This includes code from:
  * v3dv_cmd_buffer
  * v3dv_meta_copy
  * v3dv_meta_clear

v2: move some of the functions to source files that makes more sense
now (Iago).

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro 76634f9b8a v3dv: split v3dv_device hw version dependant code to a new source file
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro f526f92043 v3dv: split v3dv_format hw version dependant code to a new source file
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro a3793dbef3 v3dv: split v3dv_image hw version dependant code to a new source file
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro ad805712ed v3dv: split v3dv_pipeline hw version dependant code to a new source file
v2: merge some of the v3dvx entrypoints to general pack methods (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro 83ba3c1020 v3dv: start to move and wrap hw-version code with v3dv_queue
The idea would be to move all the code that uses cl_emit,
cl_emit_with_prepack, v3dx_pack, and any enum/structure definition
defined on the v3d pack headers.

All those methods would be defined on v3dvx_private (that would be the
equivalent to v3dx_context.h on v3d).

This commit includes the definition of v3dX for the current version
supported (42), a function calling wrapper, and the move for v3dv_queue
methods as a reference.

About the function calling wrapper, I took the idea from anv. We don't
have on v3d, but we added it because we foresee that we will need that
functionality more often. So without that macro, in order to call the
correct version of the method from the general code we would need to
do like we do on v3d, and doing something like this:

            if (devinfo->ver >= 42)
                    return v3d42_pack_sampler_state(sampler, pCreateInfo);
            else
                    return v3d33_pack_sampler_state(sampler, pCreateInfo);

So with the macro we can just do this:
            v3dv_X(device, pack_sampler_state)(sampler, pCreateInfo).

Note that as mentioned, that is to be used on the general code, so a
runtime decision. If we are already on version-dependant code (so at
v3dx_queue for example) we just use v3dX, as at that point is a build
time decision.

Also, fwiw, I don't like too much the name of that macro, but I was
not able to think on a better one.

v2: merge job_emit_noop_bin and job_emit_noop_render (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro efc363a7ce v3dv/cmd_buffer: move cl_emit calls for Draw methods to helpers
As we plan to move them to hw-dependant source files, but not the main
entrypoint.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro d39930fb92 v3dv/cmd_buffer: add helper job_emit_binning_prolog
Just to isolate more tightly cl_emit calls. That would make easier to
split v3dv_cmd_buffer.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Alejandro Piñeiro 1dc8c2d9f6 v3dv: rename v3dv_pack for v3dvx_pack
For consistency, as we use use the v3dvx convention to point that it
depends on the hw version. Also on OpenGL the equivalent macro is
v3dx_pack.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11310>
2021-06-22 11:34:06 +02:00
Dave Airlie 7c4478f43b i965: fix regression in pipe control on g45
The cleanups got the wrong value here, just noticed in drive by.

Fixes: b505db3864 ("intel: Simplify few version checks involving G4X")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11519>
2021-06-22 07:40:30 +00:00
Erik Faye-Lund 91a1849ff0 wgl: remove hard limit on pixelformats
Zink on Intel's Windows driver supports more than 256 pixelformats,
triggering asserts. So let's get rid of the hard-coded limit, and
instead use u_dynarray to store the pixelformat info.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11447>
2021-06-22 06:57:03 +00:00
Samuel Pitoiset 8f9368ddb7 ac/perfcounters: add a GPU block ID to every block definitions
The enumeration comes from AMDVLK.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
2021-06-22 06:38:55 +00:00
Samuel Pitoiset 5a8776fd8c ac/perfcounters: add more SPM configuration fields
Add the number of SPM wires because sometimes a block has eg.
2 counters but only holds 3 16-bit counters instead of 4.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
2021-06-22 06:38:55 +00:00
Samuel Pitoiset 3d8d6ebcb0 ac/perfcounters: rename num_multi to num_spm_counters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
2021-06-22 06:38:54 +00:00
Samuel Pitoiset da94772510 ac/perfcounters,radeonsi: rework performance counters layout
Instead of having different layouts which might complicate things when
some registers are missing, hardcode the SELECT and SELECT1 registers
into separate arrays.

The SELECT registers are "legacy" counters, while the SELECT1 registers
are SPM counters.

This is more verbose and emit more UCONFIG registers, but emitting the
SELECT registers is now much simpler and it seems less error prone.
This will also help emitting the SPM configuration.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
2021-06-22 06:38:54 +00:00
Samuel Pitoiset 66a34be6ac ac/perfcounters: remove ac_pc_block_base::num_prelude
This seems unnecessary if the first select register is correctly set.
This CB filter was always disabled anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11186>
2021-06-22 06:38:54 +00:00
Tapani Pälli 100fc3020a anv: provide dummy vkCmdSetPatchControlPointsEXT
This makes dEQP-VK.api.version_check.entry_points pass and matches how
other drivers are handling this case. We do not support the feature but
still need to provide a dummy entrypoint.

v2: throw error if/when called (Jason)

Fixes: 0d031d1da3 ("anv: toggle on VK_EXT_extended_dynamic_state2")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11503>
2021-06-22 09:14:46 +03:00
Daniel Stone 9102921109 llvmpipe: Add handle export for resource_get_param
mesa/mesa@2dcc9c7f54 from mesa/mesa!6639 added a resource_get_param
hook for llvmpipe, which was nice since it gave lavapipe more features.
One of those features was not exporting llvmpipe textures, so those
parts were stubbed out and landed in an assert(0).

This completely broke kms_swrast (llvmpipe+GBM) on non-release builds,
since that definitely does need to export llvmpipe textures.

The query codepath which caused this explosion does fall back to
resource_get_handle() - which is how it worked previously - but not all
callers do this, so just do what all other drivers implementing
resource_get_param() do and open-code the translation.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reported-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Jonas Ådahl <jadahl@gmail.com>
Fixes: 2dcc9c7f54 ("llvmpipe: add resource get param support.")
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6639
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11504>
2021-06-22 02:13:13 +00:00
Jason Ekstrand d3ea8f519e docs,isl: Document Sandy Bridge HiZ/stencil
This is annoying and tricky and we don't have all the gory details
written down in one central place anywhere.  Add a docs section on it.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11500>
2021-06-21 22:54:31 +00:00
Bas Nieuwenhuizen 8dfb240b1f nir: Add raytracing shader call lowering pass.
Really copying Jason's pass.

Changes:
- Instead of all the intel lowering introduce rt_{execute_callable,trace_ray,resume}
- Add the ability to use scratch intrinsics directly.

Reviewed-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/10339>
2021-06-21 21:23:51 +00:00
Bas Nieuwenhuizen 02c5dc8035 nir: Add lowered vendor independent raytracing intrinsics.
For use in a generic nir_lower_shader_calls.

Reviewed-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/10339>
2021-06-21 21:23:51 +00:00
Emma Anholt 58f5605124 freedreno: Handle full blit discards by invalidating the resource.
The previous implementation had several issues:

- It wasn't checking all the conditions necessary for "this blit updates
  the whole surface", like PIPE_MASK_Z but not S on a depth/stencil
  buffer.
- It would reset the previous batchbuffer, even if that batch had side
  effects on other buffers.
- The layering was painful to follow and made any recursion extra
  dangerous.

Now, we use a more conservative test (enough for the resource shadowing
case) and just invalidate the buffer up front, which should have the right
logic for discarding drawing to that resource.

I found I had to add fd_bc_flush_writer() to the end of fd_blitter_blit()
-- a flush was happening at fb state restore time when the discard flag
was set, and losing that flush breaks
dEQP-GLES31.functional.stencil_texturing.format.stencil_index8_cube.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
2021-06-21 20:48:21 +00:00
Emma Anholt 74ede4b353 freedreno: Move the rsc-based batch flushing to helper functions.
I want to reuse these, and this gives them nice names.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
2021-06-21 20:48:21 +00:00
Emma Anholt 447b6f60a6 gallium/util: Introduce a helper for finding whole-resource blits.
This can be useful for tilers to discard previous rendering to a buffer
instead of reloading before drawing all the pixels.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11455>
2021-06-21 20:48:21 +00:00
Emma Anholt 9ce44dc9bc gallium/draw: Garbage collect draw_pt_fetch_emit.
Now that we don't have draw_set_force_passthrough(), this middle end was
inaccessible.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11410>
2021-06-21 20:27:35 +00:00
Emma Anholt 5e019269d6 gallium/draw: Garbage collect draw_set_force_passthrough
Introduced in c48da7d78b ("draw: add switch for drivers to force vertex
data passthrough") in 2008 and never used.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11410>
2021-06-21 20:27:35 +00:00
Simon Ser ae2b7a29d2 docs/envvars: document MESA_VK_WSI_PRESENT_MODE
This env var was introduced in a182adfd83 ("wsi: allow to override the
present mode with MESA_VK_WSI_PRESENT_MODE").

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11441>
2021-06-21 20:22:51 +00:00
Simon Ser 7369b1a21e vulkan/wsi/wayland: simplify wl_surface version check
No need to cast to a wl_proxy, there is a wl_surface variant
available.

No need to cache the result of get_version(), this is just a
one-line getter and doesn't perform any roundtrip.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11420>
2021-06-21 20:01:28 +00:00
Jordan Justen eb98171252 intel/gen125.xml: Drop GPGPU_WALKER
Ref: f4902bb189 ("intel/genxml,anv,iris: Drop the legacy compute path from gen125.xml")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11489>
2021-06-21 19:40:14 +00:00
Lionel Landwerlin e9e1e0362b anv: implement VK_EXT_physical_device_drm
v2: add docs
    update error messages (Sagar)

v3: Use fstat() (Jason)

v4: Do fstat() on demand (Jason)

v5: clear major/minor values if not present (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8649>
2021-06-21 19:18:07 +00:00
Marek Olšák 6a2e3d2736 radeonsi: cleanup some primitive discard CS TODOs regarding instancing, etc.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák 4b5eb336e1 radeonsi: skip buffer_atomic_add(ptr, n) when n=0 in the prim discard CS
This improves performance of the shader nicely.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák df4de12af4 radeonsi: drop support for triangle fans from the prim discard CS
because it doesn't implement triangle fan splitting, so it's incomplete

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák 4fa58c04e4 radeonsi: drop gfx7 support from the prim discard CS to simplify code
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák fc95ba6c86 radeonsi: remove the Z culling option from the primitive discard CS
Not useful.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák a448074d05 radeonsi: don't compile TES and GS draw_vbo variants for the prim discard CS
This also fixes the incorrect emit_draw_packets template argument.
The condition should be inverted.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00
Marek Olšák b35b5926c9 radeonsi: try to keep all VS input loads together for better perf
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
2021-06-21 19:03:29 +00:00