Jesse Natalie
a77eedd6bb
docs: Document USE_ELF_TLS can work on Windows too
...
Reviewed-by: Jose Fonseca <jfonseca@vmware.com.>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9165 >
2021-02-23 17:06:48 +00:00
Jesse Natalie
ba141b95a7
glapi: Support "ELF" TLS on Windows
...
To avoid a massive rename, I'm leaving this as a misnomer, it's not
really ELF TLS, but it's the same concept.
Note that Windows doesn't support thread-local variables imported
or exported between modules, so we can only support this when we're
not using a shared glapi.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4050
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9165 >
2021-02-23 17:06:48 +00:00
Bas Nieuwenhuizen
d7e1f492bc
radv: Disable displayable DCC for GFX8 properly.
...
On scanout the GFX8 ac_surface doesn't clear the size but only
doesn't allocate space and hence dcc_offset is 0. This is the same
as radeonsi.
Fixes: 7acb30de8a
("radv: Enable displayable DCC.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4346
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9221 >
2021-02-23 16:57:04 +00:00
Mike Blumenkrantz
5edbc6148d
zink: disable some builtin-gl-sample-mask sample shading tests on ci
...
these are super flaky
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9219 >
2021-02-23 16:46:53 +00:00
Pierre-Eric Pelloux-Prayer
e346f61a91
mesa: update vao _EnabledWithMapMode in copy_array_object
...
Otherwise it can be out of sync.
Fixes: 306f1ef417
("mesa: precompute _mesa_get_vao_vp_inputs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4331
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9199 >
2021-02-23 15:48:01 +00:00
Lionel Landwerlin
b0b1bf9957
anv: Fix wait_count missing increment
...
If we don't wait on anything, I bet it makes the QueuePresent faster,
but also completely wrong...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 02f94c3306
("anv: don't wait for completion of work on vkQueuePresent()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9211 >
2021-02-23 15:39:42 +00:00
Jan Beich
97ff5160d1
ac/rgp: define EM_AMDGPU if missing for compatibility
...
EM_AMDGPU isn't defined on DragonFly, FreeBSD, OpenBSD, so use the
same workaround as ac_rtld.c.
src/amd/common/ac_rgp_elf_object_pack.c:382:24: error: use of undeclared identifier 'EM_AMDGPU'
elf_hdr.e_machine = EM_AMDGPU;
^
Fixes: 110bb2c77d
("ac/rgp: add helper function to write rgp elf oject")
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9169 >
2021-02-23 15:19:41 +00:00
Jan Beich
ec35c4b57c
ac: prefer system EM_AMDGPU definition
...
May improve compatibility with systems where EM_AMDGPU value is
different from Linux.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9169 >
2021-02-23 15:19:41 +00:00
Christian Gmeiner
dba692c618
etnaviv: use nir_lower_uniforms_to_ubo(..)
...
This removes our local copy and fixes the following nir validation problem:
error: nir_intrinsic_range(instr) != 0 (../src/compiler/nir/nir_validate.c:646)
No piglit or deqp regression seen.
shader-db results for GC3000:
instructions helped: shaders/deqp_gles2/23470.shader_test VERT: 328 -> 316 (-3.66%)
instructions helped: shaders/deqp_gles2/23473.shader_test FRAG: 328 -> 316 (-3.66%)
instructions helped: shaders/glamor/88.shader_test FRAG: 472 -> 452 (-4.24%)
instructions helped: shaders/chromeos/36.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/chromeos/24.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/chromeos/18.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/chromeos/45.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/deqp_gles2/23494.shader_test VERT: 176 -> 164 (-6.82%)
instructions helped: shaders/deqp_gles2/23497.shader_test FRAG: 176 -> 164 (-6.82%)
instructions helped: shaders/glamor/82.shader_test FRAG: 280 -> 260 (-7.14%)
instructions helped: shaders/chromeos/21.shader_test VERT: 56 -> 52 (-7.14%)
instructions helped: shaders/chromeos/15.shader_test VERT: 56 -> 52 (-7.14%)
instructions helped: shaders/tesseract/268.shader_test VERT: 152 -> 136 (-10.53%)
instructions helped: shaders/tesseract/270.shader_test VERT: 184 -> 164 (-10.87%)
instructions helped: shaders/tesseract/272.shader_test VERT: 216 -> 192 (-11.11%)
instructions helped: shaders/tesseract/266.shader_test VERT: 88 -> 76 (-13.64%)
instructions helped: shaders/deqp_gles2/23488.shader_test VERT: 112 -> 96 (-14.29%)
instructions helped: shaders/deqp_gles2/23491.shader_test FRAG: 112 -> 96 (-14.29%)
instructions helped: shaders/chromeos/102.shader_test VERT: 168 -> 144 (-14.29%)
instructions helped: shaders/deqp_gles2/23449.shader_test FRAG: 64 -> 52 (-18.75%)
instructions helped: shaders/deqp_gles2/23446.shader_test VERT: 64 -> 52 (-18.75%)
instructions helped: shaders/deqp_gles2/23461.shader_test FRAG: 124 -> 100 (-19.35%)
instructions helped: shaders/deqp_gles2/23458.shader_test VERT: 124 -> 100 (-19.35%)
instructions helped: shaders/chromeos/39.shader_test VERT: 124 -> 100 (-19.35%)
temps helped: shaders/chromeos/102.shader_test VERT: 6 -> 5 (-16.67%)
temps helped: shaders/deqp_gles2/23470.shader_test VERT: 5 -> 4 (-20.00%)
temps helped: shaders/deqp_gles2/23473.shader_test FRAG: 5 -> 4 (-20.00%)
temps HURT: shaders/tesseract/272.shader_test VERT: 6 -> 7 (16.67%)
immediates helped: shaders/deqp_gles2/23470.shader_test VERT: 24 -> 20 (-16.67%)
immediates helped: shaders/deqp_gles2/23473.shader_test FRAG: 24 -> 20 (-16.67%)
immediates helped: shaders/chromeos/102.shader_test VERT: 8 -> 4 (-50.00%)
immediates helped: shaders/chromeos/39.shader_test VERT: 8 -> 4 (-50.00%)
immediates HURT: shaders/glamor/88.shader_test FRAG: 32 -> 36 (12.50%)
immediates HURT: shaders/deqp_gles2/23494.shader_test VERT: 4 -> 8 (100.00%)
immediates HURT: shaders/deqp_gles2/23497.shader_test FRAG: 4 -> 8 (100.00%)
total instructions in shared programs: 1123728 -> 1123392 (-0.03%)
instructions in affected programs: 3644 -> 3308 (-9.22%)
helped: 24
HURT: 0
helped stats (abs) min: 4 max: 24 x̄: 14.00 x̃: 12
helped stats (rel) min: 3.66% max: 19.35% x̄: 10.74% x̃: 8.83%
95% mean confidence interval for instructions value: -17.11 -10.89
95% mean confidence interval for instructions %-change: -13.03% -8.45%
Instructions are helped.
total temps in shared programs: 86978 -> 86976 (<.01%)
temps in affected programs: 22 -> 20 (-9.09%)
helped: 3
HURT: 1
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 16.67% max: 20.00% x̄: 18.89% x̃: 20.00%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 16.67% max: 16.67% x̄: 16.67% x̃: 16.67%
95% mean confidence interval for temps value: -2.09 1.09
95% mean confidence interval for temps %-change: -38.40% 18.40%
Inconclusive result (value mean confidence interval includes 0).
total immediates in shared programs: 141464 -> 141460 (<.01%)
immediates in affected programs: 104 -> 100 (-3.85%)
helped: 4
HURT: 3
helped stats (abs) min: 4 max: 4 x̄: 4.00 x̃: 4
helped stats (rel) min: 16.67% max: 50.00% x̄: 33.33% x̃: 33.33%
HURT stats (abs) min: 4 max: 4 x̄: 4.00 x̃: 4
HURT stats (rel) min: 12.50% max: 100.00% x̄: 70.83% x̃: 100.00%
95% mean confidence interval for immediates value: -4.53 3.38
95% mean confidence interval for immediates %-change: -48.17% 70.79%
Inconclusive result (value mean confidence interval includes 0).
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9039 >
2021-02-23 14:55:34 +00:00
Christian Gmeiner
1837135f7c
etnaviv: nir: add ubo lowering pass
...
Adds a pass to lower the load_ubo intrinsics for block 0 back
to load_uniform intrinsic.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9039 >
2021-02-23 14:55:34 +00:00
Daniel Schürmann
ffebe48013
aco: don't rematerialize exec
...
Since exec is not considered a temporary anymore,
we accidentally allowed to rematerialize it.
Fixes: a56ddca4e8
('aco: make all exec accesses non-temporaries')
Closes : #4327
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9215 >
2021-02-23 14:41:31 +00:00
Christian Gmeiner
337ba88293
vc4: let st lower rect tex
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
9c67324542
etnaviv: let st lower rect tex
...
Before this change we used a dummy load_uniform to represent texcoord
scale. That dummy load was converted to a load_const where we are using
the upper 32 bits to store the uniform content type and that breaks nir's
validation. With the new nir_intrinsic_load_texture_scaling we know the
uniform type and do not need to go from load_ubo->load_const (with type
information).
shader-db for GC3000:
instructions helped: shaders/tesseract/491.shader_test FRAG: 260 -> 248 (-4.62%)
instructions helped: shaders/tesseract/494.shader_test FRAG: 256 -> 244 (-4.69%)
instructions helped: shaders/tesseract/238.shader_test FRAG: 244 -> 232 (-4.92%)
instructions helped: shaders/tesseract/241.shader_test FRAG: 244 -> 232 (-4.92%)
instructions helped: shaders/tesseract/127.shader_test FRAG: 80 -> 76 (-5.00%)
instructions helped: shaders/tesseract/130.shader_test FRAG: 156 -> 148 (-5.13%)
instructions helped: shaders/tesseract/226.shader_test FRAG: 204 -> 192 (-5.88%)
instructions helped: shaders/tesseract/229.shader_test FRAG: 204 -> 192 (-5.88%)
instructions helped: shaders/tesseract/217.shader_test FRAG: 164 -> 152 (-7.32%)
instructions helped: shaders/tesseract/214.shader_test FRAG: 164 -> 152 (-7.32%)
instructions helped: shaders/tesseract/205.shader_test FRAG: 124 -> 112 (-9.68%)
instructions helped: shaders/tesseract/202.shader_test FRAG: 124 -> 112 (-9.68%)
instructions helped: shaders/tesseract/169.shader_test FRAG: 36 -> 32 (-11.11%)
instructions helped: shaders/tesseract/166.shader_test FRAG: 36 -> 32 (-11.11%)
instructions helped: shaders/tesseract/118.shader_test FRAG: 32 -> 28 (-12.50%)
instructions helped: shaders/tesseract/181.shader_test FRAG: 60 -> 52 (-13.33%)
instructions helped: shaders/tesseract/178.shader_test FRAG: 60 -> 52 (-13.33%)
instructions helped: shaders/tesseract/121.shader_test FRAG: 60 -> 52 (-13.33%)
instructions helped: shaders/tesseract/193.shader_test FRAG: 84 -> 72 (-14.29%)
instructions helped: shaders/tesseract/190.shader_test FRAG: 84 -> 72 (-14.29%)
temps HURT: shaders/tesseract/494.shader_test FRAG: 6 -> 7 (16.67%)
temps HURT: shaders/tesseract/491.shader_test FRAG: 6 -> 7 (16.67%)
total instructions in shared programs: 1122112 -> 1121920 (-0.02%)
instructions in affected programs: 2676 -> 2484 (-7.17%)
helped: 20
HURT: 0
helped stats (abs) min: 4 max: 12 x̄: 9.60 x̃: 12
helped stats (rel) min: 4.62% max: 14.29% x̄: 8.92% x̃: 8.50%
95% mean confidence interval for instructions value: -11.14 -8.06
95% mean confidence interval for instructions %-change: -10.65% -7.18%
Instructions are helped.
total temps in shared programs: 86942 -> 86944 (<.01%)
temps in affected programs: 12 -> 14 (16.67%)
helped: 0
HURT: 2
total immediates in shared programs: 141216 -> 141216 (0.00%)
immediates in affected programs: 0 -> 0
helped: 0
HURT: 0
total loops in shared programs: 0 -> 0
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
LOST: 0
GAINED: 0
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
06f409a8c1
etnaviv: nir: support nir_intrinsic_load_texture_rect_scaling
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
7c40e9a322
ttn: lower rectangle textures if not supported
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
08e072015a
gallium/st: lower rectangle textures if not supported
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
758a2d5343
gallium: add PIPE_CAP_TEXRECT
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
8cb52f6735
nir/lower_tex: wider usage of nir_tex_instr_src_index(..)
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Suggested-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
a403ff4d70
nir/lower_tex: 'txs free' tex_rect lowering
...
GPUs without native txs support (and without an emulation in sw)
can use this new lowering. Also it saves us from doing int/float
conversions.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
3fbde2fd93
nir: add has_txs flag
...
Some nir lowerings might need to know if txs is supported by
the backend.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
b0e23c92b3
nir: add load_texture_rect_scaling
...
Will be used in a different form of lower_rect tex lowering.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Samuel Pitoiset
765097eac4
radv: add support for instruction timing with RGP
...
This is probably the most useful feature with SQTT/RGP.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9130 >
2021-02-23 13:03:39 +00:00
Samuel Pitoiset
a72b7a9b6c
radv: add support for exporting pipelines with RGP
...
This is still experimental and only enabled with
RADV_THREAD_TRACE_PIPELINE to avoid breaking existing support.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9130 >
2021-02-23 13:03:39 +00:00
Samuel Pitoiset
884e14d784
radv: store a pointer to the code in radv_shader_variant
...
This will be used by SQTT to dump the disassembly.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9130 >
2021-02-23 13:03:39 +00:00
Bas Nieuwenhuizen
7acb30de8a
radv: Enable displayable DCC.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:42 +01:00
Bas Nieuwenhuizen
f848f2adfa
radv: Use ac_surface DCC settings for shareable images.
...
On GFX10 the settings for displayable DCC are different than those
for normal texturing.
This is technically a slight pessimization as ac_surface does not
know about textures that don't have to be sampled. However, for color
surfaces this is a very unlikely situation as presumably even MSAA
images have to be resolved (potentially using texture HW).
So in practice this should be equal for everything except displayable DCC.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:36 +01:00
Bas Nieuwenhuizen
0e189dd3fd
radv: Add DCC info to the metadata.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:33 +01:00
Bas Nieuwenhuizen
54f3ed224d
radv: Implement displayable DCC retiling.
...
Straightforward implementation using the retile map from radeonsi.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:29 +01:00
Bas Nieuwenhuizen
e34542bdf1
radv: Implement initialization of displayable DCC.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:26 +01:00
Bas Nieuwenhuizen
d78389ea5f
amd/common: Add retile map size helper.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:23 +01:00
Bas Nieuwenhuizen
e59847f67f
radv: Use shared code for setting opaque metadata.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:20 +01:00
Bas Nieuwenhuizen
9c5c995cbe
radv: Handle UMD metadata on import.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:16 +01:00
Bas Nieuwenhuizen
1a88805ded
amd/common: constify ac_surface_set_umd_metata.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:31:55 +01:00
Rhys Perry
75c9adf039
aco/lower_phis: fix all_preds_uniform with continue_or_break
...
Found in a Death Stranding shader with loop unrolling disabled.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 9a089baff1
("aco: optimize boolean phis with uniform selections")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9193 >
2021-02-23 10:46:56 +00:00
Iago Toral Quiroga
54c17e45ae
broadcom/compiler: skip unnecessary unifa writes
...
If a new UBO load happens to read exactly at the offset right after the
previous UBO load (something that is fairly common, for example when
reading a matrix), we can skip the unifa write (with its 3 delay slots)
and just continue to call ldunifa to continue reading consecutive addresses.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
e1cf2406da
broadcom/compiler: add a constant alu optimization pass
...
Currently this is useful to clean up after DCEing leading ldunifa
instructions, but it can be expanded to handle more cases which
may allow to simplify the compiler code in places where we have
been trying to optimize manually for similar cases.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
89de085055
broadcom/compiler: remove unused leading ldunifa
...
This requires that we go back to the unifa write and update the address
to jump over the unused leading component.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
9d16d2d0be
broadcom/compiler: allow dead code elimination of unused trailing ldunifa
...
If a ldunifa is the last in a sequence and is not used, we can safely
eliminate it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
e20ae14978
broadcom/compiler: fix ldunif optimization
...
When we look back for a previous uniform definition we want to
start looking from the current position of the cursor, not the
end of the current block. The latter only works when translating
from NIR, since in that case both always match, but any optimization
pass may rewrite code and emit uniforms at any place in the middle of
the program.
Also, ntq_store_dest expects result to be written by the last instruction
to handle the case where it is stored to a NIR register. That won't be
the case if the result comes from an optimized uniform, so in that case
we need to insert a MOV, like we do in non-uniform control flow.
v2: fix ntq_store_dest for optimized uniforms.
Fixes: 14af7b3085
('broadcom/compiler: don't emit redundant ldunif')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
James Park
9f30370654
vulkan: Use typed outarray API
...
MSVC cannot perform GCC __typeof__ for C code. (C++ has decltype.)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:18:11 +10:00
Dave Airlie
054dd668a6
meson/llvm: add native for gallium swrast
...
If we are building llvmpipe and lavapipe we want native in this
list.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:17:28 +10:00
Dave Airlie
611e9f29e2
lavapipe: fix icd generation for windows
...
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:17:12 +10:00
Dave Airlie
34ed5e4e60
lavapipe: add dll definition file instead of using PUBLIC
...
This avoids conflicts with the definitions in vk_icd.h
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:17:06 +10:00
Dave Airlie
deb44bc317
lavapipe: fix msvc initialiser
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:16:55 +10:00
Dave Airlie
4eada33223
lavapipe: use the common icd generator
...
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:16:40 +10:00
Mike Blumenkrantz
806577cbcc
zink: update ci results
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 22:50:52 -05:00
Mike Blumenkrantz
445dd1906f
zink: handle PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in transfer_map for buffers
...
when discarding the whole resource on an unused resource, we can deinit the buffer
range here
in the future, ideally we should be doing something like creating a new vk buffer/image
entirely here and demoting the existing one to a queue that destroys/caches it when
the batch finishes in order to avoid fencing
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:33 -05:00
Mike Blumenkrantz
4d5f7b3a6d
zink: change some transfer_map cases of waiting on cs batch to flushing cs
...
we don't actually have to stall here, we just have to make sure the cs batch
is submitted before the subsequent buffer copy command goes into a gfx
batch in order to preserve the ordering
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:32 -05:00
Mike Blumenkrantz
07df65d45f
zink: only wait on last write-batch for resources during transfer_map
...
if we need to sync a resource for read-only mapping, we only need to wait on
the fence that was last flagged as having writes to the resource, not batches
that may have reads, as reads don't affect memory coherency
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:32 -05:00
Mike Blumenkrantz
16792ccaa1
zink: beef up zink_transfer_flush_region
...
this now takes over from previous call sites in zink_transfer_unmap
we add a flush here if we had pending usage to ensure that the resource
gets properly synced
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:29 -05:00