Icecream95
d37e901e35
pan/mdg: Add new depth store lowering
...
This uses the new nir_intrinsic_store_combined_output_pan intrinsic,
which can write depth, stencil and color in a single instruction. If
there are no color writes, the "depth RT" is written to.
Fixes the dEQP GLES3 depth write tests, as well as the piglit tests
fragdepth_gles2, glsl-1.10-fragdepth and when modified to not rely
on depth/stencil reload, glsl-fs-shader-stencil-export.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
a68063402b
pan/mdg: Add depth/stencil support to emit_fragment_store
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
7534a31a11
pan/mdg: Move search_var to earlier in midgard_compile.c
...
It will be needed by the new zs lowering.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
2f3d60c84b
pan/mdg: Add new depth writeout code
...
We schedule depth writeout to smul and stencil to vlut, so scheduling
to smul has to be disabled in these cases.
When only writing stencil, scheduling to smul is still disabled to
prevent stencil writeout from being scheduled there.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
92d3f1fe59
pan/mdg: Replace writeout booleans with a single value
...
A single value is easier to deal with than three separate booleans.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
bcc8f28b1a
nir: Replace the zs_output_pan intrinsic with combined_output_pan
...
Depth and stencil writes are combined with color writes, so we need
this intrinsic which has sources for color, RT, depth and stencil.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
2a5504fb92
pan/mdg: Remove writeout case from bytemask_of_read_components
...
By setting the swizzle for the fragment color, and setting qmask to ~0
for branches, the special case for writeout branches can be removed
from mir_bytemask_of_read_components_index.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
8f36904bae
pan/mdg: Remove old depth writeout code
...
We need to be able to do color writeout at the same time as depth
writeout. The old code can't do that, so needs to be removed.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
7da8667a7b
pan/mdg: Remove old zs store lowering
...
It is broken for when there are also color writes, and will be
replaced with a new lowering which takes that into account.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
ddc2ae32cf
pan/mdg: Move r1.w writeout to branch->dest
...
There will need to be sources for depth and stencil writeout, so
something has to be moved to the dest of the writeout branch.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Icecream95
5f5a973709
pan/mdg: Add a macro for printing instruction source information
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065 >
2020-06-10 13:54:03 +00:00
Alyssa Rosenzweig
dc8bffe999
nir: Remove nir_intrinsic_output_u8_as_fp16_pan
...
Now unused in favour of nir_intrinsic_load_output, happily.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5287 >
2020-06-10 09:30:31 +00:00
Pierre-Eric Pelloux-Prayer
8275dc1ed5
ac/surface: fix epitch when modifying surf_pitch
...
This is needed otherwise it can cause bad rendering of UYVY files.
The align(..., 256 / surf->bpe) constraint comes from addrlib.
Fixes: 69aadc4933
("radeonsi: fix surf_pitch for subsampled surface")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5314 >
2020-06-10 09:11:23 +00:00
Pierre-Eric Pelloux-Prayer
e9826a1bb2
ac/surface: set SCANOUT if surf->is_displayable
...
Fixes: ba10fb3f7f
("radeonsi: preserve the scanout flag for shared resources on gfx9 and gfx10")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5314 >
2020-06-10 09:11:23 +00:00
Erik Faye-Lund
10f07495f6
zink: only report device-local memory as video-memory
...
While the definition of "video memory" isn't super clear, I think it's
pretty reasonable to assume host-memory isn't meant to be included. So
let's only count dedicated memory here.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3107
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com >
Tested-by: Witold Baryluk <witold.baryluk@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5409 >
2020-06-10 08:58:09 +00:00
Samuel Pitoiset
9b58c4958b
ac/nir: fix integer comparisons with pointers
...
If we get a comparison between a pointer and an integer, LLVM
complains if the operands aren't of the same type.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3085
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5397 >
2020-06-10 08:18:22 +00:00
Pierre-Eric Pelloux-Prayer
24ceb6a594
radeonsi/ngg: try GS multi-cycling mode if default mode failed
...
If gsprim_lds_size is larger than target_lds_size then gfx10_ngg_calculate_subgroup_info
will fail.
This commit adds a logic to try the multi-cycling in this case because it's
using less memory.
This fix glsl-1.50-gs-max-output when using NGG.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5401 >
2020-06-10 09:33:58 +02:00
Pierre-Eric Pelloux-Prayer
ce7692fc19
radeonsi: add return value to gfx10_ngg_calculate_subgroup_info
...
gfx10_ngg_calculate_subgroup_info uses assert to detect invalid configuration,
but if asserts are disabled it will continue its execution.
This commits adds a boolean return value to let the caller know that something
went wrong and that the results mustn't be used.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3103
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5401 >
2020-06-10 09:33:48 +02:00
Andrii Simiklit
2c711beb5c
glsl: fix crash on glsl macro redefinition
...
In case shader contains two equal macro defines, first one with trailing spaces
and the second one without.
`#define A 1 `
`#define A 1`
The parser crashes
Fixes: 0346ad3774
("glsl: ignore trailing whitespace when define redefined")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5312 >
2020-06-10 03:29:39 +00:00
Jason Ekstrand
0c37cbf807
anv/allocator: Compare to start_offset in state_pool_free_no_vg
...
In d11e4738a8
, we started using a start_offset to allow us to
allocate pools where the base address isn't at the start of the pool.
This is useful for binding table pools which want to be relative to
surface state base address (more or less), among other things. However,
we had a bug where, if you have a negative offset, everything returned
to the pool would end up being returned to the "back" of the pool. This
isn't what we want for binding tables in the softpin world. This was
causing us to never actually re-use any binding table blocks. How this
passed CTS, I have no idea.
Closes : #3100
Fixes: d11e4738a8
"anv/allocator: Add a start_offset to anv_state_pool"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5395 >
2020-06-09 22:52:26 +00:00
Alyssa Rosenzweig
5d547858da
panfrost: Ensure we have ro before using it
...
Even through the resouce requested has a BIND_SCANOUT or related tag,
this does not mean that we have a render-only driver.
This can trivially happen as one requests such resource from GBM, while
using the panfrost fd (and hence panfrost_dri.so)
Forward port of !3000
Signed-off-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Robert Foss <robert.foss@collabora.com >
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Closes : #2664
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5410 >
2020-06-09 22:09:07 +00:00
Samuel Pitoiset
64f2d45c3b
radv/aco: enable shaderInt8 and VK_KHR_shader_float16_int8 on GFX6-GFX7
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Samuel Pitoiset
be4dd6abd1
radv/aco: enable shaderInt16 on GFX6-GFX7
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Samuel Pitoiset
b3aee3aa23
radv/aco: enable 8-bit/16-bit storage on GFX6-GFX7
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
5cde4989d3
aco: remove unnecessary split- and create_vector instructions for subdword loads
...
This helps GFX6/7 by removing unnecessary shuffle code.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Samuel Pitoiset
5446e3cf2e
aco: fix alignment of vectors with 4 elements
...
I think this case was just missing.
This fixes a bunch of 16-bit storage related CTS failures like
dEQP-VK.ssbo.phys.layout.single_basic_type.std430.u16vec4.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Samuel Pitoiset
c7bd0f8cd5
aco: implement 8-bit/16-bit conversions on GFX6-GFX7
...
Use v_bfe to implement small bitsize conversions because the
compiler probably optimizes this better.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
db957f9135
aco: optimize packing of 16bit subdword registers on GFX6/7
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
2a51840c52
aco: skip partial copies on first iteration when lowering to hw
...
Helps some Detroit : Become Human shaders.
Totals from affected shaders: (VEGA)
Code Size: 47693912 -> 47670212 (-0.05 %) bytes
Instructions: 9183788 -> 9177863 (-0.06 %)
Copies: 910052 -> 904127 (-0.65 %)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
1d6f667193
aco: coalesce copies more aggressively when lowering to hw
...
Helps some Detroit : Become Human shaders.
Totals from affected shaders: (VEGA)
Code Size: 9880420 -> 9879088 (-0.01 %) bytes
Instructions: 1918553 -> 1918220 (-0.02 %)
Copies: 177783 -> 177450 (-0.19 %)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
b21d2d9a9f
aco: add and use scratch SGPR to lower subdword p_create_vector on GFX6/7
...
This is needed to lower some corner cases correctly,
in case the same operand occurs multiple times:
e.g. v0 = p_create_vector(v0[0:8], v0[0:8], v0[0:8], v0[0:8])
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
9e8e12ea6d
aco: adjust GFX6 subdword lowering workarounds for 8bit
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
b083581010
aco: Workarounds subdword lowering on GFX6/7
...
As there are no SDWA instructions, we need to take care not to overwrite
the upper bits of other copy_operation's operands.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
942e3c40c3
aco: use full-register instructions to implement subdword packing on GFX6/7
...
On GFX6/7, there are no SDWA instructions.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
3f03db848d
aco: simplify statistics collection for copies
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Daniel Schürmann
0560831593
aco: fix register assignment for p_create_vector on GFX6/7
...
In case, some operand was already placed in the definition space,
it could happen that it wasn't considered for live-range splits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226 >
2020-06-09 21:25:38 +00:00
Mike Blumenkrantz
98d07bd5a0
zink: emit interpolation decorations for ntv outputs
...
this matches up with nir internal states pre/post ntv
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5384 >
2020-06-09 20:56:09 +00:00
Mike Blumenkrantz
ad8e61621b
zink: track program usages for each shader
...
when shaders are created and destroyed in large numbers, the same pointers
get reused for different shaders, which can lead to bad lookups in the
program_cache hash table.
now each shader tracks its program usage to automatically remove itself from
that program in order to avoid hash collisions
fixes mesa/mesa#3053
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5315 >
2020-06-09 20:30:25 +00:00
Erik Faye-Lund
48925f6927
zink: assert that image-view format isn't undefined
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5407 >
2020-06-09 19:35:26 +00:00
Erik Faye-Lund
2d3c6605d6
zink: emulate B8G8R8X8_SRGB with B8G8R8A8_SRGB
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5407 >
2020-06-09 19:35:26 +00:00
Eric Anholt
3e11f04d4e
turnip: Expose robustBufferAccess.
...
It is a required device feature, and all enabled tests in
dEQP-VK.robustness.* pass.
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266 >
2020-06-09 18:28:18 +00:00
Eric Anholt
3d5429d646
ci: Use rsync for initial nfsroot population on cheza.
...
rm -rf and then copying over all the contents again is a waste of time
when we'll almost always be using the same rootfs. Saves about 30s of job
time.
Closes : #3065
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266 >
2020-06-09 18:28:18 +00:00
Eric Anholt
9e11cce517
ci: Enable pre-merge fractional vulkan CTS runs on the turnip driver.
...
Test 1/50th of the CTS on a630 pre-merge, since we've got hardware that
can do it and infrastructure that should handle instability with a
less-mature driver.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266 >
2020-06-09 18:28:18 +00:00
Eric Anholt
dd167788ec
ci: Build the full VK CTS for baremetal testing.
...
I'm going to enable the VK CTS on cheza, so swap the deqp we have in the
container. build-deqp-vk already included GLES deqp binaries and data,
and is a newer branch than the last opengl-es-cts tag.
This brings a few things back over from build-deqp-gl for testlog
extraction, and copyes out the GLES mustpass lists.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266 >
2020-06-09 18:28:18 +00:00
Eric Anholt
eca02ec44a
ci: Disable shader cache on vulkan CI runs.
...
I found it to be flaky in freedreno CI, and tracked down the issue to
parallel-deqp-runner needing to manage the shader cache
(https://gitlab.freedesktop.org/mesa/parallel-deqp-runner/-/merge_requests/13 ).
Until we fix that in the runner, disable it. This should matter less now
that we prebuild the SPIRV, though.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266 >
2020-06-09 18:28:17 +00:00
Eric Anholt
f70030d276
ci: Bump up to the current version of the VK CTS.
...
For enabling VK CTS on freedreno, I've heard there were important
stability fixes in the CTS recently.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266 >
2020-06-09 18:28:17 +00:00
Eric Anholt
58dd904c59
turnip: Fix crashes in compute with no descriptors to load.
...
Found when trying to rebase cheza VK CI on top of this change.
Fixes: 334204823e
("tu: Fix context faults loading unused descriptor sets")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266 >
2020-06-09 18:28:17 +00:00
Thong Thai
b2324f4560
frontends/vdpau: Default destination rect to source rect
...
mpv is passing in a NULL destination_video_rect, which results in a
black screen when playing videos using VDPAU in some cases.
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5386 >
2020-06-09 18:02:09 +00:00
Marek Olšák
0795241dde
radeonsi: require LLVM 11 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/5383 >
2020-06-09 16:17:36 +00:00
Marek Olšák
9538b9a68e
radeonsi: add support for Sienna Cichlid
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383 >
2020-06-09 16:17:36 +00:00