Jason Ekstrand
8f9b8af782
anv: Add anv_pipeline_init/finish helpers
...
This cleans up pipline create/destroy a bit after the compute/gfx split.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5457 >
2020-06-16 17:02:44 +00:00
Jason Ekstrand
1b693341ac
anv: Add an anv_batch_set_storage helper
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5457 >
2020-06-16 17:02:44 +00:00
Jan Beich
fcdefa7e47
anv,iris: unbreak on BSDs after 812cf5f522ab,abf8aed68047
...
../src/intel/vulkan/anv_gem.c:31:10: fatal error: 'linux/sync_file.h' file not found
#include <linux/sync_file.h>
^~~~~~~~~~~~~~~~~~~
../src/gallium/drivers/iris/iris_fence.c:29:10: fatal error: 'linux/sync_file.h' file not found
#include <linux/sync_file.h>
^~~~~~~~~~~~~~~~~~~
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5463 >
2020-06-16 16:02:33 +00:00
Jan Beich
0bd5f9a5bc
drm-uapi: Add sync_file.h
...
Based on <linux/sync_file.h> with BSD portability conditional.
At least FreeBSD supports SYNC_IOC_* via LinuxKPI in DRM.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5463 >
2020-06-16 16:02:33 +00:00
Daniel Schürmann
8006feda09
aco: don't allow SGPRs on logical phis
...
aco_validate() is called after phi lowering, now.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5496 >
2020-06-16 14:46:19 +01:00
Daniel Schürmann
0e47fe3fa2
aco: reorder calls to aco_validate() and cleanup aco_compile_shader()
...
The first call of aco_validate should happen after phi lowering.
Otherwise, subdword restrictions might be violated
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5496 >
2020-06-16 14:46:19 +01:00
Icecream95
ec628aba76
panfrost: Implement ARB_depth_clamp
...
This significantly improves the quality of shadows in OpenMW.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5453 >
2020-06-16 12:59:10 +00:00
Icecream95
fd92dc6b17
panfrost: Clean up panfrost_frag_meta_rasterizer_update
...
Create a pointer to ctx->rasterizer->base so it isn't repeatedly
referred to.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5453 >
2020-06-16 12:59:10 +00:00
Rohan Garg
bfe806c6ad
iris: Fix documentation for _iris_batch_flush
...
_iris_batch_flush has no in_fence and out_fence parameters
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5470 >
2020-06-16 11:47:35 +00:00
Erik Faye-Lund
6785d8c460
zink: expose GLSL 1.30
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5479 >
2020-06-16 09:14:56 +00:00
Erik Faye-Lund
9bf2f4d411
zink: enable cull-distance if supported
...
This is already implemented, and we just need to flip the switch to turn
it on.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5479 >
2020-06-16 09:14:56 +00:00
Erik Faye-Lund
a3d07c4a35
gallium/hud: don't use user vertex buffers
...
This gains back some performance lost in the previous commit, by
bypassing u_vbuf.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5417 >
2020-06-16 08:02:29 +00:00
Erik Faye-Lund
7b86920ae2
Revert "gallium/hud: don't use user vertex buffers"
...
The approach taken in this commit only works on drivers that expose
the PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT capability. For drivers
that don't, the buffer has been unmapped by the time we get to
hud_draw_colored_prims, leading to crashes.
It's not easy to fix the code, but drivers that do support coherent
mapping will most likely do the right think themseleves, so let's just
go back to using user-buffers here.
This reverts commit 4fe1fd4df4
.
Fixes: 4fe1fd4df4
("gallium/hud: don't use user vertex buffers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3106
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5417 >
2020-06-16 08:02:29 +00:00
Rob Clark
167fa2887f
nir/validate: validate intr->num_components
...
Validate that num_components is only set for vectorized instructions, to
prevent other nir passes or driver backends from mistakenly relying on
num_components for non-vectorized instructions.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Jose Maria Casanova Crespo
be16833d96
vc4: don't relay on intr->num_components for non-vectorized intrinsics
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Rob Clark
c148dbe07e
v3d: don't use intr->num_components for non-vectorized intrinsics
...
Squashed-in-fix-from: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Rob Clark
5b5b45ebf6
spriv: don't set num_components for non-vectorised intrinsics
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Rob Clark
2e5b5d9584
nir/lower-atomics-to-ssbo: don't set num_components
...
Of the possible intrinsics generated, only load_ssbo is vectorized (and
store_ssbo is never generated)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Rob Clark
f70d6030e3
nir/builder: don't set intr->num_components
...
The "load-sysval" intrinsics are not vectorized.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Rob Clark
603d3c2991
radv: don't set num_components for non-vectorized intrinsics
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Rob Clark
28a14787c0
freedreno/ir3: don't rely on intr->num_components
...
It is better to use `nir_intrinsic_dest_components()` which also handles
the case of intrinsics with a fixed number of dest components.
Somehow this starts showing up with a nir_serialize round-trip with
shader-cache. But we really shouldn't have been relying on
`intr->num_components` directly.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371 >
2020-06-16 02:48:18 +00:00
Dave Airlie
fce02f4020
mesa/gles3: add support for GL_EXT_shader_group_vote
...
This is the GLES equivalent to ARB_shader_group_vote.
Passes: KHR-GLES31.core.shader_group_vote.*
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5490 >
2020-06-16 12:02:21 +10:00
Dave Airlie
25a629558c
gallivm/cache: don't require a null terminator for cache data.
...
Fixes crashes seen with
./bin/egl_ext_device_base
since cache support was added.
Fixes: 4962d3e107
("gallivm: add cache interface to mcjit")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3118
Tested-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5467 >
2020-06-16 09:48:01 +10:00
Alyssa Rosenzweig
8b6820c92d
panfrost: Simplify AFBC format check
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5484 >
2020-06-15 21:53:09 +00:00
Alyssa Rosenzweig
27d3685528
panfrost: Enable AFBC for RGB565
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5484 >
2020-06-15 21:53:09 +00:00
Alyssa Rosenzweig
92553b6290
panfrost: Correctly calculate tiled stride
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Fixes: bde19c0e7b
("panfrost: Fix tiled texture "stride"s on Bifrost")
Tested-by: Christian Hewitt <christianshewitt@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5474 >
2020-06-15 21:41:18 +00:00
Alyssa Rosenzweig
6b1498f7ac
panfrost: Fix level_2
...
We're not sure what this is but I've always seen it equal to levels.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Christian Hewitt <christianshewitt@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5474 >
2020-06-15 21:41:18 +00:00
Alyssa Rosenzweig
65e0e891d2
panfrost: Update sampler view in Bifrost path
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Fixes: fafc305600
("panfrost: Create a new sampler view bo when the layout changes")
Tested-by: Christian Hewitt <christianshewitt@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5474 >
2020-06-15 21:41:18 +00:00
Alyssa Rosenzweig
32b171d669
panfrost: Merge bifrost_bo/midgard_bo
...
The content is difference but a BO is a BO. Let's reduce code repition
between Midgard and Bifrost paths.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Christian Hewitt <christianshewitt@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5474 >
2020-06-15 21:41:18 +00:00
Dave Airlie
84779e5822
llvmpipe/setup: add planes for draw regions if no scissor.
...
Some tests were using a 1x1 fb bound, with a 2x2 viewport,
and all 4 pixels were getting rendered. Test if the fb bounds
need planes added or not.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3101
v2: add lines support
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5394 >
2020-06-16 06:14:44 +10:00
Jonathan Marek
c1e1b13bfe
turnip: simplify stage2 helpers
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5455 >
2020-06-15 15:35:13 -04:00
Jonathan Marek
067370fe87
turnip: remove duplicated stage2opcode and stage2shaderdb
...
Reduce 3 copies of this same logic into a single one.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5455 >
2020-06-15 15:34:52 -04:00
Rhys Perry
a02e7f6799
aco: fix encoding of certain s_setreg_imm32_b32 instructions
...
If the mode is too small, the operand will be an inline constant and the
literal dword won't be written.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
82c265a514
aco: improve check for moving temporaries out of fixed definitions
...
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
e9578e3033
aco: allow GFX9 partial writes with instructions which use opsel
...
Some instructions such as v_mad_f16 can do partial writes on GFX9.
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
82de70d06e
aco: add more opcodes to can_swap_operands
...
fossil-db (Navi, fp16 enabled):
Totals from 310 (0.24% of 127638) affected shaders:
CodeSize: 1290508 -> 1289716 (-0.06%)
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/5245 >
2020-06-15 18:24:22 +00:00
Samuel Pitoiset
3c1b55962e
aco: allow to swap operands for some 16-bit float instructions
...
No fossil-db changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
575b431c80
aco: validate sub-dword pseudo instructions
...
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
d16a7190a3
aco: optimize 16-bit and 64-bit float comparisons
...
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
22d7122739
aco: copy-propagate constants through p_extract_vector/p_split_vector
...
fossil-db (Navi, fp16 enabled):
Totals from 1 (0.00% of 127638) affected shaders:
CodeSize: 4388 -> 4392 (+0.09%)
VMEM: 465 -> 458 (-1.51%)
Copies: 54 -> 55 (+1.85%)
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
3d6f67950d
aco: improve 8/16-bit constants
...
fossil-db (Navi, fp16 enabled):
Totals from 1 (0.00% of 127638) affected shaders:
CodeSize: 4540 -> 4388 (-3.35%)
Instrs: 861 -> 830 (-3.60%)
Cycles: 3444 -> 3320 (-3.60%)
VMEM: 489 -> 465 (-4.91%)
SMEM: 107 -> 110 (+2.80%)
SClause: 31 -> 30 (-3.23%)
Copies: 58 -> 54 (-6.90%)
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
4784111abc
aco: use 32-bit inline constants for 16-bit integer instructions
...
See https://reviews.llvm.org/D81841
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
dd23345567
aco: fix half_pi constant for 16-bit fsin/fcos
...
This worked because the optimizer didn't consider that the 16-bit
instruction would interpret the inline constant differently. This will
change in the next commit.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
9b69ed0bb9
aco: improve sub-dword check for sgpr/constant propagation
...
p_create_vector can have sub-dword operands with a v1 definition.
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
1210e0bd62
aco: create 16-bit input and output modifiers
...
fossil-db (Navi, fp16 enabled):
Totals from 1 (0.00% of 127638) affected shaders:
CodeSize: 4552 -> 4540 (-0.26%)
Instrs: 863 -> 861 (-0.23%)
Cycles: 3452 -> 3444 (-0.23%)
VMEM: 490 -> 489 (-0.20%)
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
f5a5674178
aco: update comment about preserving fp16/fp64 denormals
...
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
7f511efa16
aco: create 16-bit mad/fma
...
fossil-db (Navi, fp16 enabled):
Totals from 1 (0.00% of 127638) affected shaders:
CodeSize: 4868 -> 4552 (-6.49%)
Instrs: 956 -> 863 (-9.73%)
Cycles: 3824 -> 3452 (-9.73%)
VMEM: 504 -> 490 (-2.78%)
SMEM: 109 -> 107 (-1.83%)
VClause: 19 -> 20 (+5.26%)
Copies: 54 -> 58 (+7.41%)
PreVGPRs: 43 -> 41 (-4.65%)
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
1b10764e50
aco: try to use fma instead of mad when denormals are enabled
...
v_mad_f32 doesn't support denormals but v_fma_f32 does.
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
6cb42cdd8f
aco: create mads when signed zeros should be preserved
...
This check was added because I thought v_mad_f32 didn't preserve the
signess of zero, but I can't reproduce that and this isn't mentioned
anywhere in LLVM.
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00
Rhys Perry
1b6a319c15
aco: add and set precise flag
...
No fossil-db changes.
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/5245 >
2020-06-15 18:24:22 +00:00