platform/upstream/mesa.git
2 years agoac/nir: Emit edge flag instructions conditionally.
Timur Kristóf [Fri, 17 Sep 2021 19:36:21 +0000 (21:36 +0200)]
ac/nir: Emit edge flag instructions conditionally.

They are not needed by RADV but will be needed by RadeonSI.

Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 56917 (44.24% of 128647) affected shaders:
VGPRs: 1982664 -> 1975936 (-0.34%); split: -0.43%, +0.09%
CodeSize: 152790880 -> 149510316 (-2.15%); split: -2.15%, +0.00%
MaxWaves: 1617984 -> 1621900 (+0.24%)
Instrs: 29272825 -> 28907038 (-1.25%); split: -1.26%, +0.01%
Latency: 128744182 -> 127565678 (-0.92%); split: -1.14%, +0.22%
InvThroughput: 20125915 -> 19805168 (-1.59%); split: -1.63%, +0.03%
VClause: 521312 -> 519804 (-0.29%); split: -0.77%, +0.48%
SClause: 688861 -> 688897 (+0.01%); split: -0.04%, +0.05%
Copies: 3205421 -> 3177799 (-0.86%); split: -1.68%, +0.82%
Branches: 1181457 -> 1183147 (+0.14%); split: -0.03%, +0.17%
PreVGPRs: 1626681 -> 1595406 (-1.92%)

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/12998>

2 years agoradv: Disable HW generated edge flags for NGG shaders.
Timur Kristóf [Fri, 17 Sep 2021 19:35:25 +0000 (21:35 +0200)]
radv: Disable HW generated edge flags for NGG shaders.

Vulkan doesn't support user edge flags, and also doesn't have
any decomposed primitives where drawing internal edges should
be disallowed. Hence, we don't need this.

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/12998>

2 years agomicrosoft/clc: Add a test for specializing via SPIRV-Tools
Jesse Natalie [Mon, 19 Apr 2021 12:38:42 +0000 (05:38 -0700)]
microsoft/clc: Add a test for specializing via SPIRV-Tools

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Add API to independently specialize SPIR-V
Jesse Natalie [Mon, 19 Apr 2021 14:14:24 +0000 (07:14 -0700)]
microsoft/clc: Add API to independently specialize SPIR-V

We need the ability to specialize unlinked SPIR-V, so use SPIR-V tools
to specialize prior to linking.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Support passing specialization consts to spirv_to_nir
Jesse Natalie [Mon, 19 Apr 2021 14:10:59 +0000 (07:10 -0700)]
microsoft/clc: Support passing specialization consts to spirv_to_nir

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Parse SPIR-V specialization consts into metadata
Jesse Natalie [Mon, 19 Apr 2021 14:09:58 +0000 (07:09 -0700)]
microsoft/clc: Parse SPIR-V specialization consts into metadata

We need to be able to validate at the API that set specialization consts
have a valid ID and the value is the correct size.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Support SPIR intermediates in the compilation APIs
Jesse Natalie [Mon, 19 Apr 2021 13:58:56 +0000 (06:58 -0700)]
microsoft/clc: Support SPIR intermediates in the compilation APIs

We can now export SPIR (mainly just for testing) or import SPIR and
convert to SPIR-V.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Split clc_object and rename entrypoints
Jesse Natalie [Mon, 19 Apr 2021 13:54:13 +0000 (06:54 -0700)]
microsoft/clc: Split clc_object and rename entrypoints

clc_object was overloaded, containing SPIR-V binary and metadata,
and it would only sometimes contain metadata (after linking). Split
it into a more generic clc_binary class which holds some type of data
(the kind depends on where it came from), and clc_metadata which can
be independently parsed on compiled or linked data.

Rename a couple entrypoints to be more explicit about what they're
actually transforming (c_to_spirv, link_spirv, spirv_to_dxil).

Add a logger to SPIR-V binary parsing so it can report errors on app-
provided SPIR-V.

Re-order helper function parameters to be more consistent (out params last).

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Stop heap-allocating tiny fixed-size transparent structs
Jesse Natalie [Mon, 19 Apr 2021 13:31:05 +0000 (06:31 -0700)]
microsoft/clc: Stop heap-allocating tiny fixed-size transparent structs

The caller can allocate these however they want. They don't need
independent allocations. Removes some unnecessary failure handling.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Clean up clc_context
Jesse Natalie [Mon, 19 Apr 2021 13:00:50 +0000 (06:00 -0700)]
microsoft/clc: Clean up clc_context

1. Rename it to libclc to match what it is
2. Make it opaque externally
3. Remove it from non-essential entrypoints (compile/link)

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agomicrosoft/clc: Rename compiler DLL to clon12compiler
Jesse Natalie [Sat, 17 Apr 2021 14:03:17 +0000 (07:03 -0700)]
microsoft/clc: Rename compiler DLL to clon12compiler

I no longer think there's value in trying to share code on disk here between
CL and GL at runtime, especially since we're now just building GL without LLVM

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>

2 years agozink: check for pending memory barrier before trying to flush it
Mike Blumenkrantz [Fri, 17 Sep 2021 13:06:49 +0000 (09:06 -0400)]
zink: check for pending memory barrier before trying to flush it

this function is surprisingly heavy to call unnecessarily

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12932>

2 years agozink: clean up texture_barrier hook a little
Mike Blumenkrantz [Mon, 13 Sep 2021 14:02:11 +0000 (10:02 -0400)]
zink: clean up texture_barrier hook a little

this looked dumb

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12932>

2 years agomesa: GL_ARB_ES3_2_compatibility GL compat profile support
Tapani Pälli [Thu, 16 Sep 2021 10:49:25 +0000 (13:49 +0300)]
mesa: GL_ARB_ES3_2_compatibility GL compat profile support

Patch removes 'desktop=false' from aliased function, otherwise
glPrimitiveBoundingBox[ARB] cannot be retrieved via GetProcAddress.
This was seen with new OpenGL 4.5 tests that utilize
GL_ARB_ES3_2_compatibility and bounding box API.

v2: fixes to display list support (Ilia Mirkin)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12846>

2 years agoradv: Push box traversal results onto stack in correct order
Joshua Ashton [Tue, 21 Sep 2021 15:05:53 +0000 (16:05 +0100)]
radv: Push box traversal results onto stack in correct order

Currently, it's pushing from lowest distance to highest distance, so when these are popped off the stack, we start at the highest distance to lowest.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12960>

2 years agointel: Finish off the last scraps of bacon
Kenneth Graunke [Thu, 23 Sep 2021 04:47:19 +0000 (21:47 -0700)]
intel: Finish off the last scraps of bacon

The bacon is long past its expiration date and has got to go.
Composting it in the flower-beds was probably inadvisable.
So we shall throw it away.

(Originally, I imported libdrm_intel into i965, but to avoid symbol
conflicts, renamed drm_intel_* to drm_bacon_* as it was the same number
of letters and we needed an arbitrary name.  After slicing-and-dicing
away most of the fat, er, code, we renamed it to brw_bufmgr...except
for apparently this comment, which then got replicated to both iris
and crocus.  Originally it served to indicate what file contained these
functions, but bufmgr.h having prototypes for bufmgr.c is obvious, so
just delete the silly comment.  No bacon for you!)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12985>

2 years agolavapipe: don't access pColorBlendState when not legal
Dave Airlie [Thu, 23 Sep 2021 02:48:57 +0000 (12:48 +1000)]
lavapipe: don't access pColorBlendState when not legal

This state isn't valid unless some conditions are met.

Fixes VK-GL-CTS
dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics

Fixes: 578190c0fedd ("lavapipe: implement VK_EXT_color_write_enable")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12984>

2 years agolavapipe: fix vertex attributes/descriptor binding
Dave Airlie [Thu, 23 Sep 2021 01:05:18 +0000 (11:05 +1000)]
lavapipe: fix vertex attributes/descriptor binding

Yo' dawg, I heard you like bindings in your bindings.

When you have VertexAttribs with a binding, it's not an index into
the VertexBindings, you have to match it to the VertexBinding
with the same binding value.

This fixes
dEQP-VK.pipeline.extended_dynamic_state.after_pipelines.vertex_input_multiple_bindings
and some others.

Fixes: 5951d2abacd3 ("lavapipe: implement EXT_vertex_input_dynamic_state")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12983>

2 years agoradv: remove useless shader variant key copies for VS+TCS
Samuel Pitoiset [Wed, 22 Sep 2021 13:40:14 +0000 (15:40 +0200)]
radv: remove useless shader variant key copies for VS+TCS

It's unnecessary.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12976>

2 years agoturnip: Move to common DEFINE_HANDLE_CASTS casting macro
Danylo Piliaiev [Tue, 21 Sep 2021 11:36:32 +0000 (14:36 +0300)]
turnip: Move to common DEFINE_HANDLE_CASTS casting macro

We create some VK objects internally, so we have to set type
for them.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12957>

2 years agovirgl: Add an option to disable coherent
Lepton Wu [Tue, 21 Sep 2021 23:30:34 +0000 (16:30 -0700)]
virgl: Add an option to disable coherent

This breaks almost every android apps when running with crosvm+minigbm.
Add an option so we can disable it.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12968>

2 years agovenus: amend supported extensions list
Yiwei Zhang [Wed, 22 Sep 2021 18:13:32 +0000 (18:13 +0000)]
venus: amend supported extensions list

Below were missed in the last update:
VK_KHR_incremental_present
VK_KHR_swapchain_mutable_format

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12980>

2 years agozink: don't use legacy scanout with modifiers
Mike Blumenkrantz [Fri, 17 Sep 2021 19:51:15 +0000 (15:51 -0400)]
zink: don't use legacy scanout with modifiers

legacy_scanout is for adding implicit modifiers when modifiers aren't provided,
so it can't be used with explicit modifiers

also jekstrand said no.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12930>

2 years agoci/vc4,i915g: Add links to VK-GL-CTS issues for some of our xfails.
Emma Anholt [Mon, 20 Sep 2021 18:35:09 +0000 (11:35 -0700)]
ci/vc4,i915g: Add links to VK-GL-CTS issues for some of our xfails.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12962>

2 years agomesa: Fix missing CopyTexImage formats for OES_required_internalformat.
Emma Anholt [Mon, 20 Sep 2021 18:31:32 +0000 (11:31 -0700)]
mesa: Fix missing CopyTexImage formats for OES_required_internalformat.

All our GLES2-only divers were failing these KHR tests because we were
missing new OES_required_internalformat internalformats for CopyTexImage.

Cc: mesa-stable
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12962>

2 years agodocs: update vn extension list
Yiwei Zhang [Wed, 22 Sep 2021 06:33:17 +0000 (06:33 +0000)]
docs: update vn extension list

VK_KHR_external_fence_fd
VK_KHR_external_memory_fd
VK_KHR_external_semaphore_fd
VK_KHR_swapchain
VK_EXT_external_memory_dma_buf
VK_EXT_image_drm_format_modifier
VK_EXT_queue_family_foreign
VK_ANDROID_external_memory_android_hardware_buffer
VK_ANDROID_native_buffer

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12969>

2 years agozink: fix ci skips
Mike Blumenkrantz [Wed, 22 Sep 2021 13:59:29 +0000 (09:59 -0400)]
zink: fix ci skips

these are run from a lot of test groups, so block all of them

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12977>

2 years agopan/mdg: Remove use of global variables in disassembler
Icecream95 [Mon, 20 Sep 2021 09:40:54 +0000 (21:40 +1200)]
pan/mdg: Remove use of global variables in disassembler

Fixes incorrect disassembly and crashes when disassembling from
multiple threads at once.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12975>

2 years agopan/decode: Fix DCD size in Pre frame decoding
Boris Brezillon [Wed, 22 Sep 2021 06:48:38 +0000 (08:48 +0200)]
pan/decode: Fix DCD size in Pre frame decoding

DCD size on Bifrost is supposed to be 32 words wide, but this change
will only happen after the per-gen XML split. We have to manually append
the DRAW_PADDING for now.

Fixes: de13fdc251fa ("panfrost: Prepare pandecode to per-gen XML")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12970>

2 years agoiris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13
Jordan Justen [Thu, 16 Sep 2021 22:40:21 +0000 (15:40 -0700)]
iris: Disable I915_FORMAT_MOD_Y_TILED_GEN12* on adl-p/display 13

Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12908
Cc: mesa-stable
Fixes: e435511b580 ("intel/dev: Add device info for ADL GT2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12973>

2 years agointel/dev: Add display_ver and set adl-p to 13
Jordan Justen [Thu, 16 Sep 2021 22:39:11 +0000 (15:39 -0700)]
intel/dev: Add display_ver and set adl-p to 13

Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12908
Cc: mesa-stable
Fixes: e435511b580 ("intel/dev: Add device info for ADL GT2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12973>

2 years agozink: always use type size for query result copy stride
Mike Blumenkrantz [Mon, 30 Aug 2021 15:08:00 +0000 (11:08 -0400)]
zink: always use type size for query result copy stride

0 should be legal here since this is only copying 1 result at a time,
but some drivers can't withstand the awesome power of zero strides, so
just be safe and pass the type size

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12933>

2 years agomesa: Prioritize checking for GLES2's uniform transpose error.
Emma Anholt [Sat, 18 Sep 2021 21:04:00 +0000 (14:04 -0700)]
mesa: Prioritize checking for GLES2's uniform transpose error.

The negative API tests ask to transpose a non-matrix uniform, and expect
the transpose error rather than the non-matrix error.  This may be a test
bug about ambiguous results, but since every other driver is presumably
doing this too, just follow along.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12924>

2 years agomesa: Throw an error for compressed glGenerateMipmap on GLES2 contexts.
Emma Anholt [Sat, 18 Sep 2021 20:48:41 +0000 (13:48 -0700)]
mesa: Throw an error for compressed glGenerateMipmap on GLES2 contexts.

This error is gone from GLES3.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12924>

2 years agoturnip: Move physical device 1.2 properties to a helper function.
Emma Anholt [Mon, 20 Sep 2021 20:01:22 +0000 (13:01 -0700)]
turnip: Move physical device 1.2 properties to a helper function.

Again, while we don't do 1.2 yet (and we have some properties to fill out
to do so), this prevents value duplication when we do.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944>

2 years agotu: Support VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES.
Emma Anholt [Mon, 20 Sep 2021 19:46:34 +0000 (12:46 -0700)]
tu: Support VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES.

We had missed this struct previously, causing a CTS fail.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944>

2 years agotu: Move VK 1.1 core properties to a helper function and use macros for exts.
Emma Anholt [Mon, 20 Sep 2021 19:41:22 +0000 (12:41 -0700)]
tu: Move VK 1.1 core properties to a helper function and use macros for exts.

This struct is exposed in VK 1.2, and using the macros means we don't have
to duplicate the values.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944>

2 years agotu: Add GetPhysicalDeviceFeatures2() support for more VK 1.2 core features.
Eric Anholt [Thu, 12 Nov 2020 22:21:05 +0000 (14:21 -0800)]
tu: Add GetPhysicalDeviceFeatures2() support for more VK 1.2 core features.

You can get them from the big blob of features, or through
extension-specific structs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944>

2 years agotu: Deduplicate extension/core feature flags.
Eric Anholt [Thu, 12 Nov 2020 21:52:42 +0000 (13:52 -0800)]
tu: Deduplicate extension/core feature flags.

Copied this pattern from the anv driver.  Now it's harder to desynchronize
your features.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944>

2 years agotu: Move core features definitions to a helper function.
Eric Anholt [Thu, 12 Nov 2020 21:47:15 +0000 (13:47 -0800)]
tu: Move core features definitions to a helper function.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944>

2 years agospirv: Identify non-temporal memory access
Caio Marcelo de Oliveira Filho [Mon, 20 Sep 2021 17:52:35 +0000 (10:52 -0700)]
spirv: Identify non-temporal memory access

Map it to the existing ACCESS_STREAM_CACHE_POLICY access mode.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12945>

2 years agoanv: Refactor subgroup_size_type rules into a single function
Caio Marcelo de Oliveira Filho [Fri, 17 Sep 2021 00:57:41 +0000 (17:57 -0700)]
anv: Refactor subgroup_size_type rules into a single function

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12946>

2 years agoanv: Simplify subgroup_size_type rules for compute shaders
Caio Marcelo de Oliveira Filho [Fri, 17 Sep 2021 00:52:38 +0000 (17:52 -0700)]
anv: Simplify subgroup_size_type rules for compute shaders

The populate_base_prog_key will set VARYING depending if the pipeline
flag is used.  Later, when full subgroups flag is set, it will flip to
UNIFORM -- which for compute shaders is effectively the same, so don't
bother setting it again.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12946>

2 years agocompiler/isaspec: add alignment support
Christian Gmeiner [Wed, 14 Jul 2021 21:30:59 +0000 (23:30 +0200)]
compiler/isaspec: add alignment support

This helps to get a really nice and aligend disasm output.
Just use :align=X to define where in the line the field
should be printed.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agocompiler/isaspec: keep track of written data
Christian Gmeiner [Wed, 14 Jul 2021 21:23:49 +0000 (23:23 +0200)]
compiler/isaspec: keep track of written data

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agocompiler/isaspec: add print(..) helper
Christian Gmeiner [Fri, 18 Jun 2021 19:26:29 +0000 (21:26 +0200)]
compiler/isaspec: add print(..) helper

To support field alignment we need to keep track of how much
data we have printed to our out FILE. This is a prep commit.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: move isaspec to a new home
Christian Gmeiner [Fri, 28 May 2021 20:52:45 +0000 (22:52 +0200)]
freedreno/isa: move isaspec to a new home

This commit moves isaspec out of freedreno into a more
generic new home - src/compiler/isaspec.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add shbang and make executable
Christian Gmeiner [Fri, 28 May 2021 20:41:24 +0000 (22:41 +0200)]
freedreno/isa: add shbang and make executable

In a later change we will use mesons find_program(..) and this
only works if python files are executable and have a shbang.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: update documentation
Christian Gmeiner [Thu, 22 Jul 2021 17:09:35 +0000 (19:09 +0200)]
freedreno/isa: update documentation

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: encode: switch bitmask_t to BITSET_WORD's
Christian Gmeiner [Sat, 17 Jul 2021 19:08:27 +0000 (21:08 +0200)]
freedreno/isa: encode: switch bitmask_t to BITSET_WORD's

This commit changes the underlying basetype of bitmask_t to a
BITSET_WORD based one.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: decode: switch bitmask_t to BITSET_WORD's
Christian Gmeiner [Sat, 8 May 2021 09:28:00 +0000 (11:28 +0200)]
freedreno/isa: decode: switch bitmask_t to BITSET_WORD's

This commit changes the underlying basetype of bitmask_t to a
BITSET_WORD based one.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add split_bits(..) methods
Christian Gmeiner [Fri, 28 May 2021 08:15:24 +0000 (10:15 +0200)]
freedreno/isa: add split_bits(..) methods

Will be used to split a value into needed number of 32 bit words.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: generate marcos used for printf(..)
Christian Gmeiner [Fri, 28 May 2021 08:00:36 +0000 (10:00 +0200)]
freedreno/isa: generate marcos used for printf(..)

Generate correct BITSET_FORMAT and BITSET_VALUE macros based
on the maximum needed ISA bits.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add store_instruction(..)
Christian Gmeiner [Thu, 22 Jul 2021 17:03:40 +0000 (19:03 +0200)]
freedreno/isa: add store_instruction(..)

Makes it possible to store an encoded instruction in a
generic ISA specific way.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add BITMASK_WORDS define
Christian Gmeiner [Mon, 17 May 2021 14:31:20 +0000 (16:31 +0200)]
freedreno/isa: add BITMASK_WORDS define

This new define will be used by a more generic deocde(..)
and encode(..) functions.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add bitmask to/from uint64_t helper
Christian Gmeiner [Sun, 16 May 2021 07:55:59 +0000 (09:55 +0200)]
freedreno/isa: add bitmask to/from uint64_t helper

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add bitmask_t to encode.py
Christian Gmeiner [Thu, 22 Jul 2021 16:53:51 +0000 (18:53 +0200)]
freedreno/isa: add bitmask_t to encode.py

Prep work for the next change.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: generate isaspec-decode.h
Christian Gmeiner [Tue, 8 Jun 2021 16:21:47 +0000 (18:21 +0200)]
freedreno/isa: generate isaspec-decode.h

Generate a 'glue' header file to be able to support different
ISAs.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: generate ir3-isa.h
Christian Gmeiner [Thu, 13 May 2021 12:07:51 +0000 (14:07 +0200)]
freedreno/isa: generate ir3-isa.h

This header contains the bitmask_t struct typedef that will be
used by the isaspec.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: store max size for needed bitset
Christian Gmeiner [Tue, 11 May 2021 06:10:00 +0000 (08:10 +0200)]
freedreno/isa: store max size for needed bitset

We will use this information later to create a correctly
sized BITSET.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add defines for fprintf(..) usage
Christian Gmeiner [Tue, 25 May 2021 07:19:17 +0000 (09:19 +0200)]
freedreno/isa: add defines for fprintf(..) usage

In the long run they will be replaces with some generated
defines. If we do this early it keeps the diffs of the next
changes small.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add next_instruction(..)
Christian Gmeiner [Mon, 17 May 2021 19:50:55 +0000 (21:50 +0200)]
freedreno/isa: add next_instruction(..)

In during the next commits we will change to a generated
version of next_instruction(..) based on the actual isa.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: simplify custom_target
Christian Gmeiner [Tue, 11 May 2021 06:05:04 +0000 (08:05 +0200)]
freedreno/isa: simplify custom_target

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agofreedreno/isa: add leading zero's
Christian Gmeiner [Wed, 14 Jul 2021 19:48:04 +0000 (21:48 +0200)]
freedreno/isa: add leading zero's

Changes the output format slightly but its needed when we
want to switch to more generic version of isaspec.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/tests: add set bit range test
Christian Gmeiner [Wed, 12 May 2021 17:47:14 +0000 (19:47 +0200)]
util/tests: add set bit range test

This simple test validates that it is possible to set bits
across word bounary.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/bitset: add BITSET_SET_RANGE(..)
Christian Gmeiner [Wed, 12 May 2021 17:46:12 +0000 (19:46 +0200)]
util/bitset: add BITSET_SET_RANGE(..)

This version works across word boundary.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/bitset: s/BITSET_SET_RANGE/BITSET_SET_RANGE_INSIDE_WORD
Christian Gmeiner [Fri, 20 Aug 2021 10:14:02 +0000 (12:14 +0200)]
util/bitset: s/BITSET_SET_RANGE/BITSET_SET_RANGE_INSIDE_WORD

Prep work for the next commit.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/tests: add bitset SHL tests
Christian Gmeiner [Fri, 9 Jul 2021 12:14:31 +0000 (14:14 +0200)]
util/tests: add bitset SHL tests

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/bitset: add left shift
Christian Gmeiner [Fri, 9 Jul 2021 12:13:51 +0000 (14:13 +0200)]
util/bitset: add left shift

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/tests: add bitset SHR tests
Christian Gmeiner [Tue, 11 May 2021 06:01:50 +0000 (08:01 +0200)]
util/tests: add bitset SHR tests

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/bitset: add right shift
Christian Gmeiner [Tue, 11 May 2021 06:00:54 +0000 (08:00 +0200)]
util/bitset: add right shift

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/tests: add bitwise AND, OR and NOT tests
Christian Gmeiner [Fri, 7 May 2021 07:53:31 +0000 (09:53 +0200)]
util/tests: add bitwise AND, OR and NOT tests

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/bitset: add bitwise AND, OR and NOT
Christian Gmeiner [Fri, 7 May 2021 07:51:01 +0000 (09:51 +0200)]
util/bitset: add bitwise AND, OR and NOT

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agoutil/tests: rename bitset test names
Christian Gmeiner [Tue, 6 Jul 2021 15:17:55 +0000 (17:17 +0200)]
util/tests: rename bitset test names

Imho they are quite hard to read with the added '_'.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11321>

2 years agodocs/panfrost: Add web chat link
Alyssa Rosenzweig [Tue, 21 Sep 2021 18:50:39 +0000 (14:50 -0400)]
docs/panfrost: Add web chat link

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Git Lab <gh6h56j85ihg@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12380>

2 years agodocs/panfrost: We're conformant now!
Alyssa Rosenzweig [Tue, 21 Sep 2021 18:45:35 +0000 (14:45 -0400)]
docs/panfrost: We're conformant now!

See https://www.khronos.org/conformance/adopters/conformant-products/opengles#submission_949

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12965>

2 years agointel/fs: Handle required subgroup sizes specified in the SPIR-V
Jason Ekstrand [Mon, 14 Sep 2020 18:44:42 +0000 (13:44 -0500)]
intel/fs: Handle required subgroup sizes specified in the SPIR-V

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12959>

2 years agospirv: Handle the SubgroupSize execution mode
Jason Ekstrand [Mon, 14 Sep 2020 18:39:47 +0000 (13:39 -0500)]
spirv: Handle the SubgroupSize execution mode

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12959>

2 years agosvga: fix render target views leak
Charmaine Lee [Mon, 20 Sep 2021 21:48:33 +0000 (14:48 -0700)]
svga: fix render target views leak

Use create_backed_surface_view helper function to create/reuse
alternate surface view when the to-be-bound surface view was created
in a different context. This fixes render target views leak running gazebo.

Cc: mesa-stable
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12952>

2 years agodocs: update calendar and link releases notes for 21.2.2
Dylan Baker [Tue, 21 Sep 2021 17:23:35 +0000 (10:23 -0700)]
docs: update calendar and link releases notes for 21.2.2

I've also adjusted the calender to account for missed releases

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12963>

2 years agodocs/relnotes/21.2.2: Add SHA256 sum
Dylan Baker [Tue, 21 Sep 2021 17:14:30 +0000 (10:14 -0700)]
docs/relnotes/21.2.2: Add SHA256 sum

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12963>

2 years agodocs: add release notes for 21.2.2
Dylan Baker [Tue, 21 Sep 2021 16:52:15 +0000 (09:52 -0700)]
docs: add release notes for 21.2.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12963>

2 years agofreedreno/a5xx+: Set the IJ_LINEAR_* request bits if we need the regs.
Emma Anholt [Mon, 20 Sep 2021 21:55:56 +0000 (14:55 -0700)]
freedreno/a5xx+: Set the IJ_LINEAR_* request bits if we need the regs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12949>

2 years agofreedreno/a5xx+: Rename GRAS_CNTL/RB_RENDER_CONTROL0 IJ_LINEAR_* bits.
Emma Anholt [Mon, 20 Sep 2021 21:48:15 +0000 (14:48 -0700)]
freedreno/a5xx+: Rename GRAS_CNTL/RB_RENDER_CONTROL0 IJ_LINEAR_* bits.

This is what they actually enable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12949>

2 years agopanvk: Implement vkCmdUpdateBuffer()
Boris Brezillon [Fri, 10 Sep 2021 09:38:00 +0000 (11:38 +0200)]
panvk: Implement vkCmdUpdateBuffer()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Implement vkCmdFillBuffer()
Boris Brezillon [Fri, 10 Sep 2021 09:37:33 +0000 (11:37 +0200)]
panvk: Implement vkCmdFillBuffer()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Implement vkCmdCopyBuffer()
Boris Brezillon [Wed, 8 Sep 2021 08:17:03 +0000 (10:17 +0200)]
panvk: Implement vkCmdCopyBuffer()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Implement vkCmdCopyImageToBuffer()
Boris Brezillon [Wed, 8 Sep 2021 08:14:21 +0000 (10:14 +0200)]
panvk: Implement vkCmdCopyImageToBuffer()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Implement vkCmdCopyBufferToImage()
Boris Brezillon [Wed, 8 Sep 2021 08:12:32 +0000 (10:12 +0200)]
panvk: Implement vkCmdCopyBufferToImage()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Implement vkCmdCopyImage()
Boris Brezillon [Wed, 8 Sep 2021 08:02:11 +0000 (10:02 +0200)]
panvk: Implement vkCmdCopyImage()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Implement vkCmdClear{DepthStencil,Color}Image()
Boris Brezillon [Tue, 7 Sep 2021 16:24:11 +0000 (18:24 +0200)]
panvk: Implement vkCmdClear{DepthStencil,Color}Image()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Issue a fragment job if at least one target is cleared
Boris Brezillon [Thu, 9 Sep 2021 16:12:19 +0000 (18:12 +0200)]
panvk: Issue a fragment job if at least one target is cleared

This way clear meta helpers don't have to allocate fragment job
themselves.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Stop dereferencing the subpass in panvk_cmd_close_batch()
Boris Brezillon [Thu, 9 Sep 2021 13:04:56 +0000 (15:04 +0200)]
panvk: Stop dereferencing the subpass in panvk_cmd_close_batch()

So we can call this function from the meta helpers which won't bind
a subpass to the cmd state.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Add a panvk_cmd_prepare_tiler_context() helper
Boris Brezillon [Tue, 7 Sep 2021 17:19:43 +0000 (19:19 +0200)]
panvk: Add a panvk_cmd_prepare_tiler_context() helper

So we can create tiler contexts from meta helpers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Make panvk_cmd_alloc_tls_desc() more generic
Boris Brezillon [Tue, 7 Sep 2021 17:18:24 +0000 (19:18 +0200)]
panvk: Make panvk_cmd_alloc_tls_desc() more generic

panvk_cmd_alloc_tls_desc() will soon be called from meta helpers which
don't bind a pipeline to the cmdbuf state. Let's pass the gfx/compute
info directly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Don't check the bind_point in panvk_cmd_prepare_fragment_job()
Boris Brezillon [Tue, 7 Sep 2021 17:15:41 +0000 (19:15 +0200)]
panvk: Don't check the bind_point in panvk_cmd_prepare_fragment_job()

We are about to call panvk_cmd_close_batch() from meta helpers, and
those don't bind a pipeline, so let's drop the check in
panvk_cmd_prepare_fragment_job().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Don't use the subpass to calculate the FB descriptor size
Boris Brezillon [Tue, 7 Sep 2021 16:22:44 +0000 (18:22 +0200)]
panvk: Don't use the subpass to calculate the FB descriptor size

This way we will be able to re-use panvk_cmd_alloc_fb_desc() for
meta stuff.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Get rid of panvk_emit_fragment_job()
Boris Brezillon [Tue, 7 Sep 2021 15:41:47 +0000 (17:41 +0200)]
panvk: Get rid of panvk_emit_fragment_job()

Now that we have a valid pan_fb_info attached to the state, we can
use pan_emit_fragment_job() directly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Move blit/resolve stubs to a separate file
Boris Brezillon [Wed, 8 Sep 2021 07:37:50 +0000 (09:37 +0200)]
panvk: Move blit/resolve stubs to a separate file

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>

2 years agopanvk: Move copy stubs to a separate file
Boris Brezillon [Wed, 8 Sep 2021 07:34:20 +0000 (09:34 +0200)]
panvk: Move copy stubs to a separate file

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>