Michel Zou [Thu, 18 Feb 2021 08:19:30 +0000 (09:19 +0100)]
zink: fix win32 build
Fixes:
57575627,
c4cc3d91
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9126>
Samuel Pitoiset [Thu, 18 Feb 2021 22:34:41 +0000 (23:34 +0100)]
radv: set correct value for OFFCHIP_BUFFERING on GFX10+
Higher values break tessellation. I was only able to reproduce this
by switching back/from AMDVLK which was really weird...
According to Marek (
1c6eca23fdd8), it looks like it's related to
register shadowing and PAL enables it, that probably explains a bit.
Copied from PAL and RadeonSI.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4207
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2498
Fixes:
74d69299d16 ("radv/gfx10: double the number of tessellation offchip buffers per SE")
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/9141>
Vinson Lee [Sun, 14 Feb 2021 06:20:39 +0000 (22:20 -0800)]
nv50/ir: Initialize Instruction members.
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member serial is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member sched is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member bb 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/9037>
Mike Blumenkrantz [Tue, 29 Sep 2020 19:25:47 +0000 (15:25 -0400)]
zink: use vkGetFenceStatus when we're obviously checking for status
a timeout of 0 indicates that gallium wants to know whether a fence is done,
so we can use a simpler call here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9154>
Mike Blumenkrantz [Fri, 4 Sep 2020 16:01:50 +0000 (12:01 -0400)]
zink: break out even more of zink_blit state saving
for reuse in upcoming clear refactoring
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9150>
Jonathan Marek [Mon, 11 Jan 2021 19:56:48 +0000 (14:56 -0500)]
freedreno/a6xx: set SP_PERFCTR_ENABLE in computerator
Set this register to have properly working SP perfcntrs in computerator.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423>
Jonathan Marek [Mon, 11 Jan 2021 19:47:38 +0000 (14:47 -0500)]
freedreno/a6xx: update some registers
Some sorting, adding unknown fields, documenting some fields, etc.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423>
Jonathan Marek [Mon, 11 Jan 2021 18:48:24 +0000 (13:48 -0500)]
freedreno/a6xx: always use reg64 for address registers (no LO/HI)
Reduce noise in a6xx.xml by removing LO/HI versions of address registers.
Also fix type="address" registers in register packing (use bit size instead
of checking for "waddress" to use qword)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423>
Jonathan Marek [Mon, 11 Jan 2021 18:00:24 +0000 (13:00 -0500)]
freedreno/a6xx: update perfcntr registers (declare as arrays)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423>
Jonathan Marek [Mon, 11 Jan 2021 17:49:57 +0000 (12:49 -0500)]
freedreno/registers: use macro instead of inline function for array regs
This is to allow use in places where an inline function isn't allowed,
such as a static initializer.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423>
Connor Abbott [Thu, 10 Sep 2020 12:02:12 +0000 (14:02 +0200)]
freedreno/a6xx: Document threadsize-related fields
We'll need to use if we want to start playing around with thread sizes.
At least now we know what the actual threadsize is.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423>
Mike Blumenkrantz [Tue, 8 Sep 2020 17:00:49 +0000 (13:00 -0400)]
zink: just end the current renderpass in zink_batch_no_rp()
since we aren't (currently) parallelizing and now have barriers, we don't need to cycle
the batch here, which lets us avoid submitting too-small command buffers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9148>
Mike Blumenkrantz [Wed, 9 Sep 2020 19:14:55 +0000 (15:14 -0400)]
zink: break out buffer copying into util function with batch param
if we want to explicitly specify compute batch, we need to be able
to pass that along
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9147>
Mike Blumenkrantz [Wed, 9 Sep 2020 18:36:47 +0000 (14:36 -0400)]
zink: add buffer barriers for resource_copy_region
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9147>
Mike Blumenkrantz [Wed, 16 Sep 2020 17:18:15 +0000 (13:18 -0400)]
zink: just call context destructor on creation fail
this more reliably handles the failure case
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9149>
Mike Blumenkrantz [Fri, 19 Feb 2021 03:03:58 +0000 (22:03 -0500)]
zink: update relnotes
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9151>
Mike Blumenkrantz [Fri, 19 Feb 2021 03:03:39 +0000 (22:03 -0500)]
zink: tag some missing ES features
we're only missing advanced blend
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9151>
Mike Blumenkrantz [Wed, 17 Feb 2021 03:20:08 +0000 (22:20 -0500)]
zink: fix surface creation for cube slices
if first==last layer, this should be a 2D slice of the cube
else if this isn't all the layers, this should be an array of slices
fixes a bunch of spec@arb_shader_image_size@builtin cases
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9080>
Dave Airlie [Thu, 18 Feb 2021 01:19:16 +0000 (17:19 -0800)]
lavapipe: use os_time for timing related things
drop the use of the Linux code.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
Dave Airlie [Thu, 18 Feb 2021 01:10:28 +0000 (17:10 -0800)]
lavapipe: make OPT macro MSVC compatible
This macros is ugly, make it uglier but msvc compatible.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
Dave Airlie [Thu, 18 Feb 2021 01:09:00 +0000 (17:09 -0800)]
lavepipe: some misc msvc fixes
drop some headers, get rid of printflike, drop the __builtin_ffs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
Dave Airlie [Thu, 18 Feb 2021 01:07:54 +0000 (17:07 -0800)]
lavapipe: use msvc compatible 0 init
trivial changes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
Dave Airlie [Thu, 18 Feb 2021 01:06:39 +0000 (17:06 -0800)]
lavapipe: fix some void ptr arithmetic
msvc disagrees with it, and they are trivial to fix.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
Dave Airlie [Thu, 18 Feb 2021 01:05:07 +0000 (17:05 -0800)]
lavapipe/meson: drop megadrivers build req
This just seems to be cut-n-paste, so lose it.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
Dave Airlie [Fri, 19 Feb 2021 00:25:13 +0000 (10:25 +1000)]
lavapipe: implement physical device group enumeration
This was missing when I added physical device groups, and
was causing crashes on win32.
Fixes:
6af87193c ("lavapipe: add basic vulkan device group support.")
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120>
Mike Blumenkrantz [Thu, 10 Sep 2020 18:45:04 +0000 (14:45 -0400)]
zink: be more explicit with image barriers for copy operations
we know the access and pipeline stage here, so we can pass those along
to ensure synchronization
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Tue, 8 Sep 2020 14:08:45 +0000 (10:08 -0400)]
zink: add general zink_resource_barrier() wrapper
this simplifies a bit of code where we may want to be throwing in barriers
regardless of the resource type
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Tue, 8 Sep 2020 14:05:43 +0000 (10:05 -0400)]
zink: zink_resource_barrier -> zink_resource_image_barrier
need this namespace
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Mon, 7 Sep 2020 14:40:21 +0000 (10:40 -0400)]
zink: improve barrier usage for clear functions
ensure that we're always using the right layout for images that are
being cleared
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Mon, 7 Sep 2020 14:39:43 +0000 (10:39 -0400)]
zink: add batch references for resources in clear functions
need to make sure we track these writes
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Mon, 7 Sep 2020 14:35:20 +0000 (10:35 -0400)]
zink: add access info for update_descriptor image barriers
this forces resources to transition where necessary to ensure that
data from previous ops have been made available (e.g., clear -> shader image)
we also switch needs_barrier over to a more accurate signature here since we
can now do it without breaking update_descriptors()
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Mon, 7 Sep 2020 14:34:24 +0000 (10:34 -0400)]
zink: add access param for image resource barriers
we need more detail on some of these to ensure proper synchronization
and availability/visibility of image data between commands/stages
the signature for needs_barrier() is still funky here to avoid breaking
usage in update_descriptors()
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Thu, 20 Aug 2020 13:53:54 +0000 (09:53 -0400)]
zink: add barriers for index and draw param buffers
need to ensure synchronization here too
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 18:50:05 +0000 (14:50 -0400)]
zink: assert batch is not in a renderpass when emitting pipeline barrier
this is only valid for subpasses which have self-dependencies set, and we
don't currently do that
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 18:45:09 +0000 (14:45 -0400)]
zink: take struct zink_batch param instead of direct cmdbuf in barrier helpers
this is weird and prevents us from verifying batch states
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 19:46:08 +0000 (15:46 -0400)]
zink: combine resource barriers where possible during update_descriptors
if we have a resource in the same state for multiple shader stages, we can
emit a single barrier for all the stage bits instead of multiple barriers
this also helps with detecting potentially redundant barriers when we go to
emit them later on
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:47:08 +0000 (11:47 -0400)]
zink: break out barrier transitioning in update_descriptors
this hopefully makes the code a little more readable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 19:44:37 +0000 (15:44 -0400)]
zink: avoid emitting unnecessary pipeline barriers during update_descriptors
if the current state of the resource matches the desired state, we don't need
to emit anything, and we can potentially avoid ending a renderpass
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
Mike Blumenkrantz [Wed, 19 Aug 2020 19:41:41 +0000 (15:41 -0400)]
zink: add generic wrapper for checking whether a resource needs a barrier
handy to not need to check ahead of time
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: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>