Mike Blumenkrantz [Wed, 19 Aug 2020 15:46:31 +0000 (11:46 -0400)]
zink: use define for max descriptor array size
this was getting a bit unwieldy
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 15:28:58 +0000 (11:28 -0400)]
zink: add helper for image resource barriers and avoid unnecessary barriers
same as buffer barriers now
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 15:27:41 +0000 (11:27 -0400)]
zink: add a VkPipelineStageFlags param to zink_resource_barrier()
this matches the buffer variant in its flexibility now
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 15:14:46 +0000 (11:14 -0400)]
zink: remove aspect param from zink_resource_barrier
we have a helper function for this now that we can reuse
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 14:49:58 +0000 (10:49 -0400)]
zink: rework xfb barrier transitions when reusing as vertex inputs
if we have proper barrier usage to start with, then we don't need to do
any kind of weird flushing upon changing vertex inputs and can also remove
a flag from zink_resource
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 14:40:58 +0000 (10:40 -0400)]
zink: rework xfb counter resource barriers
using the new helper functions, we can now more accurately determine
exactly which barriers we need/want and avoid setting unnecessary barriers
or ending a renderpass early
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Mon, 17 Aug 2020 20:10:03 +0000 (16:10 -0400)]
zink: set buffer resource barriers for descriptor resources in update_descriptors()
need to make sure these are properly synchronized
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Mon, 17 Aug 2020 20:08:02 +0000 (16:08 -0400)]
zink: add helper function for getting pipeline stage from shader stage
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Alyssa Rosenzweig [Thu, 18 Feb 2021 16:01:19 +0000 (11:01 -0500)]
panfrost/ci: Mark flaky test
I cannot reproduce the issue in local runs.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:34:17 +0000 (13:34 -0500)]
docs/features: Mark atomics/images done on Bifrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 16:54:18 +0000 (11:54 -0500)]
panfrost: Advertise FRAMEBUFFER_NO_ATTACHMENTS
Passes dEQP-GLES31.functional.fbo.no_attachments.*, it doesn't look like
we need to do anything special.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:49:04 +0000 (13:49 -0500)]
panfrost: Comment on state of ARB_shader_clock
Pending on kernel work.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 02:16:26 +0000 (21:16 -0500)]
pan/bi: Use explicit move even for RT#0 of MRT
Otherwise we get a bad RA if RT 0 = RT 3 (for example), fixes
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.fragment.sampler2d
Fixes:
a6f1500bedd ("pan/bi: Workaround BLEND precolour with explicit moves")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 01:40:42 +0000 (20:40 -0500)]
pan/bi: Allow dynamically uniform tex indices
Passes the relevant tests of
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.*, a few
failures that seem to relate to MRT instead of this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 00:55:12 +0000 (19:55 -0500)]
pan/bi: Implement interpolateAtOffset
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 00:55:00 +0000 (19:55 -0500)]
pan/bi: Add imm_f16 helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:58:22 +0000 (18:58 -0500)]
pan/bi: Implement interpolateAtSample
Passes dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:45:46 +0000 (18:45 -0500)]
pan/bi: Preload sample ID for sample shading
Used in the LD_VAR_IMM. Wondering if preload requirements shouldn't
instead be pushed from the compiler based on actual usage instead of
guessing from the NIR...
Fixes dEQP-GLES31.functional.shaders.multisample_interpolation.sample_qualifier.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:11:45 +0000 (18:11 -0500)]
pan/bi: Elucidate slot 6/7 operation
Used to order fragments. With that clarified it's clear that we need to
wait on slot 7 for LD_TILE too (outside the limited context of a blend
shader).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:12:30 +0000 (18:12 -0500)]
pan/bi: Flesh out LD_TILE emit
Needs to support non-blend shader operation (conversion descriptor
sourced from a sysval), as well as MRT. Fixes fbfetch on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:19:29 +0000 (18:19 -0500)]
pan/bi: Fix blend shaders using LD_TILE with MRT
Don't hardcode the RT to 0. Affects ES3.0 which already exposes MRT --
despite no dEQP coverage of this particular corner case, apps could hit
this in the wild on 21.0. Fixes
dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_blend_func_buffer_blend_func
Fixes:
c7e1ef7c0c5 ("panfrost: Advertise ES3.0 on Bifrost")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:48:57 +0000 (13:48 -0500)]
pan/bi: Implement shader_clock intrinsic
Trivial.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 14:54:19 +0000 (09:54 -0500)]
pan/bi: Implement image_atomic_comp_swap
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 14:50:39 +0000 (09:50 -0500)]
pan/bi: Implement image_atomic_exchange
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Icecream95 [Mon, 28 Dec 2020 12:05:05 +0000 (01:05 +1300)]
pan/bi: nir_intrinsic_image_size support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Icecream95 [Sat, 26 Dec 2020 04:09:07 +0000 (17:09 +1300)]
pan/bi: Implement image load/store
v2 (Alyssa): Split out functions, support 3D/array
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Thu, 18 Feb 2021 14:49:57 +0000 (09:49 -0500)]
pan/bi: Materialize *DTSEL_IMM in the scheduler
We want to be able to set a descriptor table and have the instruction
pair "magically" come to be. To do so, we adjust the definition of
DTSEL_IMM (deviating a bit from the architectural definition but in
practice simplifying disassembly immensely) and add a scheduler
lowering. This ensures DTSEL is always paired correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Icecream95 [Fri, 12 Feb 2021 10:37:08 +0000 (23:37 +1300)]
pan/bi: Remove check for first_ubo_is_default_ubo
It won't be set for OpenCL.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 16:02:24 +0000 (11:02 -0500)]
pan/bi: Handle computational atomics
All the same formula: calculate an address, emit a pseudoinstruction for
the atomic, emit a postprocess that can be DCE'd if not needed.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 18:51:55 +0000 (13:51 -0500)]
pan/bi: Add ATOM_C1 promotion check
Optimizes atomic counters.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 13:18:40 +0000 (08:18 -0500)]
pan/bi: Extract bi_atom_opc from NIR intrinsic
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 16:01:57 +0000 (11:01 -0500)]
pan/bi: Lower atomic pseudo-instructions
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 16:00:43 +0000 (11:00 -0500)]
pan/bi: Add 32-bit atomic pseudoinstruction
To enable scheduler lowering to an ATOM_CX pair.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 13:48:34 +0000 (08:48 -0500)]
pan/bi: Add SEG_ADD.i64 pseudoinstruction
Expands to a pair *SEG_ADD/+SEG_ADD, which is used for lowering shared
atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 19:45:44 +0000 (14:45 -0500)]
pan/bi: Allow @rNULL with tied operands
Will enable DCE of atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 04:38:52 +0000 (23:38 -0500)]
pan/bi: Don't read alpha out of bounds
RT#0 may not have alpha, do something safe instead of risking issues
with RA later.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:47:09 +0000 (13:47 -0500)]
pan/bi: Fix LD_GCLK staging count
64-bit result
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 19:13:30 +0000 (14:13 -0500)]
pan/bi: Don't inline 64-bit constants
Will drop the upper bits incorrectly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 15:46:19 +0000 (10:46 -0500)]
pan/bi: Fix RA of node 0 again
Botched rebase.
Fixes:
c578ca73939 ("pan/bi: Add interference per clause")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 04:02:11 +0000 (23:02 -0500)]
panfrost: Remove useless check
Already checked in format_supported (only difference being cube map
arrays but the extension isn't advertised yet anyway due to missing
geometry shaders.)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 02:28:34 +0000 (21:28 -0500)]
panfrost: Set border colour on Bifrost sampler
Passes dEQP-GLES31.functional.texture.border_clamp.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 03:47:01 +0000 (22:47 -0500)]
panfrost: Take panfrost_dev for AFBC selection
This appears to be architecture dependent.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 03:35:43 +0000 (22:35 -0500)]
panfrost: Spell fix
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 03:30:42 +0000 (22:30 -0500)]
panfrost: Fix NULL deref for an empty frag shader
Fixes debug builds of dEQP-GLES31.functional.stencil_texturing.render.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:11:07 +0000 (18:11 -0500)]
panfrost: Add RT conversion sysval
Contains the InternalConversionDescriptor corresponding to the selected
render target, ready to be fed into LD_TILE.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:10:43 +0000 (18:10 -0500)]
panfrost: Export bifrost_get_blend_desc with type size
Will be used to lower EXT_shader_framebuffer_fetch on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 23:10:08 +0000 (18:10 -0500)]
panfrost: Flesh out allow_forward_pixel_to_kill check
A few cases missed, probably some more bugs hidden here!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 19:07:26 +0000 (14:07 -0500)]
panfrost: Handle PIPE_FORMAT_NONE as 'constant'
We can use the constant format anywhere safely as a 0-component format,
which will map fine for PIPE_FORMAT_NONE. Used so
ARB_framebuffer_no_attachments can probe.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:23:34 +0000 (13:23 -0500)]
panfrost: Flesh out pixel kill / zs update
Add some notes on what the useful combinations do and flesh out the
logic. Fixes fails in
dEQP-GLES31.functional.image_load_store.early_fragment_tests.*
It's still not entirely clear to me what the difference between "force
early" and "weak early" is from the driver's perspective, though I
suspect there are performance implications to getting it wrong. Follow
what the blob does in case of doubt..
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:23:08 +0000 (13:23 -0500)]
panfrost: Track coverage, early fragment tests
These extra pieces of data are needed to correctly compute pixel kill /
zs update settings.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:11:30 +0000 (13:11 -0500)]
panfrost: Label groups in GenXML
Helps debug pandecode issues.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 03:18:04 +0000 (22:18 -0500)]
pan/decode: Disambiguate border colours
Can be small ints that will just be 0.0 if interpreted as float.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Wed, 17 Feb 2021 02:54:35 +0000 (21:54 -0500)]
pan/decode: Pretty print 22-bit pixel formats
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Suggested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 18:09:59 +0000 (13:09 -0500)]
pan/decode: Fix tiler printing on Bifrost
Fixes:
9d682ad7f99 ("pan/decode: Only print local storage for vertex jobs")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Tue, 16 Feb 2021 19:18:10 +0000 (14:18 -0500)]
pan/bi: Implement barriers
Only control barriers are meaningful upon a closer read.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Alyssa Rosenzweig [Fri, 12 Feb 2021 21:50:08 +0000 (16:50 -0500)]
pan/bi: Stub scoreboarding
This is not a real implementation. But I'm working on barriers right
now.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
Jesse Natalie [Thu, 18 Feb 2021 19:13:25 +0000 (11:13 -0800)]
microsoft/clc: Use driver_location for metadata instead of re-computing offsets
Fixes:
ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
Jesse Natalie [Thu, 18 Feb 2021 19:05:43 +0000 (11:05 -0800)]
microsoft/clc: Move inline samplers to the end of the variable list
Since inline samplers are uniforms, just like kernel args, and
nir_lower_vars_to_explicit_types will assign driver_location based
on order in the variable list, move the inline samplers to the end
of the list to prevent them from creating gaps in the kernel arg
offsets.
Fixes:
ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
Jesse Natalie [Thu, 18 Feb 2021 19:04:23 +0000 (11:04 -0800)]
microsoft/clc: Fix wrap modes for inline samplers for integer textures
Fixes:
ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
Jesse Natalie [Thu, 18 Feb 2021 18:28:20 +0000 (10:28 -0800)]
microsoft/clc: Let lower_vars_to_explicit_types fill kernel input driver_location
Importantly, also run that before mucking with the variable list via image lowering,
which removes and inserts variables, making the driver_location no longer line up
with metadata.
Fixes:
ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138>
Jason Ekstrand [Thu, 18 Feb 2021 00:20:41 +0000 (18:20 -0600)]
intel/mi_builder: Add tests for gen_mi_z and gen_mi_nz
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
Jason Ekstrand [Thu, 18 Feb 2021 00:20:24 +0000 (18:20 -0600)]
intel/mi_builder: Rewrite unit tests in terms of constant folding
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
Jason Ekstrand [Thu, 18 Feb 2021 00:19:54 +0000 (18:19 -0600)]
intel/mi_builder: Add constant folding
This also serves as pretty clear documentation of each helper's
semantics.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
Jason Ekstrand [Thu, 18 Feb 2021 15:34:34 +0000 (09:34 -0600)]
intel/mi_builder: Short-circuit shifts in more cases
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
Jason Ekstrand [Thu, 18 Feb 2021 15:37:44 +0000 (09:37 -0600)]
intel/mi_builder: Fix a misleading comment
This doesn't actually assume the top 32 bits of the source value are
zero. Instead, it does (src >> shift) & UINT32_MAX regardless of what
the top bits of src are.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
Jason Ekstrand [Thu, 18 Feb 2021 00:18:56 +0000 (18:18 -0600)]
intel/mi_builder: Delete a bogus comment
It actually returns ~0/0. We're about to make things more self-
documenting so we can delete the comment instead of fixing it.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
Jason Ekstrand [Thu, 18 Feb 2021 02:00:53 +0000 (20:00 -0600)]
intel/mi_builder: Create a context in the tests
This makes them work on the simulator
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116>
Adam Jackson [Tue, 26 Jan 2021 19:30:28 +0000 (14:30 -0500)]
nouveau: Silence a warning at -Og
../src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp: In member function ‘void nv50_ir::AlgebraicOpt::handleCVT_EXTBF(nv50_ir::Instruction*)’:
../src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp:2238:57: warning: ‘offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Just set it to 0 to handle the corner case.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:27:48 +0000 (14:27 -0500)]
nouveau: Silence some warnings at -Og
../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp: In member function ‘bool {anonymous}::Converter::handleInstruction(const tgsi_full_instruction*)’:
../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:3419:22: warning: ‘src1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
3419 | geni = mkOp3(op, dstTy, dst0[c], fetchSrc(0, c), src1, mkImm(0x1f));
../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:3272:15: warning: ‘val1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
3272 | mkOp1(OP_EX2, TYPE_F32, dst0[1], val1);
Can't happen, just initialize them to NULL.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:20:30 +0000 (14:20 -0500)]
gallivm: Silence a warning at -Og
../src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c: In function ‘lp_build_sample_image_linear’:
../src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c:1412:24: warning: ‘have_corners’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1412 | have_corner = LLVMBuildLoad(builder, have_corners, "");
I don't think you can get here and really not have it initialized, but
if you _could_ then it would clearly be wrong to do anything, so do
nothing instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:17:52 +0000 (14:17 -0500)]
vl: Silence a warning at -Og
../src/gallium/auxiliary/vl/vl_winsys_dri.c: In function ‘vl_dri2_screen_texture_from_drawable’:
../src/gallium/auxiliary/vl/vl_winsys_dri.c:239:34: warning: ‘back_left’ may be used uninitialized in this function [-Wmaybe-uninitialized]
239 | dri2_handle.stride = back_left->pitch;
The server would be broken if it failed to inform us of the back left
buffer, but let's leave nothing to chance.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:16:05 +0000 (14:16 -0500)]
nir/ttn: Silence some warnings at -Og
../src/gallium/auxiliary/nir/tgsi_to_nir.c: In function ‘ttn_mem’:
../src/gallium/auxiliary/nir/tgsi_to_nir.c:1724:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1724 | instr = nir_intrinsic_instr_create(b->shader, op);
../src/gallium/auxiliary/nir/tgsi_to_nir.c:1697:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1697 | instr = nir_intrinsic_instr_create(b->shader, op);
Add some more unreachable() to make this go away.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:14:02 +0000 (14:14 -0500)]
gallivm: Silence a warning at -Og
../src/gallium/auxiliary/gallivm/lp_bld_arit.c: In function ‘lp_build_round_arch’:
../src/gallium/auxiliary/gallivm/lp_bld_arit.c:2042:7: warning: ‘intrinsic_root’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2042 | lp_format_intrinsic(intrinsic, sizeof intrinsic, intrinsic_root, bld->vec_type);
Can't happen, mark it unreachable.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:11:52 +0000 (14:11 -0500)]
loader: Silence a warning at -Og
../src/loader/loader_dri3_helper.c: In function ‘dri3_free_buffers’:
../src/loader/loader_dri3_helper.c:2022:46: warning: ‘n_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2022 | for (buf_id = first_id; buf_id < first_id + n_id; buf_id++) {
Can't happen, mark it unreachable.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:11:04 +0000 (14:11 -0500)]
glsl: Silence a warning at -Og
../src/compiler/glsl/gl_nir_link_uniforms.c:1786:50: warning: ‘blocks’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1786 | const struct gl_uniform_block *const block =
Just do nothing if we somehow fail to initialize blocks.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:04:14 +0000 (14:04 -0500)]
glsl: Silence some warnings at -Og
./src/compiler/glsl/link_uniforms.cpp: In member function ‘virtual void parcel_out_uniform_storage::visit_field(const glsl_type*, const char*, bool, const glsl_type*, glsl_interface_packing, bool)’:
../src/compiler/glsl/link_uniforms.cpp:1171:61: warning: ‘id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1171 | calculate_array_size_and_stride(prog, &this->uniforms[id],
../src/compiler/glsl/link_uniform_initializers.cpp: In function ‘gl_uniform_storage* linker::get_storage(gl_shader_program*, const char*)’:
../src/compiler/glsl/link_uniform_initializers.cpp:41:42: warning: ‘id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
41 | return &prog->data->UniformStorage[id];
Can't happen, but flow control apparently can't prove it.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 19:01:26 +0000 (14:01 -0500)]
glsl: Silence a warning at -Og
../src/compiler/glsl/gl_nir_link_uniforms.c: In function ‘gl_nir_link_uniforms’:
../src/compiler/glsl/gl_nir_link_uniforms.c:1747:39: warning: ‘num_blocks’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1747 | for (unsigned i = 0; i < num_blocks; i++) {
Don't have the patience to seee how you'd hit this but doing nothing is
clearly the right edge case behavior.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 18:48:22 +0000 (13:48 -0500)]
softfloat: Silence a warning at -Og
../src/util/softfloat.c: In function ‘_mesa_shift_right_jam_m’:
../src/util/softfloat.c:432:16: warning: ‘tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
432 | *tmp++ = 0;
You could actually hit this if you called _mesa_shift_right_jam_m with
size_words = 0 and dist < 32. Not that you'd _do_ that, but. In this
case do nothing instead of writing through an uninitialized pointer.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Adam Jackson [Tue, 26 Jan 2021 18:18:29 +0000 (13:18 -0500)]
nir: Silence a warning at -Og
This throws a curious warning:
In file included from ../src/compiler/nir/nir.h:32,
from ../src/compiler/nir/nir_opt_if.c:24:
../src/compiler/nir/nir_opt_if.c: In function ‘opt_if_loop_last_continue’:
../src/compiler/glsl/list.h:415:64: warning: ‘nif’ may be used uninitialized in this function [-Wmaybe-uninitialized]
415 | return !exec_list_is_empty(list) ? list->tail_sentinel.prev : NULL;
| ^
What's going on here is not enough of the optimizer has run to be able
to prove that nif is always initialized. So just handle the "can't
happen" case as if it could.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
Mike Blumenkrantz [Wed, 17 Feb 2021 18:58:27 +0000 (13:58 -0500)]
gallium/trace: remove transfer_map assert
this breaks tracing with tc due to the "latest" mechanism which maintains
copies of resources
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9107>
Alyssa Rosenzweig [Wed, 17 Feb 2021 20:36:13 +0000 (15:36 -0500)]
panfrost: Fix uniform_count on Midgard
The compiler ABI specifies push uniforms at a 4-byte granularity (like
Bifrost), but Midgard require a 16-byte granularity. As such if the
number of pushed words is not a multiple of 4, there is a buffer overrun
at shader load time. Ordinarily this is inaccessible so the garbage is
ignored.
However, there was a great deal of confusion around the `uniform_cutoff`
variable. In some cases (such a full glmark2 run on a 64-bit processor),
the push uniforms would be at the end of a BO and the overrun would
cause a page fault.
Remove uniform_cutoff entirely and work with count directly to avoid
faulting, and round the count up to be defensive.
Closes: #4289
Fixes:
ed810eb0a0c ("panfrost: Don't truncate uniform_count")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Robin Murphy <robin.murphy@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9109>
Mike Blumenkrantz [Thu, 28 Jan 2021 04:40:40 +0000 (23:40 -0500)]
zink: enable GL_CLAMP cap
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
Mike Blumenkrantz [Mon, 25 Jan 2021 22:37:29 +0000 (17:37 -0500)]
mesa/st: add PIPE_CAP_GL_CLAMP
when this is not set, this triggers shader and sampler state updates any time a sampler
starts or stops using GL_CLAMP, applying bitmasks needed to run nir_lower_tex
and setting CLAMP_TO_BORDER/CLAMP_TO_EDGE as necessary to mimic the behavior
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
Mike Blumenkrantz [Mon, 25 Jan 2021 20:31:15 +0000 (15:31 -0500)]
mesa/st: add pipe_sampler_state::border_color_is_integer
some drivers need to know whether the border color format is integer,
so this allows disambiguation between samplers based on format types
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
Mike Blumenkrantz [Fri, 12 Feb 2021 22:15:06 +0000 (17:15 -0500)]
nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs
this fixes mipmapping with saturate by saturating the coord param while
passing an additional param (partial derivatives or lod) that uses the
unsaturated coord value
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
Timur Kristóf [Tue, 9 Feb 2021 18:20:52 +0000 (19:20 +0100)]
aco: Disallow LSHS temp-only I/O when VS output is written indirectly.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9100>
Timur Kristóf [Wed, 17 Feb 2021 12:55:04 +0000 (13:55 +0100)]
radv/llvm: Fix reporting LDS stats of tess control shaders.
The LLVM backend forgot to set config->lds_size, which is used
for reporting LDS stats.
Fixes:
cf89bdb9ba9c7a7ba39d142ee3c83e0379c2092a "radv: align the LDS size in calculate_tess_lds_size()"
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9098>
Timur Kristóf [Wed, 17 Feb 2021 12:26:01 +0000 (13:26 +0100)]
aco: Fix LDS statistics of tess control shaders.
The calculate_tess_lds_size function already returns the size in blocks
of the encoding granule, but we forgot to adjust config->lds_size.
This variable is not used to actually set the LDS size used for TCS,
but by ACO to make scheduling decisions.
Fossil DB stats on Sienna Cichlid:
Please note that the +3729.43% is NOT a regression.
The real LDS size used didn't change, it was just reported incorrectly.
Totals from 1342 (0.96% of 139391) affected shaders:
VGPRs: 60880 -> 80240 (+31.80%); split: -0.05%, +31.85%
CodeSize: 3378456 -> 3381224 (+0.08%); split: -0.23%, +0.31%
LDS: 687104 ->
26312192 (+3729.43%)
MaxWaves: 29794 -> 23962 (-19.57%)
Instrs: 644194 -> 644610 (+0.06%); split: -0.32%, +0.39%
Cycles: 2675068 -> 2676804 (+0.06%); split: -0.31%, +0.38%
VMEM: 428840 -> 517418 (+20.66%); split: +22.53%, -1.88%
SMEM: 91831 -> 88587 (-3.53%); split: +5.70%, -9.23%
VClause: 22740 -> 19384 (-14.76%); split: -16.18%, +1.42%
SClause: 19116 -> 18373 (-3.89%); split: -4.34%, +0.46%
Copies: 66662 -> 63448 (-4.82%); split: -5.55%, +0.73%
Fixes:
cf89bdb9ba9c7a7ba39d142ee3c83e0379c2092a "radv: align the LDS size in calculate_tess_lds_size()"
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9098>
Lionel Landwerlin [Fri, 18 Dec 2020 14:19:16 +0000 (16:19 +0200)]
anv: track buffer creation flags
So we know a buffer is protected.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
Lionel Landwerlin [Thu, 10 Dec 2020 14:00:58 +0000 (16:00 +0200)]
anv: track command buffer pool flags
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
Lionel Landwerlin [Mon, 14 Dec 2020 09:11:59 +0000 (11:11 +0200)]
isl: add external parameter to isl_mocs()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
Lionel Landwerlin [Fri, 18 Dec 2020 09:35:30 +0000 (11:35 +0200)]
genxml: Add PIPE_CONTROL protected memory bits
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
Lionel Landwerlin [Fri, 4 Dec 2020 10:49:02 +0000 (12:49 +0200)]
genxml: add MI_SET_APPID on Gen12+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127>
Samuel Pitoiset [Tue, 16 Feb 2021 16:31:52 +0000 (17:31 +0100)]
radv: use the pipeline key as hash for pipeline bind markers
It's way easier to identify a pipeline compared to a random CPU addr.
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/9083>
Samuel Pitoiset [Tue, 16 Feb 2021 16:28:12 +0000 (17:28 +0100)]
radv: only emit pipeline bind markers for application pipelines
We don't want to emit markers for internal operations.
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/9083>
Samuel Pitoiset [Wed, 17 Feb 2021 12:57:09 +0000 (13:57 +0100)]
radv: add support for user event markers with SQTT
This enables VK_EXT_debug_marker only if SQTT is enabled, otherwise
it's just useless.
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/9099>
Jason Ekstrand [Mon, 1 Feb 2021 21:03:33 +0000 (15:03 -0600)]
anv/android: Re-implement AcquireImageANDROID
Instead of doing a vkQueueSubmit() and hoping for the best, use the
actual sync FD that gets passed in from SurfaceFlinger. The semaphore
and fence FD import functions already handle the -1 case for us so the
implementation is almost trivial.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8814>
Vinson Lee [Sun, 14 Feb 2021 06:03:15 +0000 (22:03 -0800)]
nv50/ir: Initialize ValueDef member origin in constructors.
Fix defects reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member origin is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9036>
Dave Airlie [Tue, 9 Feb 2021 06:23:39 +0000 (16:23 +1000)]
lavapipe: set viewport state dirty on first execute
This makes sure the viewport state gets emitted so that
draw gets viewports setup and the vertex shader doesn't crash.
Fixes bug uncovered with dEQP-VK.api.descriptor_set_layout_lifetime.graphics
once asan fix was done.
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093>
Dave Airlie [Thu, 11 Feb 2021 01:53:24 +0000 (11:53 +1000)]
lavapipe: avoid pointer to pipeline layout in execution
pipeline layout lifetime is only during command buffer recording,
Don't store pointers to it, just extract them around it.
Fixes asan use-after-free in
dEQP-VK.api.pipeline.pipeline_layout.lifetime.destroy_after_end
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093>