Eric Engestrom
70c6f656f9
util/ra: fix memory leak
...
CID: 1415909
Fixes: 7a34a0e890 "ra: Add a callback for selecting a register
from what's available."
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-07-31 12:55:19 -07:00
Samuel Pitoiset
110dda0e3f
mesa: drop unnecessary GLAPIENTRY to _mesa_init_line()
...
Noticed randomly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-31 19:16:30 +02:00
Samuel Pitoiset
58acc32a5e
mesa: only check errors when the state change in glClipControl()
...
When this GL call is a no-op, it should be a little faster in
the errors path only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-07-31 19:08:44 +02:00
Samuel Pitoiset
56bea2a266
mesa: only check errors when the state change in glPointSize()
...
When this GL call is a no-op, it should be a little faster in
the errors path only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-07-31 19:08:44 +02:00
Samuel Pitoiset
c6ba702979
mesa: only check errors when the state change in glCullFace()
...
When this GL call is a no-op, it should be a little faster in
the errors path only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-07-31 19:08:44 +02:00
Samuel Pitoiset
c787477378
mesa: only check errors when the state change in glProvokingVertex()
...
When this GL call is a no-op, it should be a little faster.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-07-31 19:08:44 +02:00
Marek Olšák
6d37bcdb79
dri_interface: document loaderPrivate for getCapability
...
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-31 18:30:00 +02:00
Nicolai Hähnle
86d4b46d66
ac/common: always build NIR translation
...
radeonsi needs it now, and we require LLVM 3.9 anyway.
Fixes a build with radeonsi but not radv.
2017-07-31 17:59:10 +02:00
Rob Herring
be5773fa8d
Android: fix compile error for DRI2 loader getCapability
...
Fix compile failure from commit 1bf703e4ea ("dri_interface,egl,gallium:
only expose RGBA visuals on Android").
Fixes: 1bf703e4ea ("dri_interface,egl,gallium: only expose RGBA visuals on Android")
Cc: 17.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2017-07-31 10:33:15 -05:00
Nicolai Hähnle
90c8f17cf8
Attempt to fix AppVeyor build, round 2
2017-07-31 17:19:13 +02:00
Marek Olšák
d85802e501
Revert "st/mesa: release sampler views when redefining a texture in st_context_teximage"
...
This reverts commit 5c1241268b .
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101961
Cc: 17.2 <mesa-stable@lists.freedesktop.org>
2017-07-31 17:11:30 +02:00
Nicolai Hähnle
49bdb73bec
Attempt to fix the AppVeyor build
2017-07-31 17:04:30 +02:00
Nicolai Hähnle
601093f95d
xmlconfig: move into src/util
...
v2: attempt to fix Android build (Emil)
v3: add missing include path
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
2017-07-31 15:38:41 +02:00
Nicolai Hähnle
1e40d2c882
xmlconfig: remove GL type dependencies
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 15:37:51 +02:00
Nicolai Hähnle
2879a602dd
radeonsi: ensure that temp array allocas are in the entry block
...
Otherwise, code generation fails. This has become necessary since some
shaders are wrapped in control flow.
Fixes: 081ac6e5c6 ("radeonsi/gfx9: always wrap GS and TCS in an if-block (v2)")
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 15:00:22 +02:00
Nicolai Hähnle
dfe237aef9
radeonsi: enable R600_DEBUG=nir for vertex and fragment shaders
...
Also, disable geometry and tessellation shaders. Mixing and matching NIR
and TGSI shaders should work (and I've tested it for the VS/PS interface),
but geometry and tessellation requires VS-as-ES/LS, which isn't implemented
yet for NIR.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:45 +02:00
Nicolai Hähnle
3b4f481c60
radeonsi: VS as ES/LS are not yet supported with R600_DEBUG=nir
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:44 +02:00
Nicolai Hähnle
3997b10f74
radeonsi/nir: lower uniforms to UBO loads
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:44 +02:00
Nicolai Hähnle
b7d36efc2d
ac/nir: implement load_frag_coord intrinsic
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:44 +02:00
Nicolai Hähnle
d5741489d3
radeonsi/nir: lower txp instructions
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:44 +02:00
Nicolai Hähnle
bcf85fcd9a
ac/nir: pass ac_llvm_context to unpack_param
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:44 +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
7de445377c
ac/nir,radv: move force_persample to ac_shader_info::force_persample
...
Avoid accessing radv-specific structures during the meat of NIR-to-LLVM
translation.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:43 +02:00
Nicolai Hähnle
25ff22e390
radeonsi: tweak next-shader assumptions when streamout is used
...
VS with streamout is always a HW VS.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:43 +02:00
Nicolai Hähnle
a69afb68c9
radeonsi: use new function ac_build_umin for edgeflag clamping
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:42 +02:00
Nicolai Hähnle
0f9e32519b
ac/nir: clamp shadow texture comparison value on VI
...
Needed for TC-compatible HTILE in radeonsi for test cases like
piglit spec/arb_texture_rg/execution/fs-shadow2d-red-01.shader_test
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:42 +02:00
Nicolai Hähnle
ac2ab5acad
ac/nir: add always_vector argument to ac_build_gather_values_extended
...
This simplifies a bunch of places that no longer need special treatment
of value_count == 1. We rely on LLVM to optimize away the 1-element vector
types.
This fixes a bunch of bugs where 1-element arrays are indexed indirectly.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:42 +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
28634ff7d3
ac/nir: pass ac_nir_context to emit_ddxy
...
Allocating the ddxy_lds is considered to be part of the API shader
translation and not part of the ABI.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:41 +02:00
Nicolai Hähnle
c5f3912e13
ac/nir: pass ac_nir_context to SSBO intrinsic handlers
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:41 +02:00
Nicolai Hähnle
a0af3daf9c
radeonsi: implement and use ac_shader_abi::load_ssbo
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:41 +02:00
Nicolai Hähnle
d46018a4d7
radeonsi: make get_indirect_index globally visible
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:41 +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
aa66fec47e
ac/nir: pass ac_nir_context to emit_discard_if
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:40 +02:00
Nicolai Hähnle
4ba201ee36
ac/nir: extract shader_info->fs.can_discard from NIR shader info
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:40 +02:00
Nicolai Hähnle
41d4016e06
radeonsi/nir: perform radeonsi-specific lowering and optimization passes
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:40 +02:00
Nicolai Hähnle
b49c2c9fa3
radeonsi/nir: perform lowering of input/output driver locations
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:40 +02:00
Nicolai Hähnle
9061dca872
ac/nir: handle old-style shadow tex instructions correctly
...
The first element is only extracted for new-style shadow tex.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:39 +02:00
Nicolai Hähnle
07597632a5
ac/nir: whitespace fixes
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:39 +02:00
Nicolai Hähnle
ba06e8bbe8
ac/nir: use shader_info pass to determine whether instance_id is used
...
This improves the separation of ABI and NIR translation.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:39 +02:00
Nicolai Hähnle
be0488a173
ac/nir: move setting shader_info->fs.writes_memory to radv-specific code
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:39 +02:00
Nicolai Hähnle
8d23575c96
radeonsi/nir: add image descriptor loading
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:39 +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
b36b6f76fa
ac/nir: add support for arrays-of-arrays to get_sampler_desc
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:38 +02:00
Nicolai Hähnle
677bd47cb9
radeonsi/nir: set si_shader_context::num_{sampler,images}
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:38 +02:00
Nicolai Hähnle
7c27ef182c
radeonsi/nir: implement ac_shader_abi::load_sampler_desc
...
v2: remove enum desc_type from radeonsi (Marek)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:38 +02:00
Nicolai Hähnle
35b7b3a80f
ac/nir: pass ac_nir_context to tex_fetch_ptrs and related functions
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:37 +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
57fbf3f9eb
ac/nir: pass ac_nir_context to visit_tex and various related functions
...
Get most of the churn out of the way before actually loading samplers
via the ABI.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-31 14:55:37 +02:00