Gert Wollny
110ee7ff93
r600/sfn: Add support for SSBO load and store
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
148f0ad4f9
r600/sfn: Add support for atomic instructions
...
v2: fix compilation with gcc-6
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
90a7d2e08f
r600: Make sure LLVM is not used for DRAW
...
For some reasone that is not yet clear the piglit
gl-1.0-rendermode-feedback makes use of the LLVM pipe draw module and
fails there with an assertion. Explicietly disabling LLVM fixes this.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
37125b7cc2
r600/sfn: Add lowering UBO access to r600 specific codes
...
r600 reads vec4 from the UBO, but the offsets in nir are evaluated to the component.
If the offsets are not literal then all non-vec4 reads must resolve the component
after reading a vec4 component (TODO: figure out whether there is a consistent way
to deduct the component that is actually read).
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
32d3435a78
r600/sfn: Add GDS instructions
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
5aadd809d0
r600/sfn: Add compute shader skeleton
...
This adds some very basic compute shader support.
v2: fix compilation with gcc-6
v3: rebase: correct barrier intrinstic
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
7fb5c835f7
r600/sfn: Add VS for TCS shader skeleton
...
This adds the VS shader type that handles the output to tesselation shaders
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
e17ac0d774
r600/sfn: Add support for geometry shader
...
v2: fix compilation with gcc-6
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
5c7124e134
r600/sfn: add emitVertex instructions
...
More preparation for GS support
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
f7ec616bed
r600/sfn: Add MemRingOut instructions
...
Preparing support for Geometry shaders.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
1b17316bf3
r600/sfn: Add a load GDS result instruction
...
This is required to read results for atomic SSBO instructions
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
31a4dd6451
r600/sfn: Add lowering arrays to scratch and according instructions
...
Make use of the scratch space for arrays that are larger then 100 elements.
Since for IO r600 is vector based, there is a bit of a scratch space waste
here for arrays that use types smaller then vec4.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
5c19013904
r600/sfn: add register remapping
...
Make use of the live range evaluation to merge registers. Since the
live ranges are evaluated for register indices, the algorithm is not
optimal, but for most piglits up to glsl-3.3 it does the job.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
393655d5cb
r600/sfn: add live range evaluation for the GPR
...
The algoritm is basically a copy of the TGSI implementation without the
array bits.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
24f683fe81
r600/sfn: Add the WaitAck instruction
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
e09cdb3f86
r600/sfn: Add the VS in and FS out vectorization
...
Since the nir default implementation doesn't support vectorizing the VS
inputs and FS outputs, additional lowering passes are added here to do
just that. The work is based on the Timothy Arceri's related work.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
c5d9456d84
r600: enable NIR backend DEBUG flag for supported architectures
...
When NIR is enabled, a few features that are not yet supported will be
explicitely disabled.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
f718ac6268
r600/sfn: Add a basic nir shader backend
...
This commit adds support for vertex and fragment shaders from NIR, and
support for most TEX and ALU instructions.
Thanks Dave Airlied for adding support for a number of ALU instructions.
v2: fix compilation with gcc-6
v3: rebase: use mesa/core glsl_type_size function
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
295be0e8df
r600: Update state code to accept NIR shaders
...
v2: Correct commit message (Konstantin Kharlamov)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
51285bf32e
r600: Add NIR compiler options
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
27cacd28ac
r600: Increase space for IO values to agree with PIPE_MAX_SHADER_IN/OUTPUTS
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:08 +00:00
Gert Wollny
4422ce1b04
r600: force new CF with TEX only if any texture value is written
...
This works aound splitting the CF when the gradient is set.
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225 >
2020-02-10 19:09:07 +00:00
Neha Bhende
144561dc5e
svga: Use pipe_shader_state_from_tgsi to set shader state
...
Use pipe_shader_state_from_tgsi() to set shader state for transformed
shader so that we get all correct data for respective shader state.
This fixes several regressed glretrace, piglit crashes found during merging
upsteam mesa
Fixes: bf12bc2dd7 (draw: add nir info gathering and building support)
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
2020-02-10 09:27:11 -08:00
Neha Bhende
470e73e7f8
svga: fix size of format_conversion_table[]
...
Since we are now using sparse matrix for format_conversion_table,
we have to make sure we have last entry in table which gives the
sense of required size of format_conversion_table
Fixes: 84db6ba7 ("svga: Drop unsupported formats from the format table")
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
2020-02-10 09:26:49 -08:00
Krzysztof Raszkowski
689817c9df
gallium/swr: simplify environmental variabled expansion code
...
There were 2 versions of code doing the same thing.
Since std::regexp are locale-sensitive better is to leave old
good way to do this.
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3761 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3761 >
2020-02-10 17:10:47 +01:00
Samuel Pitoiset
34fd894e42
aco: fix waiting for scalar stores before "writing back" data on GFX8-GFX9
...
Seems required also on GFX8-GFX9 to achieve correct behaviour. This
is an undocumented behaviour but it makes real sense to me.
pipeline-db on GFX9:
Totals from affected shaders:
SGPRS: 1018 -> 1018 (0.00 %)
VGPRS: 516 -> 516 (0.00 %)
Code Size: 40516 -> 40636 (0.30 %) bytes
Max Waves: 280 -> 280 (0.00 %)
This fixes some sort of sun flickering with Assassins Creed Origins.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2488
Cc: <mesa-stable@lists.freedesktop.org >
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3750 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3750 >
2020-02-10 12:07:25 +00:00
Georg Lehmann
7283c33b98
Vulkan overlay: use the corresponding image index for each swapchain
...
pImageIndices should be a pointer to the current image index
otherwise every swapchain but the first one could have a wrong image index
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3741 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3741 >
2020-02-10 11:32:08 +00:00
Erik Faye-Lund
eb0195358c
zink: only inspect dual-src limit if feature enabled
...
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3689 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3689 >
2020-02-10 11:01:47 +00:00
Erik Faye-Lund
e365f83740
zink: emit blend-target index
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3689 >
2020-02-10 11:01:47 +00:00
Erik Faye-Lund
8736ffae2e
zink: replace unset buffer with a dummy-buffer
...
This fixes a crash in spec@!opengl 1.1@ppgtt_memory_alignment
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3673 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3673 >
2020-02-10 10:40:19 +00:00
Samuel Pitoiset
18657c0c0a
gitlab-ci: disable a630 tests as mesa-cheza is down (again)
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3758 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3758 >
2020-02-10 10:34:41 +01:00
Marek Olšák
35961b10da
radeonsi: don't report that multi-plane formats are supported
...
Fixes: a554b45d - st/mesa: don't lower YUV when driver supports it natively
Closes : #2376
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3632 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3632 >
2020-02-07 20:42:42 -05:00
Erik Faye-Lund
1c3f4c0704
zink: fixup sampler-usage
...
It seems I got this stuff all wrong, and looked at driver_location
rather than the binding. But since we mess with the binding, we need to
adjust things a bit to get things right.
This still isn't great as-is, but it seems to work. In the future, we
should move to having samplers always at bindings 0 and up, and just
update the bindings that are used by either of the stages. But this
band-aid should be OK for now.
This fixes 0AD for me.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3668 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3668 >
2020-02-07 22:03:00 +00:00
Erik Faye-Lund
fa915a724f
zink: lower away fdph
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3668 >
2020-02-07 22:03:00 +00:00
Christian Gmeiner
0c36b1c0db
etnaviv: enable texture upload memory throttling
...
Fixes oom-killer during piglit's streaming-texture-upload on a
SolidRun CuBox-i with 2GB of RAM.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3745 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3745 >
2020-02-07 18:21:54 +00:00
Hyunjun Ko
7bddaa6136
freedreno/ir3: Fold const only when the type is float
...
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737 >
2020-02-07 09:53:48 -08:00
Hyunjun Ko
260bd32b58
freedreno/ir3: put the conversion back for half const to the right place.
...
The previous commit leads to match immed values unexpectedly.
This makes constlen for each shader including bvert wrong.
Also fixes atan2 for mediump deqp tests.
Fixes: cbd1f47433 ("freedreno/ir3: convert back to 32-bit values for half constant registers.")
v2: Move conversion up above fabs/fneg modifier handling as well.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737 >
2020-02-07 09:53:42 -08:00
Hyunjun Ko
d70192e697
freedreno/ir3: Add cat4 mediump opcodes
...
v2: Reworked to assign half-opcodes in ir3_ra.c (krh).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737 >
2020-02-07 09:51:25 -08:00
Rob Clark
3eca6d9ce1
freedreno/ir3: fold const conversion into consumer
...
A sequence like:
(nop3)cov.f32f16 hr0.x, c0.x
mul.f hr4.y, hr1.z, hr0.x
can be turned into:
mul.f hr4.y, hr1.z, hc0.x
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737 >
2020-02-07 09:51:25 -08:00
Hyunjun Ko
5e2012d5c7
freedreno/ir3: fix printing half constant registers.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737 >
2020-02-07 09:51:25 -08:00
Kristian H. Kristensen
d55dfef782
freedreno/ir3: Set IR3_REG_HALF flag on src as well in immediate MOV
...
This lets is_same_type_reg() recognize that the dst and src of the
immediate MOV are the same and unblocks fp16 constant propagation.
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737 >
2020-02-07 09:51:25 -08:00
Dylan Baker
fbfc8c3531
docs: Mark 20.0-rc2 as done
...
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3751 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3751 >
2020-02-07 09:02:02 -08:00
Martin Fuzzey
d8bae10bfe
freedreno: android: fix build of perfcounters.
...
Some dependencies were missing on android causing a build failure.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3736 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3736 >
2020-02-07 16:34:49 +00:00
Martin Fuzzey
fad9924315
freedreno: android: add a6xx-pack.xml.h generation to android build
...
The generation of a6xx-pack.xml.h was missing in the android build scripts
leading to a build failure.
Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3736 >
2020-02-07 16:34:49 +00:00
Martin Fuzzey
cad400a59e
freedreno: android: fix build failure on android due to python version
...
The freedreno gen_header.py script now only works under python3.
It contains a "print()" call which prints a blank line under python3
but prints "()" under python2.7.
However the Android build currently uses python2.
This leads to incorrect code generation and a later build error.
.../STATIC_LIBRARIES/libfreedreno_registers_intermediates/registers/adreno_common.xml.h:163:2: error: expected identifier or '('
()
Fix this by adding MESA_PYTHON3 and using it for the freedreno scripts.
Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3736 >
2020-02-07 16:34:49 +00:00
Krzysztof Raszkowski
ff8265b64f
gallium/swr: Fix llvm11 compilation issues
...
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3747 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3747 >
2020-02-07 15:03:55 +00:00
Georg Lehmann
f239bb8020
Vulkan Overlay: Don't try to change the image layout to present twice
...
The render pass already does the transition.
The pipeline barrier is still needed to transfer the queue family ownership.
Fixes: 320b0f66c2 ("vulkan/overlay: bounce image back to present layout")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3740 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3740 >
2020-02-07 14:23:23 +00:00
Samuel Pitoiset
4b978cd950
aco: do not use ds_{read,write}2 on GFX6
...
According to LLVM, these instructions have a bounds checking bug.
LLVM only uses them on GFX7+.
This fixes broken geometry in Assassins Creed Origins.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2489
Fixes: 4a553212fa ("radv: enable ACO support for GFX6")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3746 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3746 >
2020-02-07 14:17:06 +01:00
Tapani Pälli
da76dfb515
intel/vec4: fix valgrind errors with vf_values array
...
Fixes valgrind errors introduced since commit a8ec4082 .
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2346
Fixes: a8ec4082 ("nir+vtn: vec8+vec16 support")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3691 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3691 >
2020-02-07 09:06:18 +00:00
Andreas Baierl
1572e8f3e1
lima/parser: Change value name in RSW parser
...
Second value of SHADER_ADDRESS is the length of the first instruction
in the shader, so give it a better name.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3619 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3619 >
2020-02-07 09:26:32 +01:00