Alyssa Rosenzweig
0eb84eb702
panfrost: Don't double-create scratchpad
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Fixes: 4f7fddbd71 ("panfrost: Pass size to panfrost_batch_get_scratchpad")
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3119 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3119 >
2019-12-16 23:32:07 +00:00
Alyssa Rosenzweig
73bd9fe20c
panfrost: Simplify sampler upload condition
...
Makes it more obvious what's going on.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3119 >
2019-12-16 23:32:06 +00:00
Icecream95
37bc028367
gallium/auxiliary: Handle count == 0 in u_vbuf_get_minmax_index_mapped
...
This makes u_vbuf_get_minmax_index_mapped return min = 0 / max = 0
when info->count == 0.
That should never happen anyway, but this commit makes it at least
return a sane value that callers expect, and also allows us - and
GCC - to assume count != 0 for optimization purposes.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3050 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3050 >
2019-12-16 22:57:35 +00:00
Icecream95
80aca96803
gallium/auxiliary: Reduce conversions in u_vbuf_get_minmax_index_mapped
...
With this patch, GCC generates vectorized code that does the comparisons
without converting the indices to 32-bit first.
This optimization makes the aforementioned function almost twice as fast
for ARM NEON, and should speed up vectorised code on other platforms.
Without vectorisation, the function is still a percent or two faster,
but slightly larger.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3050 >
2019-12-16 22:57:35 +00:00
Marek Olšák
69ea473eeb
amd/addrlib: update to the latest version
...
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2019-12-16 17:04:57 -05:00
Jonathan Marek
a3ea4805aa
turnip: remove duplicate A6XX_SP_CS_CONFIG_NIBO
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3104 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3104 >
2019-12-16 21:04:42 +00:00
Jonathan Marek
2d3492bc62
turnip: change emit_ibo to be like emit_textures
...
Adds missing alignment and error checking.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3104 >
2019-12-16 21:04:42 +00:00
Jonathan Marek
718bd4f8b4
turnip: fix emit_ibo
...
Based on the GL driver:
-Compute needs different opcode (this fixes a GPU hang problem)
-REG_A6XX_SP_IBO_LO/REG_A6XX_SP_CS_IBO_LO were swapped
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3104 >
2019-12-16 21:04:42 +00:00
Jonathan Marek
65007d438c
turnip: remove compute emit_border_color
...
Current tu6_emit_border_color doesn't work for compute and there's no
example from the GL driver to base it on, so replace it with a finishme.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3104 >
2019-12-16 21:04:42 +00:00
Jonathan Marek
c9b12c71d7
turnip: fix emit_textures for compute shaders
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3104 >
2019-12-16 21:04:42 +00:00
Rafael Antognolli
ed43d01dec
utils/os_socket: Define ssize_t on windows.
...
Fixes: ef5266ebd5 ("util/os_socket: Add socket related functions.")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
2019-12-16 20:35:22 +00:00
Marek Olšák
43f05e0421
radeonsi/gfx10: fix ngg_get_ordered_id
...
This could have caused issues with NGG streamout.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
8edf3df3e4
radeonsi: reset more fields in si_llvm_context_set_ir to fix reusing ctx
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
1436c261e9
radeonsi: fix determining whether the VS prolog is needed
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
378444ce90
radeonsi: allow generating VS prologs with 0 inputs
...
If "ls_vgpr_fix" is set, we use a prolog, but it can have 0 inputs.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
4846aeaf57
radeonsi/gfx10: don't insert NGG streamout atomics if they are never used
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
de4a4595f6
radeonsi: don't wrap the VS prolog in if (ES thread) .. endif
...
We can execute it unconditionally and the values computed for disabled
threads won't be used anyway.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
db67e51903
radeonsi: set is_monolithic for VS prologs when the shader is really monolithic
...
This fixes a bug with NGG that is probably harmless.
Basically, !is_monolithic makes the VS prolog emit
llvm.amdgcn.init.exec.from.input, which sets the EXEC mask to only enable
ES threads. In the NGG non-GS case, the GS threads <= ES threads, so it was
never an issue.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
451bc91158
radeonsi: disallow compute-based culling if polygon mode is enabled
...
Polygon mode can generate thick points or lines.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
1a07df840e
radeonsi: deduplicate ES and GS thread enablement code
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
f90cbd18ff
ac: fix the return value in cull_bbox when bbox culling is disabled
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Marek Olšák
e5e3ffa6b9
ac: fix ac_get_i1_sgpr_mask for Wave32
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095 >
2019-12-16 20:06:07 +00:00
Alyssa Rosenzweig
5386b7e011
panfrost: Remove asserts in panfrost_pack_work_groups_compute
...
It's a hot routine and these are exceedingly unlikely to break.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3067 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3067 >
2019-12-16 19:48:28 +00:00
Alyssa Rosenzweig
6378797a6d
panfrost: Pack invocation_shifts manually instead of a bit field
...
gcc generates exceptionally bad code for panfrost_pack_work_groups_fused
otherwise ... although that routine is somehow still hot ...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3067 >
2019-12-16 19:48:28 +00:00
Iván Briano
a649bbffee
anv: Export VK_KHR_buffer_device_address only when really supported
...
Fixes: 1b6991ba1d ("anv: Implement VK_KHR_buffer_device_address")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3071 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3071 >
2019-12-16 19:24:46 +00:00
Iván Briano
0fd93b9589
anv: Export filter_minmax support only when it's really supported
...
Fixes: bea4d4c78c ("anv: add VK_EXT_sampler_filter_minmax support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3071 >
2019-12-16 19:24:46 +00:00
Jonathan Marek
b936143327
freedreno/ir3: lower mul_2x32_64
...
lower_mul_2x32_64 generates mul_high opcodes, and lower_mul_high is done by
nir_lower_alu, so call nir_lower_alu after nir_opt_algebraic.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
2019-12-16 13:37:09 -05:00
Jonathan Marek
d4676d7a16
turnip: implement CmdFillBuffer/CmdUpdateBuffer
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
2019-12-16 13:13:53 -05:00
Jonathan Marek
8d893a2071
turnip: don't require src image to be set for clear blits
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
2019-12-16 13:13:53 -05:00
Jonathan Marek
f78c4251f1
turnip: use common blit path for buffer copy
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
2019-12-16 13:13:53 -05:00
Jonathan Marek
d6c8aa2b72
turnip: use single substream cs
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Eric Anholt <eric@anholt.net >
2019-12-16 13:13:53 -05:00
Alyssa Rosenzweig
8959364937
panfrost: Remove fbd_type enum
...
Just use the MALI_MFBD tag directly; it's clean.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3118 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3118 >
2019-12-16 12:51:03 -05:00
Alyssa Rosenzweig
5408700a12
ci: Reinstate Panfrost CI
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3118 >
2019-12-16 12:51:03 -05:00
Alyssa Rosenzweig
caf55e7bfd
panfrost: Fix FBD issue
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Fixes: b0e915b4e6 ("panfrost: Emit SFBD/MFBD after a batch, instead of before")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3118 >
2019-12-16 12:50:26 -05:00
Lionel Landwerlin
bc36160ccb
vulkan/wsi: error out when image fence doesn't signal
...
If for some reason the fence associated with an image doesn't signal,
we're likely in a device lost scenario, we should report that error.
We can't really wait for a given amount of time because we could get a
timeout and that is not a valid error to report for vkQueuePresentKHR,
so just wait forever.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/830
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
2019-12-16 14:59:10 +02:00
Lionel Landwerlin
c056193288
anv: drop unused parameter from apply layout pass
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
2019-12-16 14:35:25 +02:00
Lionel Landwerlin
7c223cf316
anv: constify pipeline layout in nir passes
...
Was hoping to find potential issues but nothing. Still probably a good
idea.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
2019-12-16 14:35:22 +02:00
Alyssa Rosenzweig
e7721d8775
pan/midgard: Set r1.w magic
...
I'm honestly unsure what this is for, but it's needed on MFBD systems
for unknown reasons, at least when MRT is actually in use and then
sometimes without MRT (it fixes a blend shader issue on T760?)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Visoso <tomeu.vizoso@collabora.com >
2019-12-16 09:10:33 +00:00
Alyssa Rosenzweig
3448b2641a
pan/midgard: Fix liveness analysis with multiple epilogues
...
Epilogues are special fixed-function blocks, so they need special
handling for liveness analysis to work completely. This in turns fixes
RA issues for many shaders using MRT.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Visoso <tomeu.vizoso@collabora.com >
2019-12-16 09:10:33 +00:00
Alyssa Rosenzweig
60396340f5
pan/midgard: Writeout per render target
...
The flow is considerably more complicated. Instead of one writeout loop
like usual, we have a separate write loop for each render target. This
requires some scheduling shenanigans to get right.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Visoso <tomeu.vizoso@collabora.com >
2019-12-16 09:10:33 +00:00
Alyssa Rosenzweig
281cc6f9a6
pan/midgard: Add schedule barrier after fragment writeout
...
This is a branch, like discard, so we need a barrier to make it safe.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Visoso <tomeu.vizoso@collabora.com >
2019-12-16 09:10:33 +00:00
Alyssa Rosenzweig
a2d5503b68
panfrost: Pass blend RT number through
...
We have to key the blend shader for the render target number due to
writeout silliness.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Visoso <tomeu.vizoso@collabora.com >
2019-12-16 09:10:33 +00:00
Pierre-Eric Pelloux-Prayer
2c1983aefe
gallium: refuse to create buffers larger than UINT32_MAX
...
pipe_resource.width0 is 32 bits and hardware support for bigger buffer is
limited (eg: AMD hardware doesn't support buffer shader resources bigger
than 4GB).
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2053
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2948 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2948 >
2019-12-16 09:30:14 +01:00
Pierre-Eric Pelloux-Prayer
0e286f6cbf
radeonsi: disable dcc for 2x MSAA surface and bpe < 4
...
This fixes a series of dEQP tests on Raven platforms:
- dEQP-GLES3.functional.fbo.msaa.2_samples.rgba4
- dEQP-GLES3.functional.fbo.msaa.2_samples.rgb5_a1
- dEQP-GLES3.functional.fbo.msaa.2_samples.rgb565
- dEQP-GLES3.functional.fbo.msaa.2_samples.rg8
- dEQP-GLES3.functional.fbo.msaa.2_samples.r16f
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3090 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3090 >
2019-12-16 08:08:08 +00:00
Iago Toral Quiroga
4202cf8bf1
v3d: expose OES_geometry_shader
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
2019-12-16 08:42:37 +01:00
Iago Toral Quiroga
ba7bc83dd5
v3d: support precompiling geometry shaders
...
At present, this is only relevant for shader-db.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
2019-12-16 08:42:37 +01:00
Iago Toral Quiroga
7cee56b1df
v3d: disable lowering of indirect inputs
...
V3D can do indirect inputs so we don't need it. Also, the lowering
produces horrible if-ladder code that is particularly bad for geometry
shaders where inputs are always arrays and shader bodies usually have
a loop indexing into them.
This fixes a couple of geometry shader tests in CTS that would fail to
register allocate otherwise.
There are no changes in shader-db.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
2019-12-16 08:42:37 +01:00
Iago Toral Quiroga
a1b7c0844d
v3d: fix primitive queries for geometry shaders
...
With geometry shaders the number of emitted primitived is decided
at run time, so we cannot precompute it in the CPU and we need to
use the PRIMITIVE_COUNTS_FEEDBACK commands to have the GPU provide
the number like we do for the number of primitives written to
transform feedback. This may have a performance impact though, since
it requires a sync wait for the draw to complete, so we only do
it when geometry shaders are present.
v2: remove '> 0' comparison for ponter type (Alejandro)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
2019-12-16 08:42:37 +01:00
Iago Toral Quiroga
6c7a2b69f8
v3d: handle writes to gl_Layer from geometry shaders
...
When geometry shaders write a value to gl_Layer that doesn't correspond to
an existing layer in the target framebuffer the rendering behavior is
undefined according to the spec, however, there are CTS tests that trigger
this scenario on purpose, probably to ensure that nothing terrible happens.
For V3D, this situation is problematic because the binner uses the layer
index to select the offset to write into the tile state data, and we only
allocate tile state for MAX2(num_layers, 1), so we want to make sure we
don't produce values that would lead to out of bounds writes. The simulator
has an assert to catch this, although we haven't observed issues in actual
hardware it is probably best to play safe.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
2019-12-16 08:42:37 +01:00
Iago Toral Quiroga
45bc61add0
v3d: move layer rendering to a separate helper
...
This helps with reducing nesting level after adding the loop
to handle layered rendering.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
2019-12-16 08:42:37 +01:00