Alejandro Piñeiro
9fd180394b
nir: add nir_tex_instr_need_sampler helper
...
That is basically nir_tex_instr sampler_index documentation comment
expressed as a helper.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4677 >
2020-04-22 23:43:18 +02:00
Alejandro Piñeiro
41bfd0812b
v3d/packet: fixing TMU_Config_Parameter_2 definition
...
v41 interchanged the size and start values for the Padding, and it
seems that v42 inherited it when adding the LOD Query bit.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4677 >
2020-04-22 23:39:41 +02:00
Alejandro Piñeiro
9967c26ae6
v3d/tex: Configuration Parameter 1 can be only skipped if P2 can be skipped too
...
Configuration Parameter packets 1 and 2 are pointed as optional, but
it is not clearly stated if you can skip only P1 when P2 is needed.
In the practice, it seems that the situation P0 - non-P1 - P2 can
causes problems, and at least on the simulator, it seems that sampler
info are attempted to be accessed. So let's just be conservative, and
only skip P1 configuration if we can skip P2 configuration too.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4677 >
2020-04-22 23:39:34 +02:00
Alejandro Piñeiro
d0b644d9f9
v3d/tex: don't configure tmu config 1 if not needed
...
TMU configuration parameter 1 configures the sampler for the texture
operation. But there are some texture operations that doesn't need a
sampler. Skipping the configuration could provide a small perf
improvement on OpenGL. On the incoming Vulkan driver, would allow us
to avoid to set up an unneeded sampler.
Note that we still need to add the sampler configuration parameter if
the output is a 32bit, as it is on the sampler where we configure that
info.
Also, note that for images this is done comparing against a unpacked
p1 default. But in order to do that it is needed to go through the
code that fills up the unpacked p1. We can skip that too.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4677 >
2020-04-22 23:38:18 +02:00
Jonathan Marek
c552b5fd1d
turnip: implement VK_EXT_sampler_filter_minmax
...
Passes dEQP-VK.pipeline.sampler.view_type.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4662 >
2020-04-22 20:12:14 +00:00
Jonathan Marek
a77e2ac835
turnip: enable cube arrays
...
Passes dEQP-VK.pipeline.sampler.view_type.cube_array.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4663 >
2020-04-22 19:57:20 +00:00
Jonathan Marek
9daeb50454
turnip: implement VK_EXT_filter_cubic
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4672 >
2020-04-22 19:03:58 +00:00
Jonathan Marek
a92d2e1109
turnip: implement VK_EXT_sample_locations
...
Passes tests in:
dEQP-VK.pipeline.multisample.sample_locations_ext.*
Note that these tests fail because of gl_PrimitiveID not working correctly:
dEQP-VK.pipeline.multisample.sample_locations_ext.verify_location.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4665 >
2020-04-22 18:46:46 +00:00
Jonathan Marek
83b2f1d8cf
turnip: set shader key msaa field
...
Fixes per-sample interpolation.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4665 >
2020-04-22 18:46:46 +00:00
Daniel Schürmann
36e0d2f39b
aco: coalesce v_mad's accumulator with definition's affinities
...
Totals from affected shaders:
Code Size: 8922676 -> 8915192 (-0.08 %) bytes
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
d000d76f13
aco: use upper part of gap in register file if it is beneficial for striding
...
Totals from affected shaders:
SGPRS: 1717288 -> 1716984 (-0.02 %)
VGPRS: 1305924 -> 1304904 (-0.08 %)
Code Size: 138508892 -> 138420144 (-0.06 %) bytes
Max Waves: 115726 -> 115735 (0.01 %)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
d666d83be2
aco: try to always find a register with stride for even sizes
...
Totals from affected shaders:
SGPRS: 1162400 -> 1162400 (0.00 %)
VGPRS: 947364 -> 946960 (-0.04 %)
Code Size: 98399300 -> 98399004 (-0.00 %) bytes
Max Waves: 74665 -> 74682 (0.02 %)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
5a3c1f4f0b
aco: stop get_reg_simple after reaching max_used_gpr
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
2796cb4c24
aco: refactor get_reg_simple() to return early on exact matches
...
in the best fit algorithm
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
6792e134f3
aco: don't create vector affinities for operands which are not killed or are duplicates
...
Totals from affected shaders:
SGPRS: 825184 -> 825184 (0.00 %)
VGPRS: 697640 -> 697240 (-0.06 %)
Code Size: 79244104 -> 79201072 (-0.05 %) bytes
Max Waves: 42388 -> 42386 (-0.00 %)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
edc2b57ac1
aco: allocate full register for subdword definitions if HW doesn't support it
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
97a870cf88
aco: move attempt to find strided register into get_reg_simple()
...
This simplifies code and helps some shaders
Totals from affected shaders:
Code Size: 51227172 -> 51202216 (-0.05 %) bytes
Max Waves: 19955 -> 19948 (-0.04 %)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
c7f97f110c
aco: use DefInfo in more places to simplify RA
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
734f86db6b
aco: create and use DefInfo struct in RA
...
for maintaining all information necessary to find a register.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
5b2f628da3
aco: create pseudo dummy instruction in RA to be used for live-range splits
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
d9f7d1d5cb
aco: refactor get_reg() to also handle affinities
...
This simplifies definition handling and
helps a few shaders
Totals from affected shaders:
Code Size: 659540 -> 659376 (-0.02 %) bytes
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:23 +00:00
Daniel Schürmann
7c8f4ebca9
aco: refactor get_reg() to take Temp instead of RegClass
...
This patch also moves get_reg_specified() and
get_reg_vec() before get_reg() to make use of it later.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:22 +00:00
Daniel Schürmann
0a9ed98178
aco: simplify operand handling in RA
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4573 >
2020-04-22 18:23:22 +00:00
Jonathan Marek
a5cce95280
turnip: enable VK_FORMAT_S8_UINT as stencil format
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4588 >
2020-04-22 17:45:33 +00:00
Jonathan Marek
44c6c145da
turnip: improve GMEM load/store logic
...
Determine load/store at renderpass creation time.
This also fixes behavior with S8_UINT.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4588 >
2020-04-22 17:45:33 +00:00
Jonathan Marek
e72201c787
turnip: disable depth test for S8_UINT attachment
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4588 >
2020-04-22 17:45:33 +00:00
Rhys Perry
f13049f48a
aco: implement 64-bit sgpr swaps
...
In our pipeline-db, helps almost exclusively Detroit: Become Human.
Totals from 6726 (5.36% of 125503) affected shaders:
CodeSize: 74680952 -> 74102228 (-0.77%)
Instrs: 14551507 -> 14406001 (-1.00%)
Cycles: 1748272436 -> 1690173104 (-3.32%)
VMEM: 964671 -> 964058 (-0.06%)
Copies: 1993312 -> 1847806 (-7.30%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4469 >
2020-04-22 13:25:17 +00:00
Rhys Perry
2ab45f41e0
aco: implement sub-dword swaps
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4469 >
2020-04-22 13:25:17 +00:00
Rhys Perry
83fdb1ed3d
aco: add VOP3P_instruction
...
The optimizer isn't yet updated to handle this, since lower_to_hw_instr
will be the only user for now.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4469 >
2020-04-22 13:25:17 +00:00
Rhys Perry
8fc24f9a45
aco: fix copy statistic for 64-bit vgpr constant copy
...
The statistic is in units of instructions.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4469 >
2020-04-22 13:25:17 +00:00
Connor Abbott
4daa3917a3
ir3: Fix bug with shaders that only exit via discard
...
discard is supposed to be a terminator, killing the thread, so that it's
possible to exit main solely by a discard e.g. inside of an infinite
loop. However, it currently isn't treated as a terminator in NIR due to
workarounds turning it into demote (d3d-style kill) and even if that
were fixed, we probably wouldn't want to treat discard_if as a jump
since otherwise the scheduler wouldn't be able to schedule things around
it. So, add this workaround which inserts jump instructions as
necessary to guarantee that the program always terminates.
This fixes a hang in dEQP-VK.graphicsfuzz.while-inside-switch, which
conditionally does a discard inside an infinite loop.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4658 >
2020-04-22 09:49:40 +00:00
Connor Abbott
8cfa60eab8
ir3: Don't double-insert the first block
...
The first block was being added to the list twice, once here and once in
emit_block(), leading to list corruption and infinite loops when trying
to traverse the list of blocks backwards.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4658 >
2020-04-22 09:49:40 +00:00
Danylo Piliaiev
66229aa169
spirv: Expand workaround for OpControlBarrier on old GLSLang
...
In SPIRV of compute shader in Aztec Ruins benchmark there is:
OpControlBarrier %uint_1 %uint_1 %uint_0
// ControlBarrier(Device, Device, rdcspv::MemorySemantics(0));
which is an incorrect translation of glsl barrier().
GLSLang, prior to c3f1cdfa, emitted the OpControlBarrier with
Device instead of Workgroup for execution scope.
2365520c covers similar case but isn't applied when execution_scope
is SpvScopeDevice.
Cc: <mesa-stable@lists.freedesktop.org >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2742
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Tested-by: Rafael Antognolli <rafael.antognolli@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4660 >
2020-04-22 08:46:12 +00:00
Lionel Landwerlin
f402b7c576
iris: fail screen creation when kernel support is not there
...
v2: Bump check to I915_PARAM_HAS_CONTEXT_ISOLATION (v4.16) (Ken)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2803
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4643 >
2020-04-22 08:18:33 +00:00
Samuel Pitoiset
bca97abffa
gitlab-ci: add a list of excluded tests for RADV
...
Exclude WSI related tests in CI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4656 >
2020-04-22 09:11:53 +02:00
Jason Ekstrand
f1a12d6855
meta,i965: Rip GL_EXT_texture_multisample_blit_scaled support out of meta
...
i965 is the only driver that ever linked to this code and it's been
doing it in BLORP for a long time now. The only possible case where it
would have fallen back to meta was for depth/stencil but that should
have ended starting with 6cec618e82 . Rip out the dead code.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4622 >
2020-04-22 03:02:23 +00:00
Alyssa Rosenzweig
c6244f9311
panfrost: Assert on unimplemented fragcoord etc
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:18 +00:00
Alyssa Rosenzweig
133c1aba05
panfrost: Fix crashes with small BOs
...
Affects Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:18 +00:00
Alyssa Rosenzweig
5c6952108c
pan/bi: Assert out multiple textures
...
Only for a moment.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:18 +00:00
Alyssa Rosenzweig
3551c138de
pan/bi: Pack TEX compact instructions
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:18 +00:00
Alyssa Rosenzweig
cd5fe3b9e0
pan/bi: Generate TEX_COMPACT instruction
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
0769036a5c
pan/bi: Stub out tex_compact logic
...
We may generate either texture type.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
f85746af35
pan/bi: Add normal/compact/dual switch to IR
...
For tex.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
93be49b14b
pan/bi: Feed data register to BI_TEX
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
76d1bb03d5
pan/bi: Include TEX_COMPACT f16 opcode
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
bfc06b10de
pan/bi: Structify TEX compact
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
cf7b952308
pan/bi: Disassemble f16 dual tex
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
a2c735350f
pan/bi: Document when dual-tex is triggered
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Alyssa Rosenzweig
6fe41a12e3
pan/bi: Print tex_compact coordinates
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4671 >
2020-04-22 01:01:17 +00:00
Kenneth Graunke
902c8731f4
intel/compiler: Put back saturate on [iu]add_sat opcodes
...
I deleted one too many inst->saturate = ... lines. This one must stay.
Fixes: b7c47c4f7c ("intel/compiler: Drop nir_lower_to_source_mods() and related handling.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4669 >
2020-04-22 00:47:40 +00:00