Alyssa Rosenzweig [Fri, 17 Apr 2020 19:40:12 +0000 (15:40 -0400)]
pan/bit: Add fp16 min/max tests
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Wed, 15 Apr 2020 15:40:59 +0000 (11:40 -0400)]
pan/bit: Add constants test
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 21:00:31 +0000 (17:00 -0400)]
pan/bit: Add fexp2_fast test
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 20:59:41 +0000 (16:59 -0400)]
pan/bit: Add fexp2_fast interp
Kind of a hack and not at all how the h/w does it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 20:45:22 +0000 (16:45 -0400)]
pan/bit: Add FMA_MSCALE test
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 20:21:14 +0000 (16:21 -0400)]
pan/bit: _MSCALE interp
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 19:25:27 +0000 (15:25 -0400)]
pan/bit: Add BI_TABLE test
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 19:25:17 +0000 (15:25 -0400)]
pan/bit: Add log2 helper interp
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 17:19:13 +0000 (13:19 -0400)]
pan/bit: Add FMA_REDUCE test
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 17:14:51 +0000 (13:14 -0400)]
pan/bit: Add BI_REDUCE_FMA interp
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:55:02 +0000 (12:55 -0400)]
pan/bit: Add frexp_log test
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:50:48 +0000 (12:50 -0400)]
pan/bit: Add FREXP interp support
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Fri, 17 Apr 2020 19:52:18 +0000 (15:52 -0400)]
pan/bi: Lower special ops to 32-bit
We don't have 16-bit tables. We could probably do a bit better to avoid
so many conversions but hey.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Fri, 17 Apr 2020 19:52:03 +0000 (15:52 -0400)]
pan/bi: Round constants to 32-bit
We can only access lo/hi at 32-bit intervals.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Fri, 17 Apr 2020 19:40:00 +0000 (15:40 -0400)]
pan/bi: Dump extra bits for disasm
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Fri, 17 Apr 2020 19:37:21 +0000 (15:37 -0400)]
pan/bi: Pack MAX.v2f16
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Fri, 17 Apr 2020 19:21:08 +0000 (15:21 -0400)]
pan/bi: Pack ADD.v2f16
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Fri, 17 Apr 2020 19:20:50 +0000 (15:20 -0400)]
pan/bi: Structify add and min/max fp16 ADD
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Wed, 15 Apr 2020 15:45:49 +0000 (11:45 -0400)]
pan/bi: Workaround constant packing errata
Incomplete fix.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Wed, 15 Apr 2020 14:39:42 +0000 (10:39 -0400)]
pan/bi: Try to reuse constants in ALU
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Wed, 15 Apr 2020 00:20:37 +0000 (20:20 -0400)]
pan/bi: Handle st_vary with <4 components
Still no writemasks.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Wed, 15 Apr 2020 00:20:16 +0000 (20:20 -0400)]
pan/bi: Fix vec2/3 handling
Otherwise we get moves from null.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 23:50:24 +0000 (19:50 -0400)]
pan/bi: Implement flog2
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 22:52:21 +0000 (18:52 -0400)]
pan/bi: Add fexp2 implementation
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 22:51:55 +0000 (18:51 -0400)]
pan/bi: Fix lower_combine swizzle rewrite
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 22:36:28 +0000 (18:36 -0400)]
pan/bi: Fix packing with low-nibble-set on hi constant
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 22:32:31 +0000 (18:32 -0400)]
pan/bi: Fix packing with multiple constants
Need to use bottom nibble of the 64, not the half.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 22:29:36 +0000 (18:29 -0400)]
pan/bi: Fix bi_get_immediate with multiple imms
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Wed, 15 Apr 2020 00:09:00 +0000 (20:09 -0400)]
pan/bi: Ensure CONSTANT srcs have types
So the next commit is valid.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 22:29:08 +0000 (18:29 -0400)]
pan/bi: Split src/dest index printing
So we can handle constant printing correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 20:59:19 +0000 (16:59 -0400)]
pan/bi: Add fexp2_fast packing
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 20:44:44 +0000 (16:44 -0400)]
pan/bi: Pack FMA_MSCALE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 20:31:34 +0000 (16:31 -0400)]
pan/bi: Structify FMA_MSCALE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 20:13:53 +0000 (16:13 -0400)]
pan/bi: Add _MSCALE flag for FMA/ADD
So we can bias by exponents.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 19:25:04 +0000 (15:25 -0400)]
pan/bi: Add log2_help packing
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 17:14:29 +0000 (13:14 -0400)]
pan/bi: Pack ADD_FREXPM
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 17:14:05 +0000 (13:14 -0400)]
pan/bi: Add bi_pack_fma_2src helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:54:17 +0000 (12:54 -0400)]
pan/bi: Add frexp_log packing
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:37:29 +0000 (12:37 -0400)]
pan/bi: Add log_frexpe op to IR
As part of BI_FREXP
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:34:42 +0000 (12:34 -0400)]
pan/bi: Add FLOG2_U op to disassembler
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:33:08 +0000 (12:33 -0400)]
pan/bi: Add op for ADD_FREXPM
Used in log2. Needs a new class as well due to scheduling silliness.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:22:28 +0000 (12:22 -0400)]
pan/bi: Add special op for exp2
Needs some extra help but basically exp2_fast
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 16:21:25 +0000 (12:21 -0400)]
pan/bi: Add BI_TABLE for fast table accesses
Used to implement SPECIAL ops. Separate class since they are faster
which means you can pair them with actual work on FMA.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Tue, 14 Apr 2020 00:03:48 +0000 (20:03 -0400)]
pan/bi: Disable FMA scheduling for CONVERT
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Alyssa Rosenzweig [Mon, 13 Apr 2020 22:28:29 +0000 (18:28 -0400)]
pan/bi: Add disasm for ADD.i8
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Jason Ekstrand [Thu, 9 Apr 2020 22:09:10 +0000 (17:09 -0500)]
spirv,nir: Move the SPIR-V vector insert code to NIR
This also makes spirv_to_nir a bit simpler because the new
nir_vector_insert helper automatically handles a constant component
selector like nir_vector_extract does.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
Jason Ekstrand [Thu, 9 Apr 2020 22:03:37 +0000 (17:03 -0500)]
spirv: Call nir_builder directly for vector_extract
The nir_builder helper already handles checking if the component
selector is an immediate and returns an undef in the OOB case.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
Jason Ekstrand [Fri, 17 Apr 2020 14:52:25 +0000 (09:52 -0500)]
nir/builder: Handle any bit-size selector in nir_extract
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
Jason Ekstrand [Thu, 9 Apr 2020 21:58:58 +0000 (16:58 -0500)]
spirv: Error if OpCompositeInsert/Extract has OOB indices
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
Jason Ekstrand [Wed, 8 Apr 2020 16:14:40 +0000 (11:14 -0500)]
spirv,nir: Add a better vector_insert
The old one in spirv_to_nir was besel'ing the whole vector for every
component. If we think about this as a vector operation, we can do it
way more efficiently.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
Jason Ekstrand [Thu, 9 Apr 2020 21:44:33 +0000 (16:44 -0500)]
spirv: Handle OOB vector extract operations
We use vtn_vector_extract to handle vector component level derefs. This
makes us gracefully handle the case where your vector component is OOB
and give you an undef. The SPIR-V working group is still working out
whether or not this is technically legal but it's very little code for
us to handle it so we may as well.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
D Scott Phillips [Fri, 17 Apr 2020 17:28:06 +0000 (10:28 -0700)]
util/sparse_array: don't stomp head's counter on pop operations
By temporarily storing the new_head by a uint32_t, we wipe out the
counter section of the head pointer.
Fixes: e4f01eca ("util: Add a free list structure for use with util_sparse_array")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4612>
Danylo Piliaiev [Thu, 16 Apr 2020 13:34:25 +0000 (16:34 +0300)]
st/mesa: Update shader info of ffvp/ARB_vp after translation to NIR
We must update stp->Base.info after translation and before
st_prepare_vertex_program is called, because inputs_read
may become outdated after NIR optimization passes.
For ffvp/ARB_vp inputs_read is populated based on declared
attributes without taking their usage into consideration.
When creating shader variants we expect that their inputs_read
would match the base ones for input mapping to work properly.
Cc: <mesa-stable@lists.freedesktop.org>
Fixes: 8a0dd0af3f1a6c0310a08daf4220132ec6815b31
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2758
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4598>
Samuel Pitoiset [Wed, 15 Apr 2020 06:49:32 +0000 (08:49 +0200)]
aco: fix exporting the viewport index if the fragment shader needs it
It's like the layer, it has to be exported via the pos and also
as a varying if the fragment shader reads it.
Fixes dEQP-VK.draw.shader_viewport_index.fragment_shader_*
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4564>
Samuel Pitoiset [Wed, 15 Apr 2020 06:37:40 +0000 (08:37 +0200)]
radv/llvm: fix exporting the viewport index if the fragment shader needs it
It's like the layer, it has to be exported via the pos and also
as a varying if the fragment shader reads it.
Fixes dEQP-VK.draw.shader_viewport_index.fragment_shader_*
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4564>
Samuel Pitoiset [Thu, 16 Apr 2020 14:58:13 +0000 (16:58 +0200)]
radv: set missing SHARED_VGPR_CNT for NGG VS and ACO
shuffle is implemented with shared VGPRs with ACO and Wave64.
Fixes dEQP-VK.subgroups.shuffle.framebuffer.subgroupshuffle*_vertex
with Wave64.
Fixes: c24d9522dae ("radv: Enable ACO for NGG VS/TES, but disable NGG for ACO GS.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4595>
Samuel Pitoiset [Thu, 16 Apr 2020 14:15:45 +0000 (16:15 +0200)]
radv: fix geometry shader primitives query with ACO on GFX10
Fixes
dEQP-VK.query_pool.statistics_query.*.geometry_shader_primitives.*.
Fixes: c24d9522dae ("radv: Enable ACO for NGG VS/TES, but disable NGG for ACO GS.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4593>
Ian Romanick [Tue, 14 Apr 2020 17:30:53 +0000 (10:30 -0700)]
intel/compiler: Fixup operands in fs_builder::emit() that takes array
The versions that take a specific number of operands will do various
fixups depending on the platform and the opcode. However, the version
that takes an array of sources did not. This makes all version operate
similarly.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>
Ian Romanick [Tue, 29 Oct 2019 23:56:39 +0000 (16:56 -0700)]
intel/compiler: CSEL can do saturate
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>
Ian Romanick [Wed, 30 Oct 2019 00:02:46 +0000 (17:02 -0700)]
intel/compiler: Only GE and L modifiers are commutative for SEL
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>
Ian Romanick [Tue, 14 Apr 2020 00:23:25 +0000 (17:23 -0700)]
intel/compiler: Silence unused parameter warning in update_inst_scoreboard
src/intel/compiler/brw_fs_scoreboard.cpp: In function ‘void {anonymous}::update_inst_scoreboard(const fs_visitor*, const ordered_address*, const fs_inst*, unsigned int, {anonymous}::scoreboard&)’:
src/intel/compiler/brw_fs_scoreboard.cpp:793:45: warning: unused parameter ‘shader’ [-Wunused-parameter]
793 | update_inst_scoreboard(const fs_visitor *shader, const ordered_address *jps,
| ~~~~~~~~~~~~~~~~~~^~~~~~
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>
Ian Romanick [Mon, 13 Apr 2020 23:55:43 +0000 (16:55 -0700)]
intel/compiler: Silence unused parameter warning in fs_live_variables::setup_one_read
src/intel/compiler/brw_fs_live_variables.cpp: In member function ‘void brw::fs_live_variables::setup_one_read(brw::fs_live_variables::block_data*, fs_inst*, int, const fs_reg&)’:
src/intel/compiler/brw_fs_live_variables.cpp:56:67: warning: unused parameter ‘inst’ [-Wunused-parameter]
56 | fs_live_variables::setup_one_read(struct block_data *bd, fs_inst *inst,
| ~~~~~~~~~^~~~
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>
Ian Romanick [Mon, 13 Apr 2020 23:49:11 +0000 (16:49 -0700)]
intel/compiler: Silence unused parameter warnings in vec4_tcs_visitor
In file included from src/intel/compiler/brw_vec4_tcs.cpp:31:
src/intel/compiler/brw_vec4_tcs.h: In member function ‘virtual void brw::vec4_tcs_visitor::emit_urb_write_header(int)’:
src/intel/compiler/brw_vec4_tcs.h:74:43: warning: unused parameter ‘mrf’ [-Wunused-parameter]
74 | virtual void emit_urb_write_header(int mrf) {}
| ~~~~^~~
src/intel/compiler/brw_vec4_tcs.h: In member function ‘virtual brw::vec4_instruction* brw::vec4_tcs_visitor::emit_urb_write_opcode(bool)’:
src/intel/compiler/brw_vec4_tcs.h:75:57: warning: unused parameter ‘complete’ [-Wunused-parameter]
75 | virtual vec4_instruction *emit_urb_write_opcode(bool complete) { return NULL; }
| ~~~~~^~~~~~~~
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582>
Jason Ekstrand [Wed, 15 Apr 2020 18:12:02 +0000 (13:12 -0500)]
intel/blorp: Delete an unused enum
This was lying around from back when BLORP write to fs_visitor directly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4606>
Jason Ekstrand [Sat, 4 Apr 2020 01:20:53 +0000 (20:20 -0500)]
anv: Emit pushed UBO bounds checking code in the back-end compiler
This commit fixes performance regressions introduced by
e03f9652801ad7
in which we started bounds checking our push constants. This added a
LOT of shader code to shaders which use the robustBufferAccess feature
and led to substantial spilling. The checking we just added to the FS
back-end is far more efficient for two reasons:
1. It can be done at a whole register granularity rather than per-
scalar and so we emit one SIMD8 SEL per 32B GRF rather than one
SIMD16 SEL (executed as two SELs) for each component loaded.
2. Because we do it with NoMask instructions, we can do it on whole
pushed GRFs without splatting them out to SIMD8 or SIME16 values.
This means that robust buffer access no longer explodes our register
pressure for no good reason.
As a tiny side-benefit, we're now using can use AND instead of SEL which
means no need for the flag and better scheduling.
Vulkan pipeline database results on ICL:
Instructions in all programs:
293586059 ->
238009118 (-18.9%)
SENDs in all programs:
13568515 ->
13568515 (+0.0%)
Loops in all programs: 149720 -> 149720 (+0.0%)
Cycles in all programs:
88499234498 ->
84348917496 (-4.7%)
Spills in all programs:
1229018 -> 184339 (-85.0%)
Fills in all programs:
1348397 -> 246061 (-81.8%)
This also improves the performance of a few apps:
- Shadow of the Tomb Raider: +4%
- Witcher 3: +3.5%
- UE4 Shooter demo: +2%
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4447>
Jason Ekstrand [Sat, 4 Apr 2020 02:25:40 +0000 (21:25 -0500)]
intel/cfg: Add first/last_block helpers
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4447>
Connor Abbott [Fri, 17 Apr 2020 13:28:10 +0000 (15:28 +0200)]
tu: Use tu_cs_add_entries() with non-render-pass secondaries
Even though vkCmdRenderPassBegin() isn't allowed inside a secondary
command buffer, vkCmdDispatch() is, and we emit an IB with compute
dispatches, which means that if the secondary command buffer records a
vkCmdDispatch() then we'll have an IB inside an IB, which is illegal.
Fixes hangs in e.g.
dEQP-VK.api.command_buffers.record_simul_use_secondary_one_primary.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4605>
Ilia Mirkin [Thu, 16 Apr 2020 02:27:11 +0000 (22:27 -0400)]
mesa: add interaction between compute derivatives and variable local sizes
This is an added interaction in NV_compute_shader_derivatives added in
Sep 2019.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4583>
Karol Herbst [Thu, 16 Apr 2020 14:01:47 +0000 (16:01 +0200)]
st/mesa: properly guard fallback_copy_texsubimage aginst failed maps
Fixes random crashes in some packed_pixel GLES CTS tests
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4592>
Pierre-Eric Pelloux-Prayer [Thu, 16 Apr 2020 12:52:29 +0000 (14:52 +0200)]
radeonsi: don't assume ctx is always a threaded_context
Fixes: dcb1e8fef8a ("radeonsi: use thread_context::bytes_mapped_limit")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4587>
Daniel Stone [Thu, 16 Apr 2020 13:56:18 +0000 (14:56 +0100)]
Revert "CI: Disable Windows/VS2019 builds"
DNS is now fixed.
This reverts commit
460b8b1758d953b2b820443615d73ccdb1455b5e.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4591>
Ilia Mirkin [Thu, 16 Apr 2020 18:23:22 +0000 (14:23 -0400)]
docs: update for recently-added nvc0 features
Also sort while we're at it.
And add NV_pixel_buffer_object.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4599>
Ilia Mirkin [Sat, 11 Apr 2020 07:04:01 +0000 (03:04 -0400)]
nv50,nvc0: update with latest caps
One notable change is that DRAW_INFO_START_WITH_USER_INDICES is enabled.
An audit of the code indicates that it should work, and a number of
piglit tests exercising glMultiDrawElements continue to function.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4520>
Jason Ekstrand [Wed, 15 Apr 2020 21:38:56 +0000 (16:38 -0500)]
intel/batch_decoder: Stop printing to stdout
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4597>
Jason Ekstrand [Wed, 15 Apr 2020 21:06:03 +0000 (16:06 -0500)]
anv: Report correct SLM size
Fixes: d787a2d0 "anv: Implement VK_KHR_pipeline_executable_properties"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4597>
Jason Ekstrand [Wed, 15 Apr 2020 21:05:43 +0000 (16:05 -0500)]
intel: Add _const versions of prog_data cast helpers
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4597>
Jason Ekstrand [Wed, 8 Apr 2020 20:11:57 +0000 (15:11 -0500)]
nir: Add some sanity assertions in opt_large_constants
We make some assumptions in opt_large_constants such as the size_align
function returning the obvious sizes for vectors. Now that we've got
the deref_size lying around, we may as well assert it's consistent with
our assumptions. In particular, we now assert that it really claims
booleans are 32-bit. If anyone's driver ever decides to be clever and
change this, we'll now catch the breakage earlier.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4468>
Jason Ekstrand [Wed, 8 Apr 2020 20:08:03 +0000 (15:08 -0500)]
nir: Add an alignment to nir_intrinsic_load_constant
In
f1883cc73d4 we tried to pass through alignments from load_constant
intrinsics when rewriting them to load_ubo in iris. However, those
intrinsics don't have ALIGN_MUL or ALIGN_OFFSET indices. It's easy
enough to add them. We just call the size/align function on the vector
type at the end of our deref chain and use the alignment returned from
there. It's possible we could do better by walking the whole deref
chain but this should be good enough.
Fixes: f1883cc73d4 "iris: Set alignments on cbuf0 and constant reads"
Closes: #2739
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4468>
Jan Vesely [Sat, 4 Apr 2020 18:59:35 +0000 (14:59 -0400)]
clover: Check if the detected clang libraries are usable
clang-cpp.so is broken in LLVM-9 and doesn't exist in LLVM<9,
however meson will find and try to use system libraries in these cases.
v2: Use helper variable to dedpulicate test code
Move second test inside the condition to avoid testing good clang-cpp twice
v3: Check for cross compilation
v4: style fixes
Fixes: ff1a3a00cb37d84ab9a563f0aa241714876f56b4
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4457>
Rhys Perry [Tue, 14 Apr 2020 15:40:46 +0000 (16:40 +0100)]
aco: add missing scc clobber to nir_op_unpack_32_2x16_split_y
The ISA doc is inconsistent whether this instruction writes SCC. It does.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4552>
Rhys Perry [Tue, 14 Apr 2020 15:39:58 +0000 (16:39 +0100)]
aco: implement various 8/16-bit conversions
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/4552>
Rafael Antognolli [Mon, 13 Apr 2020 22:35:50 +0000 (22:35 +0000)]
iris: Enable EXT_depth_bounds_test extension.
It was implemented in
1df871f8ff753dd234def380ea0e20d7e81cad9e, but to
really enable it we need to enable PIPE_CAP_DEPTH_BOUNDS_TEST.
v2: Add release notes (Ian).
Suggested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4540>
Erik Faye-Lund [Wed, 15 Apr 2020 21:22:51 +0000 (23:22 +0200)]
meson: tell flex that we support c99
flexint.h uses stdint.h if the compiler claims to support C99. MSVC
doesn't support enough of C99 to enable this flag, but it supports
enough to keep flex happy.
Without this, we end up with *both* some flex-specific definitions as
well as our own definitions from mesa-headers, producing a slew of
compiler warnings.
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
Erik Faye-Lund [Wed, 15 Apr 2020 20:48:46 +0000 (22:48 +0200)]
vbo: avoid including wingdi.h on win32
On Windows, main/glheader.h ends up including windows.h which in turn
includes wingdi.h unless the NOGDI macro is defined. And wingdi.h
defines a macro called "ERROR", which we end up redefining below.
To avoid a warning on the redefinition, we can define NOGDI to prevent
wingdi.h from implicitly being included.
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
Erik Faye-Lund [Wed, 15 Apr 2020 20:26:59 +0000 (22:26 +0200)]
mesa: fixup cast expression
This cast-expression was meant to cast the result of the terniary
expression, but it just casted the condition expression instead. Let's
correct this, to silence a compiler-warning.
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
Erik Faye-Lund [Wed, 15 Apr 2020 20:22:27 +0000 (22:22 +0200)]
util/tests: initialize variable
This just silences a compiler-warning about a potentially uninitialized
variable. It's not uninitialized, but it's a bit hard for the compiler
to see. So let's just initialize it to zero.
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
Erik Faye-Lund [Wed, 15 Apr 2020 19:11:44 +0000 (21:11 +0200)]
wgl: silence some cast-warnings
These casts cause warnings on x64. We're passing integers through
pointers, which works fine.
So let's make the casts a bit more explicit, to silence that warning.
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
Erik Faye-Lund [Wed, 15 Apr 2020 19:04:30 +0000 (21:04 +0200)]
meson: use override_options to change warning-level
This pevents MSVC from complaining about multiple warning-levels on the
command-line.
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
Jonathan Marek [Wed, 8 Apr 2020 01:12:45 +0000 (21:12 -0400)]
turnip: image_view rework
Instead of exposing various layout functions, move image-related logic
into tu_image.c and have the image_view pre-fill relevant register values.
This changes the clear/blit code to use image_view.
This will make it much easier to deal with aspect masks, in particular for
planar formats and D32_S8.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4581>
Jonathan Marek [Wed, 15 Apr 2020 22:10:58 +0000 (18:10 -0400)]
turnip: don't limit framebuffer size to image size
Minor cleanup, I couldn't find anything that suggests this should be done,
and anv doesn't do it either.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4581>
Jonathan Marek [Wed, 15 Apr 2020 18:38:04 +0000 (14:38 -0400)]
turnip: compute render_components/srgb_cntl at renderpass creation time
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4581>
Bas Nieuwenhuizen [Mon, 13 Apr 2020 23:44:10 +0000 (01:44 +0200)]
winsys/amdgpu: Retrieve WC flags from imported buffers.
Otherwise reading from an imported mapped GTT+WC linear texture
is painfully slow.
Sadly no radeon winsys implementation, as I don't know a suitable
kernel driver operation.
Hit this in vaGetImage with an image imported from minigbm (which
we are switching to allocate WC for SCANOUT images).
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4542>
Marek Olšák [Sat, 11 Apr 2020 22:06:27 +0000 (18:06 -0400)]
st/mesa: fix a crash due to passing a draw vertex shader into the driver
Fixes: bc99b22a305be5e5a5f
Closes: #2754
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4527>
Daniel Stone [Thu, 16 Apr 2020 13:03:49 +0000 (14:03 +0100)]
CI: Disable Windows/VS2019 builds
An update seems to have poisoned gitlab-runner, and it can no longer
resolve DNS even though the host system can.
Disable this until we can figure out what's going on.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4589>
Daniel Stone [Tue, 14 Apr 2020 16:41:00 +0000 (17:41 +0100)]
meson: Make shared-llvm into a tri-state boolean
Choosing LLVM's link mode is legitimate on UNIX systems, but only static
actually really works under Windows.
Give shared-llvm a default 'auto' mode which will pick the previous
default of true (shared) on UNIX systems, but newly defaulting to false
(static) on Windows.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4555>
Connor Abbott [Thu, 16 Apr 2020 09:39:11 +0000 (11:39 +0200)]
tu: Align GMEM resolve blit scissor
Even though we normally use the CP_BLIT path with resolves that aren't
aligned, there's a special case when we're resolving the entire image
and there's enough padding so that we can still use CP_EVENT_WRITE::BLIT
when the render area isn't aligned. The hardware seems to not like
unaligned scissors when not clearing, and sometimes hangs rather than
silently round the scissor. This causes hangs in e.g.
dEQP-VK.glsl.derivate.dfdx.texture.msaa4.float_highp.
There was some concern that the CP_BLIT path might use this scissor
also, but I confirmed that this isn't the case by setting it to 0 before
resolving and then noting that CP_BLIT still works (but CP_EVENT_WRITE
doesn't). Furthermore, this is actually impossible because of how the 2D
engine is set up: it gets its own pair of register banks, which can be
switched independently of the 3D register banks, so that 2D events
(CP_BLIT) normally aren't synchronized relative to 3D events
(CP_EVENT_WRITE, CP_DRAW_*, and CP_EXEC_CS) and therefore they can't
share any registers except for non-pipelined registers like RB_CCU_CNTL
that don't use the register bank mechanism at all.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4585>
Erik Faye-Lund [Fri, 17 Aug 2018 09:47:43 +0000 (11:47 +0200)]
.mailmap: add an alias for Zhongmin Wu
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1999>
Erik Faye-Lund [Sun, 15 Sep 2019 14:19:24 +0000 (16:19 +0200)]
.mailmap: add alias for Zhaowei Yuan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1999>
Erik Faye-Lund [Mon, 16 Sep 2019 18:09:25 +0000 (20:09 +0200)]
.mailmap: add an alias for Yaakov Selkowitz
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1999>
Erik Faye-Lund [Fri, 17 Aug 2018 09:37:33 +0000 (11:37 +0200)]
.mailmap: add an alias for Xavier Bouchoux
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1999>