Commit Graph

145296 Commits

Author SHA1 Message Date
Jesse Natalie c50bbf1f28 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>
2021-09-23 13:06:41 +00:00
Jesse Natalie a699844ffb 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>
2021-09-23 13:06:41 +00:00
Jesse Natalie c4755a7c32 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>
2021-09-23 13:06:41 +00:00
Jesse Natalie 91e08312d8 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>
2021-09-23 13:06:41 +00:00
Jesse Natalie c3666eec7e 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>
2021-09-23 13:06:41 +00:00
Jesse Natalie 27467700e9 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>
2021-09-23 13:06:41 +00:00
Jesse Natalie 24b096035f 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>
2021-09-23 13:06:41 +00:00
Mike Blumenkrantz 876cb75599 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>
2021-09-23 12:12:42 +00:00
Mike Blumenkrantz dcdb000a7c 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>
2021-09-23 12:12:42 +00:00
Tapani Pälli 205b684725 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>
2021-09-23 11:10:23 +00:00
Joshua Ashton 8564a4c584 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>
2021-09-23 09:08:52 +00:00
Kenneth Graunke 641a12aa29 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>
2021-09-23 08:04:59 +00:00
Dave Airlie b7bfba5983 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: 578190c0fe ("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>
2021-09-23 07:50:21 +00:00
Dave Airlie 6413b2b6a2 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: 5951d2abac ("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>
2021-09-23 07:10:02 +00:00
Samuel Pitoiset cd64535aff 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>
2021-09-23 06:50:40 +00:00
Danylo Piliaiev 978a5ec5d2 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>
2021-09-22 20:37:50 +00:00
Lepton Wu 1a33dca3ae 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>
2021-09-22 20:17:51 +00:00
Yiwei Zhang c1e2dfb365 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>
2021-09-22 19:34:48 +00:00
Mike Blumenkrantz 363ffdaf79 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>
2021-09-22 19:20:07 +00:00
Emma Anholt 30a9bbe8f6 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>
2021-09-22 10:54:50 -07:00
Emma Anholt e470d9fae5 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>
2021-09-22 10:54:40 -07:00
Yiwei Zhang 705b62d559 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>
2021-09-22 17:18:38 +00:00
Mike Blumenkrantz 400da4900e 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>
2021-09-22 09:59:29 -04:00
Icecream95 0c2f7a16bf 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>
2021-09-22 12:01:43 +00:00
Boris Brezillon d47a8789f9 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: de13fdc251 ("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>
2021-09-22 11:43:10 +00:00
Jordan Justen d4174f5f05 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: e435511b58 ("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>
2021-09-22 02:32:05 -07:00
Jordan Justen c746bf4c5c 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: e435511b58 ("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>
2021-09-22 02:32:05 -07:00
Mike Blumenkrantz 039ed2de94 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>
2021-09-21 23:34:49 +00:00
Emma Anholt 13384b9626 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>
2021-09-21 23:06:42 +00:00
Emma Anholt 5a39938b00 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>
2021-09-21 23:06:42 +00:00
Emma Anholt 8a3e94c619 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>
2021-09-21 22:43:43 +00:00
Emma Anholt c0c5c0d557 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>
2021-09-21 22:43:43 +00:00
Emma Anholt fa5cc38f5b 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>
2021-09-21 22:43:43 +00:00
Eric Anholt 24a539e94c 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>
2021-09-21 22:43:43 +00:00
Eric Anholt ab5e77d854 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>
2021-09-21 22:43:43 +00:00
Eric Anholt 14eb5ca3cd tu: Move core features definitions to a helper function.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12944>
2021-09-21 22:43:43 +00:00
Caio Marcelo de Oliveira Filho 895cfca641 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>
2021-09-21 21:55:54 +00:00
Caio Marcelo de Oliveira Filho 47f7b262e1 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>
2021-09-21 21:35:20 +00:00
Caio Marcelo de Oliveira Filho 9add809e7f 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>
2021-09-21 21:35:20 +00:00
Christian Gmeiner ca0f892191 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner eae96d0c4c 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner f0104a6c72 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner bc2e806b0f 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner 6801c300a8 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner b63becc430 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner dbb9d3d0e3 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner 9dc2ef7200 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner 430dc08755 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner 1a8048954d 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>
2021-09-21 20:25:31 +00:00
Christian Gmeiner a6b82d1c8c 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>
2021-09-21 20:25:31 +00:00