platform/upstream/mesa.git
2 years agoradv: remove unused radv_tcs_variant_key:primitive_mode
Samuel Pitoiset [Fri, 24 Sep 2021 09:19:58 +0000 (11:19 +0200)]
radv: remove unused radv_tcs_variant_key:primitive_mode

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

2 years agobroadcom/compiler: remove qpu_acc helper
Alejandro Piñeiro [Mon, 13 Sep 2021 23:15:58 +0000 (01:15 +0200)]
broadcom/compiler: remove qpu_acc helper

It is really small, and used just twice, so we just call qpu_magic.

We also update how it is used:

  * QFILE_NULL is an undef so we can just load anything. Previously we
    were using accumulator 0, but there isn't any real reason to use
    an accumulator for this. Using reg 0.

  * QFILE_LOAD_IMM: it seems that we don't use at all right now, so
    let's add an assert

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008>

2 years agobroadcom/compiler: remove commented out vir_LOAD_IMM methods
Alejandro Piñeiro [Wed, 22 Sep 2021 23:13:13 +0000 (01:13 +0200)]
broadcom/compiler: remove commented out vir_LOAD_IMM methods

It has been commented several years now. Let's remove it to reduce the
noise.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008>

2 years agoradv: stop loading invocation ID for NGG vertex shaders
Samuel Pitoiset [Thu, 23 Sep 2021 10:40:57 +0000 (12:40 +0200)]
radv: stop loading invocation ID for NGG vertex shaders

This is unnecessary and was copied from RadeonSI which needs it for
edge flags. RADV should never to read the invocation ID for VS.

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

2 years agoradv: Remove dead min waves code.
Georg Lehmann [Thu, 23 Sep 2021 20:31:26 +0000 (22:31 +0200)]
radv: Remove dead min waves code.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13005>

2 years agolavapipe/ci: drop some fails I fixed recently
Dave Airlie [Fri, 24 Sep 2021 02:53:03 +0000 (12:53 +1000)]
lavapipe/ci: drop some fails I fixed recently

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13011>

2 years agoanv: Switch to new debug message helpers
Yevhenii Kolesnikov [Thu, 13 May 2021 18:39:09 +0000 (21:39 +0300)]
anv: Switch to new debug message helpers

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>

2 years agovulkan: Add convenience debug message helpers
Yevhenii Kolesnikov [Tue, 21 Sep 2021 22:56:38 +0000 (01:56 +0300)]
vulkan: Add convenience debug message helpers

Forwards the message to both VK_EXT_debug_utils and
VK_EXT_debug_report provided callbacks.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>

2 years agovulkan: Add vk_asprintf and vk_vasprintf helpers
Yevhenii Kolesnikov [Thu, 23 Sep 2021 17:23:33 +0000 (20:23 +0300)]
vulkan: Add vk_asprintf and vk_vasprintf helpers

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>

2 years agovulkan/enum_to_str: Add generator for VkObjectType to Vulkan Handle
Yevhenii Kolesnikov [Tue, 21 Sep 2021 22:50:23 +0000 (01:50 +0300)]
vulkan/enum_to_str: Add generator for VkObjectType to Vulkan Handle

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>

2 years agovulkan: Implement VK_EXT_debug_utils
Yevhenii Kolesnikov [Fri, 2 Apr 2021 15:07:22 +0000 (18:07 +0300)]
vulkan: Implement VK_EXT_debug_utils

This implements all the necessary features of VK_EXT_debug_utils in
common code.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>

2 years agogallium/format: move two vertex formats into the proper place.
Dave Airlie [Thu, 23 Sep 2021 06:07:46 +0000 (16:07 +1000)]
gallium/format: move two vertex formats into the proper place.

These two can be vertex formats with vulkan so lavapipe can
expose them.

Fixes
dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_vertex

Fixes: e002f5a086c7 ("gallium: change pipe_vertex_element::src_format to uint8_t")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12987>

2 years agoradv: Use the shared now-in-core feature/prop extension helper functions.
Emma Anholt [Tue, 21 Sep 2021 22:07:46 +0000 (15:07 -0700)]
radv: Use the shared now-in-core feature/prop extension helper functions.

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

2 years agoanv: Use the shared now-in-core feature/prop extension helper functions.
Emma Anholt [Tue, 21 Sep 2021 22:04:38 +0000 (15:04 -0700)]
anv: Use the shared now-in-core feature/prop extension helper functions.

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

2 years agoturnip: Use the shared now-in-core feature/prop extension helper functions.
Emma Anholt [Tue, 21 Sep 2021 22:04:10 +0000 (15:04 -0700)]
turnip: Use the shared now-in-core feature/prop extension helper functions.

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

2 years agovulkan: Support PHYSICAL_DEVICE_1_n_ features/properties in the helpers.
Emma Anholt [Tue, 21 Sep 2021 23:42:40 +0000 (16:42 -0700)]
vulkan: Support PHYSICAL_DEVICE_1_n_ features/properties in the helpers.

Since we have a filled out struct available, just memcpy it over so the
driver doesn't have to fill it out again.

Suggested by Jason, this is code that isn't copy-and-paste from anv.

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

2 years agovulkan: Add helpers for filling exts for core features and properties.
Emma Anholt [Tue, 21 Sep 2021 22:03:21 +0000 (15:03 -0700)]
vulkan: Add helpers for filling exts for core features and properties.

This is boilerplate that drivers have to replicate, so make a nice helper.
The feature/property macro lists are are copy and pasted from anv, though
the helper functions has been split between 1.1 and 1.2 (and thus the macros
refactored).

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

2 years agolavapipe: Use a common vk_queue structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:32:55 +0000 (15:32 +0300)]
lavapipe: Use a common vk_queue structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agov3dv: Use a common vk_queue structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:30:32 +0000 (15:30 +0300)]
v3dv: Use a common vk_queue structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agoturnip: Use a common vk_queue structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:28:28 +0000 (15:28 +0300)]
turnip: Use a common vk_queue structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agoradv: Use a common vk_queue structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:26:12 +0000 (15:26 +0300)]
radv: Use a common vk_queue structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agoanv: Use a common vk_queue structure
Yevhenii Kolesnikov [Fri, 2 Apr 2021 15:01:01 +0000 (18:01 +0300)]
anv: Use a common vk_queue structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agovulkan: Add a common vk_queue structure
Yevhenii Kolesnikov [Fri, 2 Apr 2021 14:55:14 +0000 (17:55 +0300)]
vulkan: Add a common vk_queue structure

This can be used e.g. for storing debug labels for the common
implementation of VK_EXT_debug_utils.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agolavapipe: Use a common vk_command_buffer structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:19:12 +0000 (15:19 +0300)]
lavapipe: Use a common vk_command_buffer structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agov3dv: Use a common vk_command_buffer structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:13:14 +0000 (15:13 +0300)]
v3dv: Use a common vk_command_buffer structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agoturnip: Use a common vk_command_buffer structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:09:20 +0000 (15:09 +0300)]
turnip: Use a common vk_command_buffer structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agoradv: Use a common vk_command_buffer structure
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:00:53 +0000 (15:00 +0300)]
radv: Use a common vk_command_buffer structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agoanv: Use a common vk_command_buffer structure
Yevhenii Kolesnikov [Fri, 2 Apr 2021 14:57:54 +0000 (17:57 +0300)]
anv: Use a common vk_command_buffer structure

Switch to using common structure.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agovulkan: Add a common vk_command_buffer structure
Yevhenii Kolesnikov [Fri, 2 Apr 2021 14:52:34 +0000 (17:52 +0300)]
vulkan: Add a common vk_command_buffer structure

This can be used e.g. for storing debug labels for the common
implementation of VK_EXT_debug_utils.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>

2 years agoradv/llvm: Don't read edge flags anymore.
Timur Kristóf [Thu, 23 Sep 2021 13:33:02 +0000 (15:33 +0200)]
radv/llvm: Don't read edge flags anymore.

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