Marek Olšák
823ee12d57
radeonsi: optimize out LDS bank conflicts in the NGG culling shader
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
7648060dc0
radeonsi: enable NGG culling by default on gfx10.3 dGPUs
...
for better performance
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
e7d3f22c6a
radeonsi: don't disable NGG culling on gfx10.3
...
This was causing the hangs:
42f921387b - radeonsi/gfx10: disable vertex grouping
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
6810e6e4d0
Revert "radeonsi/gfx10: disable vertex grouping"
...
This reverts commit 42f921387b .
It causes GPU hangs on gfx10.3.
Fixes: a23802bcb9 - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Mike Blumenkrantz
0c70268ff7
zink: mark ARB_sample_shading as supported
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
bf9a1e0a4b
zink: add a pipe_context::get_sample_position hook
...
standard for most gallium drivers, not sure why it's not a util function
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
b009bd9685
zink: add ntv handling for ARB_sample_shading
...
this involves variable handling and decorations as well as a weird bitcast
for the array[1] gl_SampleMask in spirv
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
441b32bf3f
zink: add helper for vec-type input variables in ntv
...
we'll see a lot of reuse of this type of thing, so we can avoid duplicating
it later
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
7c5129985b
zink: implement ARB_draw_indirect
...
other than the vaguely gross case of primitive restart with incompatible
draw modes and/or restart index, this is no trouble since the buffer formats
are compatible
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7191 >
2020-10-16 15:55:09 +00:00
Mike Blumenkrantz
80c66642cc
zink: bump GLSL to 3.30
...
somehow all these tests Just Pass™
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7190 >
2020-10-16 11:37:49 -04:00
Mike Blumenkrantz
26b076ff66
zink: GLSL 1.50
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7190 >
2020-10-16 11:37:45 -04:00
Mike Blumenkrantz
815f0c01b0
zink: bump to glsl 1.40
...
but leaving compat mode at 1.30 for now
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7109 >
2020-10-16 13:57:56 +00:00
Mike Blumenkrantz
8028991f36
zink: enable gs pipe caps
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:34 -04:00
Mike Blumenkrantz
4c734da7de
zink: add gallium handling for geometry shaders
...
this is the create/bind/destroy hooks as well as the u_blitter shader
save during blit setup
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:32 -04:00
Mike Blumenkrantz
d59e4b8ce6
zink: round out handling for streamout buffer stride setting during draw
...
this adds cases for tess and geometry shaders in the xfb path for grabbing
stride off the shader
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:30 -04:00
Mike Blumenkrantz
9915c540b2
zink: remove ADJACENCY prim types from primconvert path
...
we can (and do) actually handle these natively
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:28 -04:00
Mike Blumenkrantz
d656c600a3
zink: add handling for gs in ntv
...
this hooks up execution modes and the gs-specific instructions
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:26 -04:00
Mike Blumenkrantz
9671cd9215
zink: re-transform gl_Position for gs input
...
we've transformed this in the vertex output, so we need to undo that here
ideally we'd only be performing this transform once, but that's going to get
complicated later with the halfz extension which requires shader keys on top
of this, so we can get around to simplifying things at that stage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:24 -04:00
Mike Blumenkrantz
ea2279daf1
zink: add ntv handling for geometry shader variables
...
these can reuse the unified loader codepath
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:22 -04:00
Mike Blumenkrantz
423a342ae7
zink: handle shader io vars more generically for use with gs
...
geometry shaders have more inputs and use a lot of the same codepaths as
vertex shaders, so these changes add the inputs and remove checks for vertex-only
shaders
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:20 -04:00
Mike Blumenkrantz
182f7f9ae8
zink: add some spirv_builder functions we'll be using for geometry shaders
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:11 -04:00
Gert Wollny
5934fc1708
r600/sfn: Update state docu
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
9f5e5fb912
r600/sfn: Fix the parameter component type
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
5f661977f8
r600/sfn: Use register keep-alive also when scanning the shader
...
Temporaries don't appear in the mapping, so they are not in the initial
register list.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
9eda7176e3
r600/sfn: fix remapping of deleted attributes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
f79b7fcf7c
r600/sfn: use 32 bit bools
...
That's closer to what the driver actually does.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
92a4d45bee
r600/sfn: use cacheless op for coherent image write
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
02e39b737a
r600/sfn: Handle mem barrier and image barrier by using ACK
...
When reading from and writing to the same image in a shader the
memory_barrier can possibly be handled by emitting an ack-write and then
wait for the ack when the memory barrier is set.
Not sure whow well this goes with the syncronization across all shader
invocations though.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
f664fc1c7b
r600/sfn: use shared pointer to GPR for FS sysvalues
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
876b975bec
r600/sfn: Rework get_temp_register to return a smart pointer to GPRValue
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
92bc0661f5
r600/sfn: fix mega fetch count for SSBO/Image atomics result fetch
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
d79d20d398
r600/sfn: Fix keepalive patch
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
86254134b3
r600/sfn: Fix ssbo resource offset for buffer loads
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Gert Wollny
ed66eafb6d
r600/sfn: Don't reuse registers for workgroup ID and local invocation ID
...
This fixes a number of compute shader tests. I'm not sure why though.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7142 >
2020-10-16 12:03:12 +00:00
Mike Blumenkrantz
aea74eac3d
zink: fix stencil wrapping
...
this was using the wrong enums
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7176 >
2020-10-16 00:03:17 +00:00
Jason Ekstrand
6be2bbec6d
Revert "iris: Use the data cache for indirect UBO pulls"
...
This reverts commit 3b784370c3 .
This fixes a 30% performance regression in Manhattan 3.1 on Icelake.
Fixes: 3b784370c3 "iris: Use the data cache for indirect UBO pulls"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7173 >
2020-10-15 20:53:05 +00:00
Jose Maria Casanova Crespo
d91cb31a2a
vc4: Enable nir_lower_io for uniforms
...
Altough the driver isn't expected to receive nir_var_uniform types
from GLSL this happens currently for one of the internal driver shaders.
At vc4_get_yuv_fs at vc4_blit.c there is a "stride" nir_var_uniform
variable that needs to be lowered so the shader can be compiled.
This regression was affecting several piglit tests under
spec/ext_image_dma_buf_import and at least MythTV application.
Fixes: 96d99f2ecc ("vc4: Only call nir_lower_io on shader_in/out")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3536
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7160 >
2020-10-15 22:05:58 +02:00
Jose Maria Casanova Crespo
3e877ca27d
vc4: Add missing range_base/range at nir_load_ubos in yuv_blit fs.
...
Fixes: f3b33a5a35 ("nir: Add a range_base+range to nir_intrinsic_load_ubo().")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7160 >
2020-10-15 22:05:58 +02:00
Jose Maria Casanova Crespo
4cfdd425b6
vc4: Add missing load_ubo set_align in yuv_blit fs.
...
Fixes: e78a7a1825 ("nir: Assert memory loads are aligned")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7160 >
2020-10-15 22:05:58 +02:00
Ian Romanick
5490f5cbce
iris: Don't generate Gen10-specific functions
...
v2: Also update Makefile.sources and Android build files. Noticed by
Lionel. Remove more stuff from iris_context.h.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899 >
2020-10-15 09:29:54 -07:00
Mike Blumenkrantz
cdfb1d925f
zink: add last few format maps for ARB_vertex_type_2_10_10_10_rev
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7140 >
2020-10-15 12:09:55 +00:00
Mike Blumenkrantz
8e96b4f430
zink: add VK_BUFFER_USAGE_INDEX_BUFFER_BIT to vertex buffer creation
...
these can be mixed vertex/index buffers, and there's not really any way
to know in advance
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132 >
2020-10-15 12:02:55 +00:00
Mike Blumenkrantz
c364124440
zink: handle null attachment for ARB_texture_buffer_object samplers
...
according to spec:
If no buffer object is bound to the buffer texture,
the results of the texel access are undefined.
so this is technically allowed
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132 >
2020-10-15 12:02:55 +00:00
Mike Blumenkrantz
69dc0f2f74
zink: assert valid format in zink_create_sampler_view()
...
catch issues higher up the stack here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132 >
2020-10-15 12:02:55 +00:00
Mike Blumenkrantz
00db994d96
zink: ensure resource tracking for sampler buffers in render batches
...
this fixes some synchronization issues when using e.g., buffer textures
that change their data repeatedly
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132 >
2020-10-15 12:02:55 +00:00
Mike Blumenkrantz
63b299d013
zink: implement ARB_texture_buffer_object
...
the pipe cap for this was enabled for some reason, but the actual functionality
was never implemented
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132 >
2020-10-15 12:02:55 +00:00
Mike Blumenkrantz
4c2b02f599
zink: increase descriptor pool sizes for other descriptor types we'll be using
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132 >
2020-10-15 12:02:55 +00:00
Boris Brezillon
91d9c55f3a
panfrost: Add blend shader support to bifrost
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151 >
2020-10-15 08:05:23 +02:00
Boris Brezillon
c7748968ba
panfrost: Flag blend shader function as an entry point
...
Some lowering functions used by bifrost are searching for an entry point.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151 >
2020-10-15 08:05:23 +02:00
Boris Brezillon
6d3fce5680
panfrost: Scalarize nir_load_blend_const_color_rgba
...
Bifrost is a scalar architecture, which means we can't load all
components of the blend constant at once. We could add a lowering pass
to scalarize nir_load_blend_const_color_rgba, but it's easier to handle
that at when lowering the blend equations.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151 >
2020-10-15 08:05:23 +02:00