Jason Ekstrand [Thu, 15 Oct 2020 20:11:56 +0000 (15:11 -0500)]
anv: Go back to using the sampler for UBO pulls
This functionally reverts
b54d37a8676acbd725ef1817479f2630d3ea95be.
This fixes a 12% performance regression in DOOM (2016) on Tigerlake.
Fixes:
b54d37a8676a "anv: Use the data cache for indirect UBO..."
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7173>
Jose Maria Casanova Crespo [Thu, 15 Oct 2020 11:38:11 +0000 (13:38 +0200)]
vc4: Enable nir_lower_io for uniforms
Altough the driver isn't expected to receive nir_var_uniform types
from GLSL this happens currently for one of the internal driver shaders.
At vc4_get_yuv_fs at vc4_blit.c there is a "stride" nir_var_uniform
variable that needs to be lowered so the shader can be compiled.
This regression was affecting several piglit tests under
spec/ext_image_dma_buf_import and at least MythTV application.
Fixes:
96d99f2eccb ("vc4: Only call nir_lower_io on shader_in/out")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3536
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7160>
Jose Maria Casanova Crespo [Thu, 15 Oct 2020 11:27:50 +0000 (13:27 +0200)]
vc4: Add missing range_base/range at nir_load_ubos in yuv_blit fs.
Fixes:
f3b33a5a35e ("nir: Add a range_base+range to nir_intrinsic_load_ubo().")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7160>
Jose Maria Casanova Crespo [Thu, 15 Oct 2020 11:22:28 +0000 (13:22 +0200)]
vc4: Add missing load_ubo set_align in yuv_blit fs.
Fixes:
e78a7a18252 ("nir: Assert memory loads are aligned")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7160>
Rhys Perry [Thu, 15 Oct 2020 13:21:52 +0000 (14:21 +0100)]
nir/opt_load_store_vectorize: add some tests for discard/demote behaviour
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7163>
Rhys Perry [Thu, 15 Oct 2020 13:13:36 +0000 (14:13 +0100)]
nir/opt_load_store_vectorize: don't vectorize stores across demote
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes:
ce9205c03bd ("nir: add a load/store vectorization pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7163>
Ian Romanick [Wed, 7 Oct 2020 17:28:47 +0000 (10:28 -0700)]
intel: Remove Gen10-specific device entries
The enables removal of gen_device_info::is_cannonlake.
v2: Remove GEN10_FEATURES and GEN10_HW_INFO macros. Suggested by
Lionel.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Wed, 7 Oct 2020 17:25:42 +0000 (10:25 -0700)]
intel: Remove Gen10-speicific perf support
v2: Also update Makefile.sources and Android build files. Noticed by
Lionel.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 20:29:00 +0000 (13:29 -0700)]
anv: Don't generate Gen10-specific functions
v2: Re-wrap lines in meson.build. Suggested by Jason.
v3: Also update Makefile.sources and Android build files. Noticed by
Lionel.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 20:28:03 +0000 (13:28 -0700)]
iris: Don't generate Gen10-specific functions
v2: Also update Makefile.sources and Android build files. Noticed by
Lionel. Remove more stuff from iris_context.h.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 20:08:00 +0000 (13:08 -0700)]
intel/isl: Don't generate Gen10-specific functions
v2: Also update Makefile.sources and Android build files. Noticed by
Lionel.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 20:02:41 +0000 (13:02 -0700)]
intel: Remove Gen10-specific cache config code
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 19:36:13 +0000 (12:36 -0700)]
i965: Don't build Gen10-specific files and libraries
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 19:35:25 +0000 (12:35 -0700)]
i965: Remove Gen10-specific state setup and workarounds
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 18:31:13 +0000 (11:31 -0700)]
intel/compiler: Remove Gen10-specific code
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 19:49:19 +0000 (12:49 -0700)]
intel: Disable all support for Gen10
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 18:49:13 +0000 (11:49 -0700)]
i965: Rename gen10_emit_isp_disable to gen7_emit_isp_disable
It's used on Gen7+, and there's nothing Gen10-specific about it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 19:33:25 +0000 (12:33 -0700)]
i965: Make MOCS index tables static const
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 19:32:11 +0000 (12:32 -0700)]
i965: Silence many unused parameter warnings in genX_state_upload.c
This file gets built per-Gen, so the warnings are repeated a lot.
src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘vf_invalidate_for_vb_48bit_transitions’:
src/mesa/drivers/dri/i965/genX_state_upload.c:405:60: warning: unused parameter ‘brw’ [-Wunused-parameter]
405 | vf_invalidate_for_vb_48bit_transitions(struct brw_context *brw)
| ~~~~~~~~~~~~~~~~~~~~^~~
src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘vf_invalidate_for_ib_48bit_transition’:
src/mesa/drivers/dri/i965/genX_state_upload.c:444:59: warning: unused parameter ‘brw’ [-Wunused-parameter]
444 | vf_invalidate_for_ib_48bit_transition(struct brw_context *brw)
| ~~~~~~~~~~~~~~~~~~~~^~~
src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘gen4_upload_default_color’:
src/mesa/drivers/dri/i965/genX_state_upload.c:4951:40: warning: unused parameter ‘format’ [-Wunused-parameter]
4951 | mesa_format format, GLenum base_format,
| ~~~~~~~~~~~~^~~~~~
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 19:29:53 +0000 (12:29 -0700)]
i965: Silence many unused parameter warnings in genX_blorp_exec.c
This file gets built per-Gen, so the warnings are repeated a lot.
src/mesa/drivers/dri/i965/genX_blorp_exec.c: In function ‘blorp_get_surface_address’:
src/mesa/drivers/dri/i965/genX_blorp_exec.c:98:47: warning: unused parameter ‘blorp_batch’ [-Wunused-parameter]
98 | blorp_get_surface_address(struct blorp_batch *blorp_batch,
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
src/mesa/drivers/dri/i965/genX_blorp_exec.c:99:48: warning: unused parameter ‘address’ [-Wunused-parameter]
99 | struct blorp_address address)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
src/mesa/drivers/dri/i965/genX_blorp_exec.c: In function ‘blorp_vf_invalidate_for_vb_48b_transitions’:
src/mesa/drivers/dri/i965/genX_blorp_exec.c:208:64: warning: unused parameter ‘batch’ [-Wunused-parameter]
208 | blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *batch,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
src/mesa/drivers/dri/i965/genX_blorp_exec.c:209:72: warning: unused parameter ‘addrs’ [-Wunused-parameter]
209 | const struct blorp_address *addrs,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
src/mesa/drivers/dri/i965/genX_blorp_exec.c:211:53: warning: unused parameter ‘num_vbs’ [-Wunused-parameter]
211 | unsigned num_vbs)
| ~~~~~~~~~^~~~~~~
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Thu, 24 Sep 2020 19:19:39 +0000 (12:19 -0700)]
intel: Silence many unused parameter warnings in blorp_genX_exec.h
I considered a couple other options (including adding #if / #endif
around UNUSED and adding an UNUSED_ON_SOME_GEN), but this seemed the
best. There was also at least one other case of having UNUSED on a
paramter that is sometimes unused (params in
blorp_emit_color_calc_state).
This header gets included in a lot of places (esp. in files that get
built per-Gen), so the warnings are repeated a lot.
In file included from src/mesa/drivers/dri/i965/genX_blorp_exec.c:33:
src/intel/blorp/blorp_genX_exec.h: In function ‘emit_urb_config’:
src/intel/blorp/blorp_genX_exec.h:193:48: warning: unused parameter ‘deref_block_size’ [-Wunused-parameter]
193 | enum gen_urb_deref_block_size *deref_block_size)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
src/intel/blorp/blorp_genX_exec.h: In function ‘blorp_fill_vertex_buffer_state’:
src/intel/blorp/blorp_genX_exec.h:350:52: warning: unused parameter ‘batch’ [-Wunused-parameter]
350 | blorp_fill_vertex_buffer_state(struct blorp_batch *batch,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
src/intel/blorp/blorp_genX_exec.h: In function ‘blorp_emit_surface_state’:
src/intel/blorp/blorp_genX_exec.h:1403:42: warning: unused parameter ‘aux_op’ [-Wunused-parameter]
1403 | enum isl_aux_op aux_op,
| ~~~~~~~~~~~~~~~~^~~~~~
src/intel/blorp/blorp_genX_exec.h: In function ‘blorp_update_clear_color’:
src/intel/blorp/blorp_genX_exec.h:1867:46: warning: unused parameter ‘batch’ [-Wunused-parameter]
1867 | blorp_update_clear_color(struct blorp_batch *batch,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6899>
Ian Romanick [Tue, 13 Oct 2020 01:13:19 +0000 (18:13 -0700)]
i965: Allow viewport array extensions with allow_higher_compat_version
Also fix the obtuse comment. I had to dig back through the commit logs
to find the real issue. GL_ARB_viewport_array requires geometry
shaders, and in i965 the only way to have that is with a 3.2+ Core
profile context... or use allow_higher_compat_version.
This increases the maximum Compatibility profile version from 4.0 to 4.6
(on supported hardware) when the allow_higher_compat_version option is
used.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7118>
Tomeu Vizoso [Thu, 15 Oct 2020 13:00:55 +0000 (15:00 +0200)]
ci: Unskip fragment_ops tests on Bifrost
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7165>
Mike Blumenkrantz [Fri, 10 Jul 2020 18:58:55 +0000 (14:58 -0400)]
zink: add last few format maps for ARB_vertex_type_2_10_10_10_rev
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7140>
Mike Blumenkrantz [Thu, 2 Jul 2020 21:40:16 +0000 (17:40 -0400)]
zink: add VK_BUFFER_USAGE_INDEX_BUFFER_BIT to vertex buffer creation
these can be mixed vertex/index buffers, and there's not really any way
to know in advance
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132>
Mike Blumenkrantz [Thu, 2 Jul 2020 18:56:43 +0000 (14:56 -0400)]
zink: handle null attachment for ARB_texture_buffer_object samplers
according to spec:
If no buffer object is bound to the buffer texture,
the results of the texel access are undefined.
so this is technically allowed
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132>
Mike Blumenkrantz [Thu, 2 Jul 2020 16:39:09 +0000 (12:39 -0400)]
zink: assert valid format in zink_create_sampler_view()
catch issues higher up the stack here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132>
Mike Blumenkrantz [Thu, 2 Jul 2020 16:27:41 +0000 (12:27 -0400)]
zink: ensure resource tracking for sampler buffers in render batches
this fixes some synchronization issues when using e.g., buffer textures
that change their data repeatedly
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132>
Mike Blumenkrantz [Thu, 2 Jul 2020 15:54:53 +0000 (11:54 -0400)]
zink: implement ARB_texture_buffer_object
the pipe cap for this was enabled for some reason, but the actual functionality
was never implemented
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132>
Mike Blumenkrantz [Tue, 11 Aug 2020 15:02:01 +0000 (11:02 -0400)]
zink: increase descriptor pool sizes for other descriptor types we'll be using
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7132>
Mike Blumenkrantz [Wed, 15 Jul 2020 16:24:35 +0000 (12:24 -0400)]
glsl: more accurately handle swizzle in 64bit varying split with no left value
as implied in the surrounding code, left_components can be 0 here, in which
case creating a left swizzle is unnecessary (and triggers an assert)
this moves a failing assert farther down the stack to a more useful location
when trying to pack e.g., struct[3] { dvec3; float; }
ref spec@arb_gpu_shader_fp64@execution@inout@vs-out-fs-in-s1-s2@3-dvec2-float
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7134>
Rhys Perry [Tue, 13 Oct 2020 12:38:16 +0000 (13:38 +0100)]
aco: don't use v_pack_b32_f16 if 16-bit input denormals are flushed
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/7111>
Rhys Perry [Tue, 13 Oct 2020 12:33:57 +0000 (13:33 +0100)]
aco: propagate literals into sub-dword pseudo instructions on GFX9+
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/7111>
Rhys Perry [Tue, 13 Oct 2020 12:32:38 +0000 (13:32 +0100)]
aco: implement 16-bit literals
We can copy any value into a 16-bit subregister with a 3 dword
v_pack_b32_f16 on GFX10 or a v_and_b32+v_or_b32 on GFX9.
Because the generated code can depend on the register assignment and to
improve constant propagation, Builder::copy creates a p_create_vector in
the case of sub-dword literals.
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/7111>
Boris Brezillon [Mon, 12 Oct 2020 13:18:35 +0000 (15:18 +0200)]
panfrost: Add blend shader support to bifrost
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Fri, 9 Oct 2020 13:45:16 +0000 (15:45 +0200)]
panfrost: Add missing tile-buffer formats to the format enum
Some tile-buffer formats are missing, add them.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Wed, 14 Oct 2020 12:11:52 +0000 (14:11 +0200)]
pan/bi: Special-case load_input for blend shaders
Blend shaders are passed blend inputs through r0-r3. Let's emit a MOV
from those register when we see a load_input intrinsic.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Wed, 14 Oct 2020 12:10:14 +0000 (14:10 +0200)]
pan/bi: Reserve r0-r3 in blend shaders
Blend shaders are passed the source color through r0-r3. Let's avoid
allocating those. The is definitely not the right solution but is good
enough for now.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 13:17:42 +0000 (15:17 +0200)]
pan/bi: Special-case BLEND instruction emission for blend shaders
Blend shaders shouldn't use the blend descriptors stored in the FAU RAM
since this is what triggered the blend shader call in the first place.
The descriptor is instead extracted from the compiler inputs and passed
as a constant to the blend instruction.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Tue, 13 Oct 2020 10:26:11 +0000 (12:26 +0200)]
pan/bi: Collect return addresses of blend calls
We will need that for blend shaders so they can be passed a return
address and jump back to the fragment shader when they're done.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 13:02:29 +0000 (15:02 +0200)]
pan/bi: Add load_output support
This is mapped to the LD_TILE instruction. Note that multi-sample RTs
are not supported yet.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 12:28:46 +0000 (14:28 +0200)]
panfrost: Flag blend shader function as an entry point
Some lowering functions used by bifrost are searching for an entry point.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 12:26:47 +0000 (14:26 +0200)]
panfrost: Scalarize nir_load_blend_const_color_rgba
Bifrost is a scalar architecture, which means we can't load all
components of the blend constant at once. We could add a lowering pass
to scalarize nir_load_blend_const_color_rgba, but it's easier to handle
that at when lowering the blend equations.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 12:16:53 +0000 (14:16 +0200)]
panfrost: Add a "Bifrost Internal Blend" descriptor
This descriptor can be passed directly as a constant to the bifrost
BLEND instruction and we'll need to pass this information to blend
shaders. Let's extract the "Bifrost Internal Blend" descriptor from the
"Bifrost Blend Overlay" definition.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Tue, 13 Oct 2020 10:22:02 +0000 (12:22 +0200)]
pan/bi: Support indirect jumps
We need that for blend shaders which are passed the return address
through r48.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 09:25:25 +0000 (11:25 +0200)]
pan/bi: Add support for load_blend_const_color_{r,g,b,a}_float
Needed for blend shaders.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 09:19:45 +0000 (11:19 +0200)]
pan/bi: Rework blend descriptor access handling
The current logic assumes blend descriptors are always retrieved from
the blend descriptor slots present in the FAU RAM, but this assumption
no longer stands when we add blend shaders to the mix. In that case we
need to use an 'opaque blend' whose descriptor is passed through
embedded constants.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 09:07:45 +0000 (11:07 +0200)]
pan/bi: Get rid of the regs argument in bi_assign_fau_idx()
Regs are already part of the bundle struct, let's just pass a pointer
to this bundle object instead of passing both the bundle and regs.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 08:57:40 +0000 (10:57 +0200)]
pan/bi: Use canonical name for FAU RAM sources
The uniform_constant field and BIFROST_SRC_CONST_{LO,HI} definitions
seem to imply that those only deal with embedded constants. Let's
rename them to reflect the fact that they actually encode accesses to
the Fast-Access-Uniform RAM.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 13:00:02 +0000 (15:00 +0200)]
pan/bi: Copy blend shader info from compile_inputs
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Mon, 12 Oct 2020 12:56:45 +0000 (14:56 +0200)]
panfrost: Extend compile_inputs to pass a blend descriptor
This is needed for BLEND instructions used from a blend shader so we can
store the result of the shader-based blending back to the tile buffer.
We let the gallium driver build this blend descriptor for us in order
to keep the compiler cmdstream-agnostic.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Boris Brezillon [Fri, 9 Oct 2020 12:00:28 +0000 (14:00 +0200)]
panfrost: Fix fixed-function blend on bifrost
The conversion from a 32b float to a 16b fixed-point number was wrong.
Fixes:
8389976b7c09 ("panfrost: XML-ify the blend descriptors")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7151>
Iago Toral Quiroga [Thu, 6 Aug 2020 12:14:17 +0000 (14:14 +0200)]
v3d/compiler: implement load interpolated input intrinsics
We will lower GLSL interpolateAt functions to these.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7155>
Iago Toral Quiroga [Wed, 5 Aug 2020 08:53:59 +0000 (10:53 +0200)]
broadcom/compiler: track partially interpolated fragment inputs
We will need these to implement GLSL's interpolateAt*() functions where
we are required to perform interpolation in the shader at arbitrary
offsets.
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7155>
Kenneth Graunke [Wed, 14 Oct 2020 21:56:19 +0000 (14:56 -0700)]
iris: Fix doubling of shared local memory (SLM) sizes.
Commit
67ee9c5f5537fe85357556a4322a07253d13a697 added support for
using the `pipe_compute_state::req_local_mem` field, because Clover
can have a run-time specified size that isn't baked into the shaders.
However, it started adding the static size from the shader to the
dynamic state-supplied size. The Mesa state tracker fills out
req_local_mem to prog->Base.info.cs.shared_size, which is exactly
what we fill out prog_data->total_shared to be. Effectively, this
meant that we double-counted the same SLM requirements, doubling
our space requirements.
Fixes a 10% performance regression in Synmark2's OglCSDof test.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7152>
Kenneth Graunke [Wed, 14 Oct 2020 21:52:37 +0000 (14:52 -0700)]
intel/compiler, anv: Delete cs_prog_data->slm_size
cs_prog_data->slm_size is basically redundant with
prog_data->total_shared, which is the field that we actually use for
controlling the shared local memory size in all drivers. We were
still using it in one place for VK_EXT_pipeline_executable_properties,
but we should just fix that and delete the field.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7152>
Arcady Goldmints-Orlov [Mon, 28 Sep 2020 06:38:34 +0000 (01:38 -0500)]
broadcom/compiler: use nir io semantics
This allows to clean up some code.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6721>
Alejandro Piñeiro [Mon, 12 Oct 2020 23:24:29 +0000 (01:24 +0200)]
nir/lower_io_to_scalar: update io semantics on per-component inst
When we replace the original instruction with per-channel operations,
the new instruction should inherint the semantics of the original
instruction.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6721>
Arcady Goldmints-Orlov [Sat, 25 Jul 2020 15:50:01 +0000 (10:50 -0500)]
broadcom/compiler: support varyings with struct types
This adds support for using structs as outputs from vertex shaders and
inputs to fragment shaders.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6721>
Eric Engestrom [Sun, 6 Sep 2020 07:12:43 +0000 (09:12 +0200)]
docs/release-calendar: plan 20.3 release
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6616>
Jason Ekstrand [Wed, 2 Sep 2020 20:24:01 +0000 (15:24 -0500)]
intel/fs: Allow constant-propagation into SAMPLEINFO and IMAGE_SIZE
Without this, we end up with indirect sampler messages all the time
because we don't propagate the texture/image BTI. This makes debugging
shaders with imageSize or textureSamples in them a pain.
Shader-db results on Ice Lake:
total instructions in shared programs:
19720612 ->
19720564 (<.01%)
instructions in affected programs: 4998 -> 4950 (-0.96%)
helped: 12
HURT: 0
All affected shaders were compute shaders in Deus Ex: Mankind Divided.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6794>
Eric Engestrom [Wed, 14 Oct 2020 17:52:14 +0000 (19:52 +0200)]
docs: update calendar and link releases notes for 20.1.10
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7147>
Eric Engestrom [Wed, 14 Oct 2020 17:35:41 +0000 (19:35 +0200)]
docs: add release notes for 20.1.10
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7147>
Nanley Chery [Fri, 9 Oct 2020 18:25:53 +0000 (11:25 -0700)]
isl: Allow CCS for 8bpp surfaces with 3+ miplevels
I can't find a restriction for enabling CCS on these surfaces in recent
versions of the Bspec. Since I didn't cite my source, I'm not even sure
such a restriction existed in the first place.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7085>
Nanley Chery [Fri, 9 Oct 2020 17:07:51 +0000 (10:07 -0700)]
iris: Add fast-clear restriction for 8bpp surfaces
For 8bpp surfaces on TGL, prevent LOD1+ from being fast-cleared. This
will be relevant once ISL starts allowing CCS for 8bpp surfaces with
more than 2 miplevels. I verified the problem behind this restriction
with a modified version of the fbo-clearmipmap piglit test.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7085>
Dylan Baker [Wed, 14 Oct 2020 17:42:27 +0000 (10:42 -0700)]
docs: update calendar and link releases notes for 20.2.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7141>
Dylan Baker [Wed, 14 Oct 2020 17:33:42 +0000 (10:33 -0700)]
docs: add SHA256 sums for 20.2.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7141>
Dylan Baker [Wed, 14 Oct 2020 16:46:48 +0000 (09:46 -0700)]
docs: add release notes for 20.2.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7141>
Samuel Pitoiset [Tue, 13 Oct 2020 14:28:34 +0000 (16:28 +0200)]
radv: fix optimizing needed states if some are marked as dynamic
From the Vulkan spec 1.2.157:
"VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT specifies that the
stencilTestEnable state in VkPipelineDepthStencilStateCreateInfo
will be ignored and must be set dynamically with
vkCmdSetStencilTestEnableEXT before any draw call."
So, stencilTestEnable should be ignored if dynamic. While we are
at it, fix depthBoundsTestEnable too.
Cc: 20.2
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3633
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/7112>
Eric Anholt [Sat, 12 Sep 2020 16:16:59 +0000 (09:16 -0700)]
docs: Document how to replicate a CI build locally.
Who hasn't needed to do this at some point? Turns out it's not too hard
to do, and was useful for me in iterating on the Android build.
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6700>
Eric Anholt [Wed, 9 Sep 2020 23:37:54 +0000 (16:37 -0700)]
ci/android: Switch to using the Android NDK.
To support Android drivers, we're going to want to be tracking that Mesa's
build succeeds on a real android toolchain. This still uses the android
stubs since these libs aren't in the NDK.
Note that I had to drop the Intel and AMD drivers currently: we don't have
LLVM cross-compiled for Android in this container, and I'm honestly hoping
ACO saves us from that. Intel has dependencies on libexpat, which AOSP
really doesn't want to bring in, and it looks to me like those dependencies
could be optional.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6700>
Eric Anholt [Tue, 6 Oct 2020 16:17:32 +0000 (09:17 -0700)]
symbols-check: Add __cxa_guard_* to the list of approved symbols.
These are introduced by the compiler during static local initialization in
c++ for thread safety. This seems to end up being public in the driver
with --static-libc++ on android.
Reviewed-by: <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6700>
Eric Anholt [Sat, 12 Sep 2020 15:53:52 +0000 (08:53 -0700)]
glsl/tests: Make the tests skip on Android binary execution failures.
We don't have a suitable exe wrapper for running them, and the missing
linker is throwing return code 255 instead of an ENOEXEC. Catch it and
return skip from the tests.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6700>
Eric Anholt [Wed, 9 Sep 2020 23:43:02 +0000 (16:43 -0700)]
meson: Drop adding -Wl,--gc-sections to project c/cpp arguments.
We already have the targets we care about doing this using
ld_args_gc_sections, and by adding it to project arguments we caused
warnings spam in the android clang build about the compile stage not using
the argument.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6700>
Tony Wasserka [Tue, 13 Oct 2020 13:59:08 +0000 (15:59 +0200)]
aco/isel: Remove now unused VS-related code from create_null_export
Also replaced a hardcoded constant with the appropriate register macro.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7102>
Tony Wasserka [Mon, 12 Oct 2020 18:58:21 +0000 (20:58 +0200)]
aco/isel: Remove some dead code
exported_pos was always initialized to true (due to the is_pos argument
of the first export_vs_varying call being true), so none of this code has
any effect.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7102>
Tony Wasserka [Mon, 12 Oct 2020 17:05:14 +0000 (19:05 +0200)]
aco/isel: Always export position data from VS/NGG
AMD ISA docs explicitly require this for VS, and this likely extends to
NGG too.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3615
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7102>
Daniel Schürmann [Mon, 21 Sep 2020 17:35:52 +0000 (18:35 +0100)]
aco: use VOP2 for v_cvt_pkrtz_f16_f32 if possible
This patch also does a slight rework of export_fs_mrt_color()
to avoid setting of enabled channels which are not used.
Totals from 52404 (38.38% of 136546) affected shaders (NAVI):
SGPRs: 3097443 -> 3097435 (-0.00%)
CodeSize:
189151600 ->
188546200 (-0.32%)
Instrs:
36445061 ->
36445104 (+0.00%); split: -0.00%, +0.00%
Cycles:
1739388020 ->
1739388192 (+0.00%); split: -0.00%, +0.00%
VMEM:
21071501 ->
21071665 (+0.00%); split: +0.00%, -0.00%
SMEM: 3470983 -> 3470982 (-0.00%); split: +0.00%, -0.00%
PreSGPRs: 2058965 -> 2058962 (-0.00%)
PreVGPRs: 1860294 -> 1860295 (+0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Fri, 18 Sep 2020 17:02:08 +0000 (18:02 +0100)]
aco: use VOP2 version of v_cvt_pkrtz_f16_f32 on GFX_6_7_10
Totals from 767 (0.56% of 136546) affected shaders (NAVI):
CodeSize: 2862208 -> 2850036 (-0.43%)
Instrs: 561572 -> 561574 (+0.00%)
Cycles: 6455420 -> 6455428 (+0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Fri, 18 Sep 2020 16:48:36 +0000 (17:48 +0100)]
radv,aco: lower_pack_half_2x16
This patch also optimizes pack_half_2x16(a, 0.0).
Totals from 1949 (1.43% of 136546) affected shaders (RAVEN):
SGPRs: 83376 -> 83336 (-0.05%)
CodeSize: 3532144 -> 3512352 (-0.56%)
Instrs: 660746 -> 660682 (-0.01%); split: -0.01%, +0.00%
Cycles: 6780716 -> 6780472 (-0.00%); split: -0.00%, +0.00%
VMEM: 990886 -> 990883 (-0.00%); split: +0.00%, -0.00%
SMEM: 150506 -> 150538 (+0.02%); split: +0.05%, -0.03%
SClause: 30595 -> 30594 (-0.00%); split: -0.01%, +0.00%
Copies: 40801 -> 40729 (-0.18%)
PreSGPRs: 52335 -> 52341 (+0.01%); split: -0.03%, +0.04%
PreVGPRs: 45104 -> 45097 (-0.02%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Fri, 18 Sep 2020 16:34:37 +0000 (17:34 +0100)]
aco: use v_cvt_pkrtz_f16_f32 for pack_half_2x16
Apparently, we forgot to remove some debug code.
This patch also fixes the round mode check to consider
the destination bit width.
Totals from 2218 (1.62% of 136546) affected shaders (RAVEN):
SGPRs: 100848 -> 100280 (-0.56%)
VGPRs: 68536 -> 66044 (-3.64%); split: -3.68%, +0.05%
CodeSize: 4882296 -> 4837220 (-0.92%); split: -0.94%, +0.01%
MaxWaves: 18990 -> 19019 (+0.15%); split: +0.19%, -0.04%
Instrs: 938150 -> 930388 (-0.83%); split: -0.83%, +0.00%
Cycles: 8699824 -> 8667648 (-0.37%); split: -0.38%, +0.01%
VMEM: 1144502 -> 1059680 (-7.41%); split: +0.06%, -7.48%
SMEM: 170076 -> 167999 (-1.22%); split: +0.22%, -1.44%
VClause: 18428 -> 18422 (-0.03%)
SClause: 41375 -> 41353 (-0.05%); split: -0.06%, +0.00%
Copies: 60008 -> 60054 (+0.08%); split: -0.31%, +0.39%
PreVGPRs: 56163 -> 56142 (-0.04%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Fri, 18 Sep 2020 14:55:54 +0000 (15:55 +0100)]
aco: add validation rules for p_split_vector
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Fri, 18 Sep 2020 12:48:52 +0000 (13:48 +0100)]
aco: use p_split_vector for nir_op_unpack_half_*
This enables the use of SDWA if possible
Totals from 9933 (7.27% of 136546) affected shaders (RAVEN):
VGPRs: 731764 -> 731772 (+0.00%); split: -0.00%, +0.00%
CodeSize:
90944852 ->
90671472 (-0.30%); split: -0.30%, +0.00%
Instrs:
17881885 ->
17867831 (-0.08%); split: -0.08%, +0.00%
Cycles:
1597904072 ->
1597771260 (-0.01%); split: -0.01%, +0.00%
VMEM: 1702328 -> 1697383 (-0.29%); split: +0.13%, -0.42%
SMEM: 659583 -> 659049 (-0.08%); split: +0.01%, -0.09%
VClause: 318024 -> 318025 (+0.00%); split: -0.00%, +0.00%
SClause: 631670 -> 631707 (+0.01%); split: -0.01%, +0.01%
Copies: 1504107 -> 1504626 (+0.03%); split: -0.01%, +0.04%
PreVGPRs: 683153 -> 683180 (+0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Fri, 18 Sep 2020 12:50:25 +0000 (13:50 +0100)]
nir/opt_algebraic: optimize unpack_half_2x16_split_x(ushr, a, 16)
Same as extract_u16(a, 1)
Totals from 2021 (1.48% of 136546) affected shaders (RAVEN):
VGPRs: 129516 -> 129524 (+0.01%); split: -0.00%, +0.01%
CodeSize:
12485704 ->
12486600 (+0.01%); split: -0.00%, +0.01%
Instrs: 2435041 -> 2434999 (-0.00%); split: -0.00%, +0.00%
Cycles:
20952552 ->
20952624 (+0.00%); split: -0.00%, +0.00%
VMEM: 374492 -> 374212 (-0.07%); split: +0.01%, -0.08%
SMEM: 123309 -> 123291 (-0.01%); split: +0.00%, -0.02%
VClause: 64156 -> 64164 (+0.01%)
Copies: 191620 -> 191616 (-0.00%); split: -0.03%, +0.03%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Thu, 17 Sep 2020 23:02:21 +0000 (00:02 +0100)]
aco: use p_create_vector for nir_op_pack_half_2x16
This enables the use of SDWA if possible
Totals from 2218 (1.62% of 136546) affected shaders (RAVEN):
VGPRs: 68508 -> 68516 (+0.01%)
CodeSize: 4897024 -> 4881068 (-0.33%); split: -0.33%, +0.00%
MaxWaves: 18992 -> 18990 (-0.01%)
Instrs: 946942 -> 939161 (-0.82%); split: -0.82%, +0.00%
Cycles: 8737668 -> 8705704 (-0.37%); split: -0.37%, +0.00%
VMEM: 1155362 -> 1145245 (-0.88%); split: +0.00%, -0.88%
SMEM: 170435 -> 170165 (-0.16%); split: +0.01%, -0.16%
VClause: 18426 -> 18425 (-0.01%)
SClause: 41376 -> 41375 (-0.00%)
Copies: 59813 -> 59787 (-0.04%); split: -0.15%, +0.10%
PreVGPRs: 56126 -> 56136 (+0.02%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Fri, 18 Sep 2020 10:52:35 +0000 (11:52 +0100)]
aco: expand create_vector more carefully w.r.t. subdword operands
No pipelinedb changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Daniel Schürmann [Thu, 17 Sep 2020 23:00:38 +0000 (00:00 +0100)]
aco: propagate SGPRs into VOP1 instructions early.
This helps DCE. We should reconsider our optimization order
or maybe do the dead code analysis twice
Totals from 106 (0.08% of 136546) affected shaders (RAVEN):
SGPRs: 7184 -> 7152 (-0.45%)
CodeSize: 736912 -> 736052 (-0.12%)
Instrs: 145739 -> 145509 (-0.16%)
Cycles: 2085344 -> 2084268 (-0.05%)
VMEM: 14819 -> 14807 (-0.08%)
SMEM: 7109 -> 7100 (-0.13%); split: +0.04%, -0.17%
SClause: 5383 -> 5385 (+0.04%)
Copies: 13290 -> 13189 (-0.76%)
PreSGPRs: 5265 -> 5221 (-0.84%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6777>
Mike Blumenkrantz [Tue, 7 Jul 2020 18:28:31 +0000 (14:28 -0400)]
zink: unify code for emitting named uint-based variable instructions
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7130>
Samuel Pitoiset [Thu, 8 Oct 2020 11:54:18 +0000 (13:54 +0200)]
aco: adjust an assertion about the wavesize in emit_gfx10_wave64_bpermute()
This gets rids of one more use of radv_shader_info.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7061>
Samuel Pitoiset [Thu, 8 Oct 2020 11:51:27 +0000 (13:51 +0200)]
aco: compute the CS workgroup size from the shader NIR info
cs.block_size is copied from cs.local_size during the shader info pass.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7061>
Samuel Pitoiset [Thu, 8 Oct 2020 11:14:21 +0000 (13:14 +0200)]
radv: move compiler statistics to ACO
They are really specific to ACO.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7061>
Samuel Pitoiset [Thu, 8 Oct 2020 08:18:08 +0000 (10:18 +0200)]
aco: remove unused radv_shader.h includes
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7061>
Samuel Pitoiset [Thu, 8 Oct 2020 08:12:58 +0000 (10:12 +0200)]
aco: remove useless occurences of radv_nir_compiler_options
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7061>
Samuel Pitoiset [Thu, 8 Oct 2020 08:11:48 +0000 (10:11 +0200)]
aco: remove stub lower_wqm() prototype
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7061>
Mike Blumenkrantz [Tue, 8 Sep 2020 19:08:20 +0000 (15:08 -0400)]
zink: export PIPE_CAP_MAX*_VARYINGS values
this is separate from PIPE_SHADER_CAP_MAX_OUTPUTS
fixes mesa/mesa#3105
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7110>
Erik Faye-Lund [Tue, 13 Oct 2020 16:09:05 +0000 (18:09 +0200)]
zink: add feature-documentation
This adds some documentation for the current feature-set in Zink,
explaining what extensions are currently needed for what functionality.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7116>
Mike Blumenkrantz [Tue, 30 Jun 2020 19:10:12 +0000 (15:10 -0400)]
zink: redo slot mapping again for the last time really I mean it
now that shader compiling is happening all at once, we can store the slot
map on zink_gfx_program directly and reserve it dynamically in order to
use up only the slots that are actually being used across all shader stages
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7100>
Mike Blumenkrantz [Fri, 3 Jul 2020 17:34:34 +0000 (13:34 -0400)]
zink: don't leak sampler view textures
by adding a batch reference for these textures during draw, we can successfully
destroy the resources without crashing
Reviewed-by: Erik Faye-Lun <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6924>
Mike Blumenkrantz [Mon, 29 Jun 2020 18:28:27 +0000 (14:28 -0400)]
zink: explicitly flag fb attachments as being written to in render passes
we need to ensure that we're accurately setting this hint in order to avoid
synchronization issues when determining whether we can read from the buffer
Reviewed-by: Erik Faye-Lun <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6924>
Mike Blumenkrantz [Mon, 29 Jun 2020 18:26:47 +0000 (14:26 -0400)]
zink: add more explicit fencing for transfer maps
we're using our (primitive) buffer r/w tracking here to ensure that our
src buffers are synchronized before we do any kind of read operation on them
this is pretty slow in some cases, but it fixes a bunch of piglit tests
Reviewed-by: Erik Faye-Lun <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6924>