Jason Ekstrand [Fri, 10 Jan 2020 00:40:04 +0000 (18:40 -0600)]
genxml: Remove a non-existant HW bit
Kristian H. Kristensen [Thu, 9 Jan 2020 17:37:35 +0000 (09:37 -0800)]
ir3: Set up full/half register conflicts correctly
Setting up transitive conflicts between a full register and its two
half registers (eg r0.x and hr0.x and hr0.y) will make the half
registers conflict. They don't actually conflict and this prevents us
from using both at the same time.
Add and use a new ra helper that sets up transitive conflicts between
a register and its subregisters, except it carefully avoids the
subregister conflict.
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Dave Airlie [Thu, 9 Jan 2020 18:18:19 +0000 (04:18 +1000)]
llvmpipe: add ARB_derivative_control support
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Marek Olšák [Wed, 8 Jan 2020 04:53:26 +0000 (23:53 -0500)]
radeonsi/gfx9: force the micro tile mode for MSAA resolve correctly on gfx9
Fixes: 69ea473 "amd/addrlib: update to the latest version"
Closes: #2325
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Lionel Landwerlin [Wed, 18 Dec 2019 07:16:44 +0000 (09:16 +0200)]
anv: fix intel perf queries availability writes
The availability is not written at the location changed in
ee6fbb95a74d...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ee6fbb95a74d ("anv: Properly handle host query reset of performance queries")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Dylan Baker [Thu, 9 Jan 2020 18:33:49 +0000 (10:33 -0800)]
docs: Add release notes for 19.3.2, update calendar and home page
Dylan Baker [Thu, 9 Jan 2020 18:30:32 +0000 (10:30 -0800)]
docs: add SHA256 sums for 19.3.2
Dylan Baker [Thu, 9 Jan 2020 18:10:46 +0000 (10:10 -0800)]
docs: Add release notes for 19.3.2
Satyajit Sahu [Tue, 24 Dec 2019 05:50:25 +0000 (11:20 +0530)]
radeon/vcn: Handle crop parameters for encoder
Set proper cropping parameter if frame cropping is enabled
Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
Reviewed-by: Boyuan Zhang boyuan.zhang@amd.com
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3328>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3328>
Daniel Schürmann [Wed, 8 Jan 2020 15:09:10 +0000 (16:09 +0100)]
nir: fix printing of var_decl with more than 4 components.
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Fixes: a8ec4082a41830cf67a4fd405402fd2d820722fd ('nir+vtn: vec8+vec16 support')
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3320>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3320>
Samuel Pitoiset [Fri, 3 Jan 2020 10:51:14 +0000 (11:51 +0100)]
radv: advertise VK_AMD_shader_image_load_store_lod
This extension allows to use LOD with image read/write operations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Mon, 6 Jan 2020 09:21:04 +0000 (10:21 +0100)]
aco: handle nir_intrinsic_image_deref_{load,store} with lod
Use image_load_mip and image_store_mip respectively if the lod
parameter isn't zero.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Mon, 6 Jan 2020 07:43:57 +0000 (08:43 +0100)]
amd/llvm: handle nir_intrinsic_image_deref_{load,store} with lod
Use image_load_mip and image_store_mip respectively if the lod
parameter isn't zero.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Mon, 6 Jan 2020 07:27:49 +0000 (08:27 +0100)]
spirv,nir: add new lod parameter to image_{load,store} intrinsics
SPV_AMD_shader_image_load_store_lod allows to use a lod parameter
with OpImageRead, OpImageWrite and OpImageSparseRead.
According to the specification, this parameter should be a 32-bit
integer. It is initialized to 0 when no lod parameter is found
during SPIR-V->NIR translation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Samuel Pitoiset [Fri, 3 Jan 2020 10:49:24 +0000 (11:49 +0100)]
spirv: add SpvCapabilityImageReadWriteLodAMD
New SPIR-V capability for SPV_AMD_shader_image_load_store_lod.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tapani Pälli [Tue, 7 Jan 2020 15:56:26 +0000 (17:56 +0200)]
mesa: create program resource hash in a single place
This is a cleanup but also a fix for commit
dd09f1d806b. In case of
i965 we did not actually create hash for cached shader programs.
Fixes: dd09f1d806b "mesa/st/i965: add a ProgramResourceHash for quicker resource lookup"
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Dave Airlie [Mon, 23 Dec 2019 05:13:10 +0000 (15:13 +1000)]
llvmpipe: add support for ARB_indirect_parameters.
This just adds support for getting the draw count from the
indirect buffer.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
Dave Airlie [Mon, 23 Dec 2019 04:57:05 +0000 (14:57 +1000)]
llvmpipe: enable driver side multi draw indirect
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
Dave Airlie [Mon, 23 Dec 2019 04:56:01 +0000 (14:56 +1000)]
gallium/util: add multi_draw_indirect to util_draw_indirect.
ARB_indirect_parameters needs drivers to deal with mutli_draw_indirect
themselves.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3234>
Thong Thai [Tue, 7 Jan 2020 21:38:25 +0000 (16:38 -0500)]
mesa: Prevent _MaxLevel from being less than zero
When decoding using VDPAU, the _MaxLevel value becomes -1 due to
NumLevels being equal to 0 at a certain point, and decoding fails
due to an assertion later on.
Signed-off-by: Thong Thai <thong.thai@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Marek Olšák [Mon, 30 Dec 2019 19:08:09 +0000 (14:08 -0500)]
ac: add ac_build_s_endpgm
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Mon, 30 Dec 2019 19:08:09 +0000 (14:08 -0500)]
ac: add 128-bit bitcount
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 24 Dec 2019 18:46:23 +0000 (13:46 -0500)]
ac/gpu_info: add pc_lines and use it in radeonsi
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 24 Dec 2019 00:26:46 +0000 (19:26 -0500)]
ac: unify primitive export code
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Fri, 3 Jan 2020 20:56:18 +0000 (15:56 -0500)]
ac: unify build_sendmsg_gs_alloc_req
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 7 Jan 2020 03:10:04 +0000 (22:10 -0500)]
radeonsi: clean up messy si_emit_rasterizer_prim_state
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 7 Jan 2020 02:39:14 +0000 (21:39 -0500)]
radeonsi: determine accurately if line stippling is enabled for performance
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 7 Jan 2020 02:27:25 +0000 (21:27 -0500)]
radeonsi: test polygon mode enablement accurately
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 24 Dec 2019 18:46:38 +0000 (13:46 -0500)]
radeonsi: fix context roll tracking in si_emit_shader_vs
probably harmless, because we don't need to track context rolls on gfx10
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Fri, 27 Dec 2019 21:29:16 +0000 (16:29 -0500)]
radeonsi: fix monolithic pixel shaders with two-sided colors and SampleMaskIn
They are never used except for testing AMD_DEBUG=mono.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Tue, 31 Dec 2019 02:27:02 +0000 (21:27 -0500)]
ac/gpu_info: always use distributed tessellation on gfx10
This might fix a hang on Navi14.
Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Mon, 30 Dec 2019 04:00:53 +0000 (23:00 -0500)]
gallium: bypass u_vbuf if it's not needed (no fallbacks and no user VBOs)
This decreases CPU overhead, because u_vbuf is completely bypassed
in those cases.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Marek Olšák [Mon, 30 Dec 2019 03:07:37 +0000 (22:07 -0500)]
gallium/cso_context: move non-vbuf vertex buffer and element code into helpers
These will be reused.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Marek Olšák [Mon, 30 Dec 2019 03:02:28 +0000 (22:02 -0500)]
gallium: put u_vbuf_get_caps return values into u_vbuf_caps
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Jonathan Marek [Mon, 6 Jan 2020 02:53:36 +0000 (21:53 -0500)]
etnaviv: remove unnecessary vertex_elements_state_create error checking
PIPE_CAP_MAX_VERTEX_BUFFERS already sets the maximum vertex_buffer_index.
There's no need to error on num_elements == 0 (if that can even happen).
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Jonathan Marek [Mon, 6 Jan 2020 02:40:18 +0000 (21:40 -0500)]
etnaviv: implement gl_VertexID/gl_InstanceID
Fixes:
dEQP-GLES3.functional.instanced.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Jonathan Marek [Mon, 6 Jan 2020 02:38:15 +0000 (21:38 -0500)]
etnaviv: HALTI2+ instanced draw
Fixes:
dEQP-GLES3.functional.draw.draw_arrays_instanced.*
dEQP-GLES3.functional.draw.draw_elements_instanced.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Jonathan Marek [Mon, 6 Jan 2020 02:47:22 +0000 (21:47 -0500)]
etnaviv: update headers from rnndb
Update to etna_viv commit
46af5f1d.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Lionel Landwerlin [Mon, 6 Jan 2020 14:38:19 +0000 (16:38 +0200)]
anv: don't close invalid syncfd semaphore
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Krzysztof Raszkowski [Wed, 8 Jan 2020 15:42:03 +0000 (15:42 +0000)]
gallium/swr: Fix glVertexPointer race condition.
Sometimes using user buffer (not VBO) e.g. glVertexPointer
one thread could free memory before other thread used it.
Instead of copying this memory to driver simplier thing is
to block until draw finish.
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Jason Ekstrand [Tue, 7 Jan 2020 04:14:29 +0000 (22:14 -0600)]
intel/disasm: Fix decoding of src0 of SENDS
There is no instruction field for the register file for src0 because
it's always GRF.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3309>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3309>
Yevhenii Kolesnikov [Fri, 12 Jul 2019 11:53:59 +0000 (14:53 +0300)]
meta: Add cleanup function for Bitmap
Buffer object and temporary texture were never freed, causing memory leaks.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Juan A. Suarez Romero [Thu, 7 Nov 2019 08:33:09 +0000 (08:33 +0000)]
nir/spirv: skip unreachable blocks in Phi second pass
Only the blocks that are reachable are inserted with an end_nop
instruction at the end.
When handling the Phi second pass, if the Phi has a parent block that
does not have an end_nop then it means this block is unreachable, and
thus we can ignore it, as the Phi will never come through it.
Fixes dEQP-VK.graphicsfuzz.uninit-element-cast-in-loop.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Pierre-Eric Pelloux-Prayer [Tue, 7 Jan 2020 14:57:10 +0000 (15:57 +0100)]
radeonsi: check ctx->sdma_cs before using it
e5167a9276de1f383888714b41d3a9be2b9c1da9 disabled SDMA for gfx8.
This caused 3 piglit arb_sparse_buffer tests (basic, buffer-data
and commit) to crash on GFX8.
Reported-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: e5167a9276d ("radeonsi: disable SDMA on gfx8 to fix corruption on RX 580")
Samuel Pitoiset [Fri, 3 Jan 2020 10:12:36 +0000 (11:12 +0100)]
radv: do not fill keys from fragment shader twice
radv_fill_shader_info() already does that.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Yevhenii Kolesnikov [Thu, 2 Jan 2020 13:06:48 +0000 (15:06 +0200)]
main: allow external textures for BindImageTexture
From issue 10 of the OES_EGL_image_external_essl3:
A limited set of use-cases is enabled by making glBindImageTexture
accept external textures. Shaders can access such external textures
using the existing <image2D> sampler type.
Fixes: 02a6d901eee ("mesa: add OES_EGL_image_external_essl3 support")
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Jason Ekstrand [Tue, 7 Jan 2020 19:20:10 +0000 (13:20 -0600)]
intel/nir: Add a memory barrier before barrier()
Our barrier instruction does not implicitly do a memory fence but the
GLSL barrier() intrinsic is supposed to. The easiest back-portable
solution is to just add the NIR barriers. We'll sort this out more
properly in later commits.
Cc: mesa-stable@lists.freedesktop.org
Closes: #2138
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Bas Nieuwenhuizen [Sun, 5 Jan 2020 14:03:51 +0000 (15:03 +0100)]
radv: Emit a BATCH_BREAK when changing pixel shaders or CB_TARGET_MASK.
Fixes a hang on Raven with Resident Evil 2.
I did not find anything more restricted to fix it:
- Setting persistent_states_per_bin to 1 fixes it too,
but likely does an internal break on any descriptor set changes
too.
- Only breaking the batch when cb_target_mask changes does not fix
it (and looking at AMDVLK comments, I suspect the code in radeonsi
should really be doing a FLUSH_DFSM).
- Always doing a FLUSH_DFSM on shader switch helps, but that is more
often than this and I don't think we should be doing that when DFSM
is disabled.
- Also emitting the existing break on framebuffer change when DFSM is
disabled does not fix the issue.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2315
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tapani Pälli [Fri, 3 Jan 2020 05:56:23 +0000 (07:56 +0200)]
mesa/st/i965: add a ProgramResourceHash for quicker resource lookup
Many resource APIs require searching by name, add a hash table to make
this faster. Currently we traverse the whole resource list for name
based queries, this change makes all these cases use the hash.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2203
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254>
Michel Dänzer [Fri, 13 Dec 2019 10:02:16 +0000 (11:02 +0100)]
gitlab-ci: Test against LLVM / clang 9 on x86
They're not available for Debian buster yet, so we have to use upstream
snapshot packages again.
In contrast to earlier, we now store the LLVM APT repository key in Git
instead of re-downloading it every time.
Alyssa Rosenzweig [Tue, 7 Jan 2020 02:36:20 +0000 (21:36 -0500)]
panfrost: Don't double-flip Z/W for 2D arrays
We need to mindful that we don't clobber the shadow comparator.
Fixes dEQP-GLES3.functional.shaders.texture_functions.texture.sampler2darrayshadow_*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Tue, 7 Jan 2020 02:31:46 +0000 (21:31 -0500)]
pan/midgard: Account for z/w flip in texelFetch
Required for proper txf of 2D arrays.
Fixes dEQP-GLES3.functional.shaders.texture_functions.texelfetch.*2darray*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Tue, 7 Jan 2020 02:22:12 +0000 (21:22 -0500)]
panfrost: Adjust for mismatch between hardware/Gallium in arrays/cube
The hardware separates face selection and array indexing, it looks like,
whereas Gallium smushes them together with some modulus fun. Let's fix
it so mipmapped 2D arrays work without regressing cubemaps.
Fixes dEQP-GLES3.functional.texture.filtering.2d_array.* among others.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Tue, 7 Jan 2020 01:39:58 +0000 (20:39 -0500)]
panfrost: Respect constant buffer_offset
Fixes dEQP-GLES3.functional.ubo.multi_basic_types.single_buffer.* among
others
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Timothy Arceri [Fri, 3 Jan 2020 04:12:59 +0000 (15:12 +1100)]
glsl: use nir version of check_image_resources() for nir linker
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Timothy Arceri [Fri, 3 Jan 2020 04:09:20 +0000 (15:09 +1100)]
glsl: add check_image_resources() for the nir linker
This is adapted from the GLSL IR code but doesn't need to
iterate over the IR. I believe this also fixes a potential bug in
the GLSL IR code which potentially counts the same output twice.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Timothy Arceri [Mon, 23 Dec 2019 00:37:57 +0000 (11:37 +1100)]
glsl: use nir linker to link atomics
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Timothy Arceri [Thu, 2 Jan 2020 05:30:05 +0000 (16:30 +1100)]
mesa: add new UseNIRGLSLLinker constant
This will be used to disable some GLSL IR passes in following
patches.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Timothy Arceri [Mon, 23 Dec 2019 00:00:16 +0000 (11:00 +1100)]
glsl: reorder link_and_validate_uniforms() calls
This is required for the following commit.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Timothy Arceri [Mon, 23 Dec 2019 00:03:35 +0000 (11:03 +1100)]
glsl: add new gl_nir_link_glsl() helper
This will allow us to do some linking in NIR that was previously
done by the GLSL IR linker. To start with this just has calls for
linking atomics.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Timothy Arceri [Wed, 11 Dec 2019 05:12:54 +0000 (16:12 +1100)]
glsl: add gl_nir_link_check_atomic_counter_resources()
This is pretty much a copy of link_check_atomic_counter_resources()
updated to work with the NIR linker.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Timothy Arceri [Wed, 11 Dec 2019 04:48:32 +0000 (15:48 +1100)]
glsl: rename gl_nir_link() to gl_nir_link_spirv()
A NIR based glsl linking function will be too different to the
spirv version to bother attempting any sharing. So lets change
the name to be explicit.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Kristian H. Kristensen [Wed, 13 Nov 2019 22:49:53 +0000 (14:49 -0800)]
st/mesa: Lower vars to ssa and constant prop before gl_nir_lower_buffers
The gl_nir_lower_buffers pass relies on recognizing the same literal
constants as the GLSL compiler so that constant buffer array indices
are constant in nir as well. Without this, get_block_array_index()
would see
vec1 32 ssa_723 = deref_var &const_temp@1 (function_temp int)
vec1 32 ssa_724 = load_const (0x00000001 /* 0.000000 */)
...
vec1 32 ssa_5 = deref_var &const_temp@1 (function_temp int)
vec1 32 ssa_6 = intrinsic load_deref (ssa_5) (0) /* access=0 */
vec1 32 ssa_7 = deref_var &blockB (ssbo BlockB[1])
vec1 32 ssa_8 = deref_array &(*ssa_7)[ssa_6] (ssbo BlockB) /* &blockB[ssa_6] */
instead of a literal 1, and ultimately generate the block name
BlockB[0]. That used to work, since we before the previous commits
we'd compact the block binding points and names. Thus, there would
always be a BlockB[0].
Now, if an entry in a block array isn't used, we don't generate that
block name, which means that if entry 0 isn't used BlockB[0] isn't
present and then get_block_array_index() fails to find the block.
In most cases we would have dealt with this in the call to
st_nir_opts() in st_nir_link_shaders(), but in the num_shaders == 1
case (for example, compute) we would call gl_nir_lower_buffers()
before we lowered GLSL constants. Move that corner case up next to
where we call st_nir_link_shaders() so we call st_nir_opts() at the
same point in the flow for all shaders.
Fixes: dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.18
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Andrii Simiklit [Wed, 17 Jul 2019 12:05:49 +0000 (15:05 +0300)]
glsl/nir: do not change an element index to have correct block name
When SSBO array is used with packed layout, both IR tree
and as a result, NIR tree will be incorrect.
In fact, the SSBO dereference indices won't
match the array size in some cases like the following:
"layout(packed, binding=1) buffer SSBO { vec4 a; } ssbo[3];
out vec4 color;
void main() {
color = ssbo[2].a;
}"
After linking the IR and then NIR will have an SSBO array
definition with size 1 but dereference still will have index 2
and linked_shader->Program->sh.ShaderStorageBlocks
will contain just SSBO with name "SSBO[2]"
So this line should be removed at least as a workaround for now
to avoid error like:
Failed to find the block by name "SSBO[0]"
Fixes: 810dde2a "glsl/nir: Add a pass to lower UBO and SSBO access"
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Andrii Simiklit [Tue, 5 Mar 2019 15:58:53 +0000 (17:58 +0200)]
glsl: fix a binding points assignment for ssbo/ubo arrays
This is needed to be in agreement with spec requirements:
https://github.com/KhronosGroup/OpenGL-API/issues/46
Piers Daniell:
"We discussed this in the OpenGL/ES working group meeting
and agreed that eliminating unused elements from the interface
block array is not desirable. There is no statement in the spec
that this takes place and it would be highly implementation
dependent if it happens. If the application has an "interface"
in the shader they need to match up with the API it would be
quite confusing to have the binding point get compacted.
So the answer is no, the binding points aren't affected by
unused elements in the interface block array."
v2: - 'original_dim_size' field moved above to keep
the struct packed better on 64-bit
- added a comment for 'total_num_array_elements' field
- fixed a binding point calculations for SSBOs array of arrays
( Ian Romanick <ian.d.romanick@intel.com> )
- fixed binding point calculations for non-packed SSBOs
v3:
- rename 'total_num_array_elements' to 'aoa_size'
( Jason Ekstrand <jason@jlekstrand.net> )
- rename 'boffset' to 'binding_stride'
( Alejandro Piñeiro <apinheiro@igalia.com> )
Fixes: 8cf1333b "glsl: link uniform block arrays of arrays"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109532
Reported-By: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Fritz Koenig <frkoenig@google.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Andrii Simiklit [Tue, 5 Mar 2019 15:38:20 +0000 (17:38 +0200)]
glsl: fix an incorrect max_array_access after optimization of ssbo/ubo
This is needed to fix these tests:
piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_frag
piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_comp
Fixes: 8cf1333b "glsl: link uniform block arrays of arrays"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109532
Reported-By: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Fritz Koenig <frkoenig@google.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Marek Olšák [Sat, 4 Jan 2020 04:15:27 +0000 (23:15 -0500)]
radeonsi: remove TGSI
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Marek Olšák [Thu, 2 Jan 2020 22:29:01 +0000 (17:29 -0500)]
radeonsi: disable SDMA on gfx8 to fix corruption on RX 580
Closes: #1399
Closes: #1889
Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Marek Olšák [Thu, 2 Jan 2020 22:02:12 +0000 (17:02 -0500)]
radeonsi: move SI and CIK+ SDMA code into 1 common function for cleanups
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Marek Olšák [Thu, 2 Jan 2020 21:51:58 +0000 (16:51 -0500)]
radeonsi: rename dma_cs -> sdma_cs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Marek Olšák [Thu, 2 Jan 2020 20:43:53 +0000 (15:43 -0500)]
radeonsi: add AMD_DEBUG=nodmacopyimage for debugging
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Marek Olšák [Thu, 2 Jan 2020 20:34:00 +0000 (15:34 -0500)]
radeonsi: add AMD_DEBUG=nodmaclear for debugging
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Marek Olšák [Thu, 2 Jan 2020 20:40:30 +0000 (15:40 -0500)]
radeonsi: remove broken and unused SI SDMA image copy code
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Marek Olšák [Thu, 2 Jan 2020 20:30:36 +0000 (15:30 -0500)]
radeonsi: rename SDMA debug flags
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Tomeu Vizoso [Fri, 13 Dec 2019 09:20:23 +0000 (10:20 +0100)]
gitlab-ci: Switch LAVA jobs to use shared dEQP runner
Take one step towards sharing code between the LAVA and non-LAVA jobs,
with the goals of reducing maintenance burden and use of computational
resources.
The env var DEQP_NO_SAVE_RESULTS allows us to skip the procesing of the
XML result files, which can take a long time and is not useful in the
LAVA case as we are not uploading artifacts anywhere at the moment.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tomeu Vizoso [Fri, 13 Dec 2019 09:21:48 +0000 (10:21 +0100)]
gitlab-ci: Update kernel for LAVA to 5.5-rc1 plus fixes
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Alyssa Rosenzweig [Sat, 4 Jan 2020 18:27:20 +0000 (13:27 -0500)]
panfrost: Handle PIPE_FORMAT_R10G10B10A2_USCALED
Same format code as UINT... might be different in how it's fed into a
shader but we'll deal with that when we get there.
Fixes dEQP-GLES3.functional.vertex_arrays.single_attribute.output_types.usigned_int2_10_10_10.components4_vec2_quads1
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Sat, 4 Jan 2020 18:23:18 +0000 (13:23 -0500)]
panfrost: Report MSAA 4x supported for dEQP
Fixes dEQP-GLES3.functional.state_query.integers.max_samples_getinteger64
We'll have to actually implement multisampling next, but hey.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Sat, 4 Jan 2020 18:00:50 +0000 (13:00 -0500)]
panfrost: Cleanup tiling selection logic
Make it a lot more obvious what we're doing and fix more than a few
corner cases in the process.
Fixes
dEQP-GLES3.functional.buffer.map.write.render_as_index_array.pixel*, and
likely others.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Sat, 4 Jan 2020 17:14:57 +0000 (12:14 -0500)]
panfrost: Implement sRGB blend shaders
We use the lowering in nir_format_convert. There are native ops for this
so this is far from optimal and not remotely efficient but as with most
blend shader things right now, it's hard enough to get it working, so
let's focus on that for now. We'll make it fast later (once we have
GLES3 stable, we can start optimizing these things).
Fixes dEQP-GLES3.functional.fragment_ops.blend.fbo_srgb.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Fri, 3 Jan 2020 19:15:28 +0000 (14:15 -0500)]
panfrost: Support rendering to non-zero Z/S layers
Fixes abort in STK's shadow implementation.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Alyssa Rosenzweig [Fri, 3 Jan 2020 16:26:43 +0000 (11:26 -0500)]
panfrost: Texture from Z32F_S8 as R32F
Z32F_S8 becomes Z32F in texturing, which in turn just becomes R32F.
Fixes dEQP-GLES3.functional.texture.format.sized.*.depth32f_stencil8*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Danylo Piliaiev [Thu, 12 Sep 2019 13:47:40 +0000 (16:47 +0300)]
iris/query: Implement PIPE_QUERY_GPU_FINISHED
Implementation is similar to radeonsi in
5f1cef76
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Erik Faye-Lund [Fri, 3 Jan 2020 23:13:07 +0000 (00:13 +0100)]
st/mesa: use uint-samplers for sampling stencil buffers
Otherwise, we end up mismatching the sampler types when rendering.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Samuel Pitoiset [Fri, 3 Jan 2020 07:07:58 +0000 (08:07 +0100)]
ac/surface: use uint16_t for mipmap level pitches
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Jonathan Marek [Mon, 9 Dec 2019 15:31:47 +0000 (10:31 -0500)]
etnaviv: fix incorrectly failing vertex size assert
Changes the assert to match the comment above.
This assert was failing in some cases while running darkplaces.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Vasily Khoruzhick [Thu, 17 Oct 2019 02:20:25 +0000 (19:20 -0700)]
lima: fix PP stream terminator size
PP stream terminator size seems to be 4 words, it worked with full PP
stream because we align stream beginning to 32 bytes and BO is
initialized with zeroes. But with partial PP stream it sometimes break
if for new PP stream we reuse BO that has non-zero value at this place.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Vasily Khoruzhick [Thu, 10 Oct 2019 02:23:54 +0000 (19:23 -0700)]
lima: don't reload and redraw tiles that were not updated
We don't need to reload and redraw some tiles if framebuffer was not
cleared and scissor test was enabled for some of draws. This simple
optimization fixes cursor lag in X11
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Vasily Khoruzhick [Thu, 10 Oct 2019 02:20:02 +0000 (19:20 -0700)]
lima: postpone PP stream generation
This commit postpones PP stream generation till job is submitted.
Doing that this late allows us to skip reloading and redrawing tiles
that were not updated.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Andreas Baierl [Fri, 3 Jan 2020 20:56:56 +0000 (21:56 +0100)]
lima/parser: Fix VS cmd stream parser
prefetch is int, not bool.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Andreas Baierl [Fri, 3 Jan 2020 21:26:35 +0000 (22:26 +0100)]
lima/parser: Fix rsw parser
Drop assert as it is not necessary and used wrong anyway.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Kenneth Graunke [Tue, 17 Dec 2019 05:15:15 +0000 (21:15 -0800)]
anv: Only enable EWA LOD algorithm when doing anisotropic filtering.
Updated documentation renames "Anisotropic Algorithm" to "LOD Algorithm"
and adds a note for Gen9+ saying "The EWA Algorithm should only be
enabled for Anisotropic Filtering modes." and indicating that the extra
accuracy shouldn't be necessary for other modes, and comes at a cost.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Thu, 26 Dec 2019 07:43:01 +0000 (23:43 -0800)]
iris: Allow HiZ for copy_region sources
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 5 Dec 2019 16:39:18 +0000 (10:39 -0600)]
i965: Allow HiZ for glCopyImageSubData sources
v2 (Ken): Handle platforms without sampler support for HiZ
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v2 changes]
Jason Ekstrand [Wed, 4 Dec 2019 21:51:34 +0000 (15:51 -0600)]
anv: Allow HiZ in TRANSFER_SRC_OPTIMAL on Gen8-9
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 4 Dec 2019 21:49:15 +0000 (15:49 -0600)]
intel/blorp: Use the source format when using blorp_copy with HiZ
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 4 Dec 2019 02:31:24 +0000 (20:31 -0600)]
i965/blorp: Don't resolve HiZ unless we're reinterpreting
This eliminates 50% of pixels (2M) rendered for a blit in GS:GO. This
accounts for 3% of pixels rendered in the game. Total GPU clocks for
the first 900 frames of CSGO improves by 1%.
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 4 Dec 2019 02:29:15 +0000 (20:29 -0600)]
blorp: Allow reading with HiZ
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 4 Dec 2019 02:25:19 +0000 (20:25 -0600)]
blorp: Stop whacking Z24 depth to BGRA8
The shader code required to do this is int(sat(x) * UINT24_MAX) which
isn't really worth all the effort to avoid. Doing the format
conversion, on the other hand, prevents us from sampling with HiZ which
is something that we very much want on gen8-9 where we can.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Christian Gmeiner [Fri, 3 Jan 2020 08:15:35 +0000 (09:15 +0100)]
etnaviv: move descriptor based texture structs
This moves the descriptor based texture structs and their helpers
into the only user.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>