Timothy Arceri
92fa89a08d
ac/radeonsi: pass bindless bool to load_sampler_desc()
...
We also fix the base_index for bindless by using the driver
location.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-03-28 12:56:16 +11:00
Dave Airlie
4f0c89d66c
ac/nir: pass the nir variable through tcs loading.
...
I was going to have to add another parameter to this monster,
so we should just pass the nir_variable in, I can't find any
reason this would be a bad idea.
This needed for the next fix.
Fixes: 94f9591995
(radv/ac: add support for TCS/TES inputs/outputs.)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2018-03-14 11:18:54 +10:00
Timothy Arceri
0c90264da4
ac/radeonsi: add emit_kill to the abi
...
This should fix a regression with Rocket League grass rendering
on the NIR backend.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104717
2018-03-08 11:28:37 +11:00
Timothy Arceri
8de6f79707
ac/radeonsi: add load_base_vertex() to the abi
...
Fixes the following piglit tests:
./bin/arb_shader_draw_parameters-basevertex basevertex -auto -fbo
./bin/arb_shader_draw_parameters-basevertex basevertex-baseinstance -auto -fbo
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-02-28 09:23:49 +11:00
Timothy Arceri
6d338d757f
ac/radeonsi: pass type to load_tess_varyings()
...
We need this to be able to load 64bit varyings.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-02-22 09:31:00 +11:00
Samuel Pitoiset
e9f0205ca2
ac: move the outputs array to the ABI
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
2018-02-14 11:53:10 +01:00
Samuel Pitoiset
e32f374944
ac: remove unused parameters in abi::load_tess_coord()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
2018-02-12 11:54:17 +01:00
Samuel Pitoiset
ed179fbdf3
ac: add load_resource() to the ABI
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
2018-02-12 11:54:13 +01:00
Samuel Pitoiset
ecf229706f
ac: add load_sample_mask_in() to the ABI
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
2018-02-12 11:54:11 +01:00
Samuel Pitoiset
0f48eeea05
ac: move view_index to the ABI
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
2018-02-12 11:54:09 +01:00
Samuel Pitoiset
0efbede949
ac: move push_constants to the ABI
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
2018-02-12 11:54:07 +01:00
Samuel Pitoiset
460d3ce726
ac: move tg_size to the ABI
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
2018-02-12 11:54:04 +01:00
Timothy Arceri
9c52902c76
ac/radeonsi: add num_work_groups to the abi
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-02-07 08:43:08 +11:00
Timothy Arceri
d116af383f
ac/radeonsi: add load_local_group_size() to the abi
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-02-07 08:43:08 +11:00
Timothy Arceri
c8066cdfa7
ac/radeonsi: add local_invocation_ids to the abi
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-02-07 08:43:08 +11:00
Timothy Arceri
fa5239c153
ac/radeonsi: add workgroup_ids to the abi
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-02-07 08:43:08 +11:00
Timothy Arceri
d185190222
ac/radeonsi: add lookup_interp_param and load_sample_position to the abi
...
This will enable the interpolateAt builtins to work on the radeonsi
nir backend.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-31 09:14:07 +11:00
Timothy Arceri
97058168a4
radeonsi/nir: add prim_mask to the abi
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-31 09:14:07 +11:00
Timothy Arceri
3a47b138e3
radeonsi/nir: add si_nir_lookup_interp_param() helper
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-31 09:14:07 +11:00
Timothy Arceri
3bc5fa69f5
ac/radeonsi: add emit primitive to the abi
...
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
2018-01-23 09:18:37 +11:00
Timothy Arceri
9622b445c8
ac/radeonsi: add tcs load outputs support
...
The code to load outputs is essentially the same as load inputs
so we make the interface more generic to maximise code sharing.
We will make use of the new support in the following patch.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
2018-01-18 00:03:33 +11:00
Timothy Arceri
c797cd605a
ac: add load_patch_vertices_in() to the abi
...
Fixes the follow test for radeonsi nir:
tests/spec/arb_tessellation_shader/execution/quads.shader_test
Also stops 8 other tests from crashing, they now just fail e.g.
tcs-output-array-float-index-rd-after-barrier.shader_test
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
2018-01-11 14:28:37 +11:00
Timothy Arceri
19f3141e6a
ac: add load_tess_level() to the abi
...
Fixes the following piglit tests in radeonsi:
vs-tcs-tes-tessinner-tessouter-inputs-quads.shader_test
vs-tcs-tes-tessinner-tessouter-inputs-tris.shader_test
vs-tes-tessinner-tessouter-inputs-quads.shader_test
vs-tes-tessinner-tessouter-inputs-tris.shader_test
v2: make use of si_shader_io_get_unique_index_patch()
via the helper in the previous patch rather than
shader_io_get_unique_index()
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com > (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-09 10:21:32 +11:00
Timothy Arceri
14adf7853a
ac/radeonsi: add load_tess_coord() to the abi
...
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-05 11:58:55 +11:00
Timothy Arceri
9e1a3caf32
ac/radeonsi: add tcs_rel_ids to the abi
...
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-05 11:58:55 +11:00
Timothy Arceri
f93740efc1
ac: add {tcs,tes}_patch_id to the abi
...
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-05 11:58:55 +11:00
Timothy Arceri
2deb822075
ac: add store_tcs_outputs() to the abi
...
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-05 11:58:55 +11:00
Timothy Arceri
b09a3196e0
ac: add load_tes_inputs() to the abi
...
V2: drop type param and just use ctx->i32
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-01-05 11:58:55 +11:00
Timothy Arceri
ccd1810bba
ac: add si_nir_load_input_gs() to the abi
...
V2: make use of driver_location and don't expose NIR to the ABI.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-12-04 12:52:19 +11:00
Timothy Arceri
b73ce64fb8
ac: add gs_{prim,invocation}_id to the abi
...
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com >
2017-11-16 10:54:03 +11:00
Timothy Arceri
8fe6abd964
ac: add emit_vertex to the abi
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-11-12 11:08:26 +11:00
Bas Nieuwenhuizen
a548b727a1
ac/nir: Only clamp shadow reference on radeonsi.
...
Vulkan CTS does not expect the value to be clamped (at least for D32),
and it makes a differences even though depth is in [0,1], due
to strict inequalities.
I couldn't find anything in the Vulkan spec about this, but the test
seemed to be copied from GL tests and the GL spec only specifies
clamping for fixed point formats. Hence I expect radeonsi to run into
this at some point as well, but given that they still have a usecase
with the Z16->Z32 promotion, I'll leave that for someone else to clean
up.
This at least fixes radv dEQP-VK.texture.shadow.* on VI.
Fixes: 0f9e32519b
'ac/nir: clamp shadow texture comparison value on VI'
Reviewed-by: Dave Airlie <airlied@redhat.com >
2017-10-23 09:13:38 +02:00
Nicolai Hähnle
9ddc6e16a9
amd/common: remove ac_shader_abi::chip_class
...
Redundant with the recently added ac_llvm_context::chip_class.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-09-29 11:37:03 +02:00
Nicolai Hähnle
1c64637c26
ac/nir,radeonsi: add and use ac_shader_abi::frag_pos
...
v2: update for LLVMValueRefs in ac_shader_abi
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:43 +02:00
Nicolai Hähnle
f03c54e05a
ac/nir,radeonsi: add and use ac_shader_abi::{ancillary,sample_coverage}
...
v2: update for LLVMValueRefs in ac_shader_abi
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:43 +02:00
Nicolai Hähnle
e247357240
ac/nir,radeonsi: add ac_shader_abi::front_face
...
v2: update for LLVMValueRefs in ac_shader_abi
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:42 +02:00
Nicolai Hähnle
b78eae6f2a
ac/nir: load buffer descriptors via ac_shader_abi::load_ssbo
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:40 +02:00
Nicolai Hähnle
f37f9aed84
ac/nir: add image and write parameter to ac_shader_abi::load_sampler_desc
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:38 +02:00
Nicolai Hähnle
6ff5317589
ac/nir: add and use ac_shader_abi::load_sampler_desc
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:37 +02:00
Nicolai Hähnle
7763c7b2ba
ac/nir,radeonsi: add ac_shader_abi::chip_class
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:37 +02:00
Nicolai Hähnle
d007919d99
ac/nir,radeonsi: add ac_shader_abi::load_ubo
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:36 +02:00
Nicolai Hähnle
0c3b6a4bd9
ac,radeonsi: add ac_shader_abi::emit_outputs for hardware VS shaders
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:34 +02:00
Nicolai Hähnle
73c7e92d3a
ac/nir: add ac_shader_abi::inputs
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:32 +02:00
Nicolai Hähnle
61ad2f13c3
ac,radeonsi: move some VS input descriptions to ac_shader_abi
...
v2: use LLVM values instead of function parameter indices
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2017-07-31 14:55:31 +02:00