Jonathan Marek
7748afbb1e
freedreno/regs: update primitive output related registers
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5790 >
2020-07-14 04:05:24 +00:00
Eric Anholt
5c1afd1ce4
freedreno/ir3: Fix uninit var warning.
...
It's a decent bit of analysis to see that the initialization will always
happen, and my compiler isn't doing so in at least one configuration.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5834 >
2020-07-14 03:38:53 +00:00
Eric Anholt
afb3f21c9f
freedreno/ir3_cmdline: Fix an uninit var warning.
...
You could only access entry through the initialized path, but we can clean
up the compiler warning by not keeping the other var.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5834 >
2020-07-14 03:38:53 +00:00
Hyunjun Ko
d941c6b74f
turnip: implement VK_EXT_private_data
...
Which is using base class's implementation.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539 >
2020-07-14 02:48:30 +00:00
Hyunjun Ko
5d3fdbc52b
turnip: Use the common base object type and struct.
...
v2. Define new helper function to avoid duplicated a pair of function calls.
v3. Move new helper functions to vk_object.h and call them.
v4. Merge 2 commits to use commomn base object type and struct into one.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539 >
2020-07-14 02:48:30 +00:00
Hyunjun Ko
cd85315dcb
tu: Fix wrong copies of sampler descriptor.
...
Found this with the following patch but it exists since adding ycbcr
sampler to the struct.
Fixes: d070a7ba0c
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539 >
2020-07-14 02:48:30 +00:00
Hyunjun Ko
3a153137f4
vulkan: Adds helpers for vk_object (de)alloation and (de)initialization.
...
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539 >
2020-07-14 02:48:30 +00:00
Rob Clark
f076c36367
gitlab-ci: reduce a630 runner load
...
They seem to be sometimes taking a while to boot, which is triggering CI
timeouts. (Possibly tftp server in bad shape?) Cut out non-essential
a630 CI jobs, and reduce the gles3/gles31 jobs to compensate.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5893 >
2020-07-13 19:03:39 -07:00
Eric Engestrom
b7b72681bd
meson/intel: add missing dep on git_sha1.h
...
Fixes: 805b32cab9 ("intel: add identifier for debug purposes")
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5882 >
2020-07-13 21:26:25 +00:00
Mike Blumenkrantz
d4f4546ada
zink: use type of src[0] for ntv store and load ops
...
in some cases (e.g., gl_ClipDistance) the nir_variable type doesn't match
the needed destination type, so we can simplify this code to just use
the destination type
fixes spec@glsl-1.10 @execution@interpolation@interpolation-none-gl_backcolor-smooth-vertex
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5852 >
2020-07-13 21:13:45 +00:00
Mike Blumenkrantz
359c938483
zink: add lengthy comment and remove assert from discard_if ntv pass
...
as in the comment, while we may want to try verifying that discard will be
the last instruction in a block, it's a bit problematic given that other nir
passes we're doing may insert instructions after a discard as part of e.g.,
nir_opt_dead_cf in the process of removing another block
fixes shaders@glsl-fs-discard-04
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5852 >
2020-07-13 21:13:45 +00:00
Mike Blumenkrantz
97ec109d8f
zink: handle ntv case of nested loop instructions more permissively
...
if the last instruction in a loop's body terminates a block, e.g., from
a nested loop with a jump as its final instruction, then no block will
have been started when returning to the original loop, and there's no need
to emit a branch
fixes shaders@glsl-vs-continue-in-switch-in-do-while
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5852 >
2020-07-13 21:13:45 +00:00
Mike Blumenkrantz
e40a77ea5d
zink: use right vulkan type for GL_PRIMITIVES_GENERATED queries
...
VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT includes
primitives which won't get drawn due to e.g., not enough vertices emitted
by geometry shader
fixes spec@glsl-1.50 @gs-emits-too-few-verts
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533 >
2020-07-13 20:59:07 +00:00
Mike Blumenkrantz
b9b943793b
zink: only reset query pool on query end if current batch isn't in renderpass
...
reset can't be performed during a renderpass, so we need to defer that until a
time when we're definitely not in a renderpass, such as when we're starting a
new query or resuming a query
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533 >
2020-07-13 20:59:07 +00:00
Mike Blumenkrantz
2c02ca2184
zink: properly handle query pool overflows
...
inline a query result value to each query object so we can stash the partial
result just before we do a pool reset, which will always happen during the
suspend/resume query mechanism that swaps active queries from a flushed batch
to the next batch
once (or if) the "real" call to fetch query results is called, we can dump the
inlined value into the fetch value and return the full results
fixes mesa/mesa#3000
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533 >
2020-07-13 20:59:07 +00:00
Mike Blumenkrantz
510631ad76
zink: only stall during query destroy for xfb queries
...
xfb queries allocate vk buffer objects in the underlying driver which
can be deallocated while an xfb query is in-flight if we attempt to
defer it due to the way that gl xfb is translated to vk, so we need to
continue forcing this behavior in that case
for other query types, we can safely defer here until the current batch has
finished rather than block
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533 >
2020-07-13 20:59:07 +00:00
Mike Blumenkrantz
27defcd20e
zink: use #define for number of queries per-pool
...
just to ensure we're consistent internally
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533 >
2020-07-13 20:59:07 +00:00
Mike Blumenkrantz
3eea7fc88b
zink: rework query handling
...
this hooks up query objects to the batches that they're actively running on
(and the related fence) in order to manage the lifetimes of queries more
efficiently by calling vkCmdResetQueryPool only on init and when the query
pool has been completely used up. additionally, this resolves some vk spec
issues related to destroying pools with active queries
note that any time a query pool is completely used up, results are lost,
which is a very slight improvement on the previous abort() that was triggered
in that scenario
ref mesa/mesa#3000
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533 >
2020-07-13 20:59:07 +00:00
Italo Nicola
2096903a05
panfrost: Fix outmods on int to float conversions
...
No shader-db changes (Alyssa).
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5883 >
2020-07-13 20:38:03 +00:00
Eric Engestrom
be8a8edb1e
docs/submittingpatches: add more than one Cc: mesa-stable example to the examples list
...
Starting with that very example :)
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5880 >
2020-07-13 19:33:25 +00:00
Alyssa Rosenzweig
da23a31726
docs/features: Update ASTC entries for Panfrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5856 >
2020-07-13 11:24:41 -04:00
Alyssa Rosenzweig
f34b8d3609
panfrost: Map PIPE_{DXT, RGTC, BPTC} to MALI_BCn
...
Mali (and Vulkan) uses D3D naming conventions for these formats where
Gallium/Mesa uses OpenGL names, but the formats are equivalent. sRGB is
communicated out-of-band on Mali; otherwise, it appears to be a 1:1
mapping.
On supported devices, this exposes GL_EXT_texture_compression_rgtc and
GL_ARB_texture_compression_bptc, so update features.txt
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5856 >
2020-07-13 11:24:41 -04:00
Alyssa Rosenzweig
6da405ca77
panfrost: Filter compressed texture formats
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5856 >
2020-07-13 11:22:00 -04:00
Alyssa Rosenzweig
407a052ced
panfrost: Pipe in compressed texture feature mask
...
So we can query at run-time as part of Gallium's checks.
v2: More explicit naming.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5856 >
2020-07-13 11:21:59 -04:00
Alyssa Rosenzweig
d5a9cd1b7d
panfrost: Add format codes for new compressed textures
...
Compressed formats line up with CONFIG_TEX_COMPRESSED_FORMAT_ENABLE
documented on
https://releases.linaro.org/archive/14.07/android/images/armv8-android-juno-lsk/
None of the new formats have been seen in the wild.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5856 >
2020-07-13 11:21:35 -04:00
Alyssa Rosenzweig
64608b4bcf
panfrost: Compact unused BO flag bits
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
c6ebff3ecd
panfrost: Remove panfrost_bo_access type
...
It's just whether it writes or not, which is already implied by the
presence/absence of a writer. So no need to track explicitly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
62ec4e02f6
panfrost: Remove PAN_BO_DONT_REUSE
...
Equivalent to SHARED.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
d6e3808e7e
panfrost: Remove PAN_BO_COHERENT_LOCAL
...
Ancient relic from kbase. Panfrost kernel doesn't need this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
baa1a8fbba
panfrost: Merge PAN_BO_IMPORTED/PAN_BO_EXPORTED
...
Always checked together and really signal the same property from
different perspectives.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
0aa6de967b
panfrost: Index BOs from the BO map sparse array
...
Now we have a central store of them, so we may remove active_bo.
v2: Squash two patches together to prevent a race condition mid-series.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
169dbb5b08
panfrost: Add a sparse array to map GEM handles to BOs
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
37d89e0f93
panfrost: Fix write to free'd memory
...
No clue how this worked before.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Fixes: 82f18b713a ("panfrost: Keep track of active BOs")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Alyssa Rosenzweig
20dd37024b
panfrost: Fix fence leak
...
When overwriting the writer, we need to release the old reference.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Fixes: 2dad9fde50 ("panfrost: Start tracking inter-batch dependencies")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859 >
2020-07-13 14:42:33 +00:00
Rhys Perry
15a17fddad
aco: add 32-bit integer addition to can_swap_operands
...
fossil-db (Navi):
Totals from 167 (0.12% of 135946) affected shaders:
CodeSize: 484892 -> 482628 (-0.47%)
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/5695 >
2020-07-13 14:11:50 +00:00
Rhys Perry
ec9920e72b
radv: use lower_shuffle_to_swizzle_amd
...
Affects a few shaders in Detroit: Become Human and Doom Eternal.
fossil-db (Navi):
Totals from 9 (0.01% of 135946) affected shaders:
CodeSize: 31188 -> 25096 (-19.53%)
Instrs: 6136 -> 4999 (-18.53%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5695 >
2020-07-13 14:11:50 +00:00
Rhys Perry
7ba645d5cb
nir/lower_subgroups: add lower_shuffle_to_swizzle_amd
...
masked_swizzle_amd can be much faster than shuffle.
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/5695 >
2020-07-13 14:11:50 +00:00
Rhys Perry
9c317cb278
nir/lower_subgroups: pass options struct to lower_shuffle
...
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/5695 >
2020-07-13 14:11:50 +00:00
Rhys Perry
a6a731bea5
aco: implement <32-bit masked_swizzle_amd
...
This is needed since we will be lowering some 8/16-bit shuffles to
masked_swizzle_amd.
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/5695 >
2020-07-13 14:11:50 +00:00
Rhys Perry
d377fbf95d
aco: optimize some masked swizzles to DPP
...
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/5695 >
2020-07-13 14:11:50 +00:00
Rhys Perry
09f48de582
aco: read 0 from inactive lanes when using dpp
...
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/5695 >
2020-07-13 14:11:50 +00:00
Icecream95
c417172751
panfrost: Enable framebuffer fetch
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Alyssa Rosenzweig
317be5a16d
panfrost: Extend fetched framebuffer results
...
So NIR doesn't complain about invalid swizzles when reading a format
with less than 4 channels.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Alyssa Rosenzweig
d94584c5a6
panfrost: Always use SOFTWARE for pure formats
...
Otherwise we end up implicitly converting ints to floating point.
Likewise for floats which again have strange interactions.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Alyssa Rosenzweig
b9869e0e5e
panfrost: Generate shader variants on framebuffer bind
...
If we keyed the shader for the framebuffer.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Icecream95
a3952e927e
panfrost: Use f2fmp for framebuffer lowering conversions
...
This allows the conversion to be removed when the output is needed as
f32 anyway, for example for highp framebuffer fetch.
v2: Also change operations such as i2i16 to i2imp (Alyssa).
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Icecream95
d16d136734
panfrost: Stop keying on rt format when using native loads
...
Native loads are the same for any format, so we can use the same
shader variant for all framebuffer formats with a native load.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Icecream95
391ad72812
panfrost: Implement texture_barrier
...
This is needed for KHR_blend_equation_advanced with a blend
barrier.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Icecream95
2fbe7ca9d9
pan/mdg: Use a 32-bit ld_color_buffer op when needed
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00
Icecream95
18059f48f8
pan/mdg: Set the z/s store intrinsic base correctly
...
When EXT_shader_framebuffer_fetch is used and only depth and/or
stencil are written, we can't rely on the first output being to
depth/stencil.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755 >
2020-07-13 13:35:11 +00:00