Alyssa Rosenzweig
5546d1958b
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 >
2020-04-17 16:25:36 -04:00
Alyssa Rosenzweig
68b4e708f1
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 >
2020-04-17 16:25:36 -04:00
Alyssa Rosenzweig
36cfe722e5
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 >
2020-04-17 16:25:36 -04:00
Alyssa Rosenzweig
c05860789a
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 >
2020-04-17 16:25:36 -04:00
Alyssa Rosenzweig
4d0f941036
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 >
2020-04-17 16:25:36 -04:00
Alyssa Rosenzweig
d30df466b5
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
590d66fa0c
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
f87403c4c1
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
7e76c2b806
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
1647884cec
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
d772bf0101
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
aba7f09902
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
438e445e17
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
031ad0ecc2
pan/bi: Implement flog2
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
8e52206dbe
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
b1d4d8f743
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
60f252708f
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
10fb5fb460
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
86c2a6b9fe
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
df69304ac8
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
8f70f4432c
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
db5c1ae8fd
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
c3eebfeb11
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
0cb703984e
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
4570c34fc7
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
d3643cdd81
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
6039d51e32
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
ffa9f6a789
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
9904ed170a
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 >
2020-04-17 16:25:35 -04:00
Alyssa Rosenzweig
e067fd7b00
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 >
2020-04-17 16:25:34 -04:00
Alyssa Rosenzweig
40befaa965
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 >
2020-04-17 16:25:34 -04:00
Alyssa Rosenzweig
62c8c3445e
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 >
2020-04-17 16:25:34 -04:00
Alyssa Rosenzweig
cc61156626
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 >
2020-04-17 16:25:34 -04:00
Alyssa Rosenzweig
af01378dce
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 >
2020-04-17 16:25:34 -04:00
Alyssa Rosenzweig
83d961b0c2
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 >
2020-04-17 16:25:34 -04:00
Alyssa Rosenzweig
86c0ea383d
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 >
2020-04-17 16:25:34 -04:00
Jason Ekstrand
f5deed138a
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 >
2020-04-17 19:21:44 +00:00
Jason Ekstrand
feca439697
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 >
2020-04-17 19:21:44 +00:00
Jason Ekstrand
acaccff4d3
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 >
2020-04-17 19:21:44 +00:00
Jason Ekstrand
4b160c6776
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 >
2020-04-17 19:21:44 +00:00
Jason Ekstrand
c478f8ad6c
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 >
2020-04-17 19:21:44 +00:00
Jason Ekstrand
380bf556bf
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 >
2020-04-17 19:21:44 +00:00
D Scott Phillips
dc3a17997b
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 >
2020-04-17 18:41:40 +00:00
Danylo Piliaiev
d684fb37bf
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: 8a0dd0af3f
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 >
2020-04-17 20:16:15 +03:00
Samuel Pitoiset
c4ca9e66dd
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 >
2020-04-17 16:23:24 +00:00
Samuel Pitoiset
b424d49ac0
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 >
2020-04-17 16:23:24 +00:00
Samuel Pitoiset
19aa68ae31
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: c24d9522da
("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 >
2020-04-17 16:11:17 +00:00
Samuel Pitoiset
fd6e44236c
radv: fix geometry shader primitives query with ACO on GFX10
...
Fixes
dEQP-VK.query_pool.statistics_query.*.geometry_shader_primitives.*.
Fixes: c24d9522da
("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 >
2020-04-17 17:39:16 +02:00
Ian Romanick
f7d620f47d
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 >
2020-04-17 08:21:47 -07:00
Ian Romanick
39ad0c2af8
intel/compiler: CSEL can do saturate
...
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4582 >
2020-04-17 08:21:46 -07:00