Mike Blumenkrantz [Fri, 14 Jan 2022 14:51:20 +0000 (09:51 -0500)]
zink: add nir_intrinsic_image_deref_sparse_load to image scanning in compiler
this flags the shader as having image use
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 15:58:29 +0000 (10:58 -0500)]
zink: always pass shader info to ntv
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 14 Jan 2022 14:45:17 +0000 (09:45 -0500)]
zink: rename zink_so_info -> zink_shader_info
start passing more useful info to ntv
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Thu, 13 Jan 2022 17:27:10 +0000 (12:27 -0500)]
zink: handle residency return value from sparse texture instructions
this one's a bit tricky since vulkan doesn't support vec5, the return from
the instructions is a struct, and I don't want to add temp var support to zink
now instead the process for these ops is:
* rewrite the is_sparse_texels_resident instruction to read the first vec member of the texop
* (temporarily) decrement num_components for sparse texop's dest to get real result size
* wrap texop's return type in spirv-required struct(uint, result)
* unwrap struct, store result normally + store residency info to separate array
* for is_sparse_texels_resident, ignore the mov alu for src[0] and instead use the ssa index
from the parent instr since this is the original texop that was used to store the residency result
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Thu, 13 Jan 2022 17:26:45 +0000 (12:26 -0500)]
zink: always set actual_dest_type for ntv tex instruction emission
no-op for now
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Thu, 13 Jan 2022 17:25:58 +0000 (12:25 -0500)]
zink: implement sparse shader instructions in ntv
this automatically wraps the results into the required struct(int, result) type,
handling will come next
note that there is no cts coverage for sparseImageLoadARB, so this is purely
hypothetical
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:34:44 +0000 (14:34 -0500)]
zink: fake sparse R9G9B9E5 support as needed
these just allocate the whole thing now, which means they aren't actually
sparse, but who cares because nobody but cts is actually going to use it
and those tests pass just fine
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 7 Jan 2022 17:58:06 +0000 (12:58 -0500)]
zink: stop allocating such massive staging regions for buffer maps
this would allocate a new stream uploader for every map if the offset was
large (e.g., all sparse buffer usage), which almost immediately consumes all vram
cc: mesa-stable
fixes KHR-GL46.CommonBugs.CommonBug_SparseBuffersWithCopyOps
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Fri, 7 Jan 2022 17:56:31 +0000 (12:56 -0500)]
zink: allow sparse buffers to be suballocated
this is now symmetrical since the backing memory was being cached,
and there's no reason not to allow this since memory is no longer in use
by the time it gets returned to the cache
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:33:12 +0000 (14:33 -0500)]
zink: support sparse texture range commits
this is a bit duplicated because the buffer and image commit code is
a little shared but not enough to combine without becoming spaghetti
this will only get worse once multisampling is supported
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:34:30 +0000 (14:34 -0500)]
zink: set up image create bits for sparse textures
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Mike Blumenkrantz [Mon, 3 Jan 2022 19:32:32 +0000 (14:32 -0500)]
zink: add get_sparse_texture_virtual_page_size hook
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14381>
Danylo Piliaiev [Wed, 19 Jan 2022 17:43:39 +0000 (19:43 +0200)]
tu: expose VK_KHR_copy_commands2
Relevant CTS tests:
dEQP-VK.api.copy_and_blit.copy_commands2.*
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14623>
Charles Giessen [Fri, 14 Jan 2022 18:14:39 +0000 (12:14 -0600)]
v3dv: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:13:30 +0000 (12:13 -0600)]
freedreno, tu: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:11:24 +0000 (12:11 -0600)]
lavapipe: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:07:25 +0000 (12:07 -0600)]
anv: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 18:05:46 +0000 (12:05 -0600)]
panvk: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Charles Giessen [Fri, 14 Jan 2022 17:56:43 +0000 (11:56 -0600)]
radv: Update LoaderICDInterfaceVersion to v5
With the proper version checking in the common vulkan instance code
(commit 88b9b68) it is now possible to bring the reported interface
version up to v5.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14563>
Dave Airlie [Thu, 20 Jan 2022 01:55:26 +0000 (11:55 +1000)]
meson: start building intel earlier.
as intel perf is a big impact, start building the intel subdir
earlier so there is less chance of long stalls at the end waiting
for one file to link other things.
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14630>
Dave Airlie [Thu, 20 Jan 2022 01:36:16 +0000 (11:36 +1000)]
intel/perf: use a function to do common allocations
This cuts the compile time down for this file on my ryzen from
real 1m4.077s
to
real 0m30.827s
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14630>
Tapani Pälli [Tue, 18 Jan 2022 07:38:18 +0000 (09:38 +0200)]
mesa: refactor GetProgramiv to use program resource list
This way we make sure glGetActiveUniform and glGetProgramiv
are in sync about active uniform count.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5885
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14589>
Emma Anholt [Thu, 20 Jan 2022 00:55:28 +0000 (16:55 -0800)]
ci/softpipe: Drop the GS sampling known-flakes.
They haven't appeared in the last half a year since I added the IRC flake
reports.
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14627>
Emma Anholt [Wed, 19 Jan 2022 23:45:47 +0000 (15:45 -0800)]
softpipe: Request that st fix up DST_ALPHA blending for RGB render targets.
Fixes a render target of
dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.0
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14627>
Emma Anholt [Wed, 19 Jan 2022 23:28:10 +0000 (15:28 -0800)]
softpipe: respect !independent_blend_enable for color masks.
blend_buf is the resolved "are we using independent blending?" index, cbuf
is the RT we're drawing to.
Cc: mesa-stable.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14627>
Mike Blumenkrantz [Thu, 20 Jan 2022 02:04:15 +0000 (21:04 -0500)]
lavapipe: fix ptralloc typo
these calculations are so tricky I can't even type them again
Fixes:
48fde98b79f ("lavapipe: replace hard pointer calcs in dynamic render with ptralloc")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14631>
Guilherme Gallo [Wed, 12 Jan 2022 13:58:20 +0000 (10:58 -0300)]
ci: Add docs for Linux Kernel uprevs
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14514>
Dave Airlie [Tue, 21 Dec 2021 04:59:00 +0000 (14:59 +1000)]
mesa/st: merge texture obj/image alloc/free into mesa
This just drops the st wrappers for alloc/free of texture images
and objects.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Fri, 10 Dec 2021 03:14:39 +0000 (13:14 +1000)]
mesa/st: merge texture object/image structs into mesa
This just merges the subclasses into main class
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:48:38 +0000 (08:48 +1000)]
mesa/st: cleanup last bits of st perfmon code.
Just some small cleanups left to finish perfmon code movement.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:40:56 +0000 (08:40 +1000)]
mesa/st: move perfmon code from st into mesa
This merges the perfmon code after the objects have been merged.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:37:03 +0000 (08:37 +1000)]
mesa/st: merge perfmon groups init/cleanup from st into mesa
This moves the init/cleanup code from st into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 22:28:11 +0000 (08:28 +1000)]
mesa/st: merge perfmon counters/groups objects from st into mesa
This merges subclassed or side allocated objects into the main
ones.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 21:56:25 +0000 (07:56 +1000)]
mesa/st: merge perfmon object from st into mesa
This just merges the perf mon subclass into the base class,
and cleans up the result.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 01:19:43 +0000 (11:19 +1000)]
mesa/st: merge transform feedback code from st into mesa
After the objects are merged, this moves the rest of the code
from the state tracker into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Wed, 15 Dec 2021 01:03:40 +0000 (11:03 +1000)]
mesa/st: merge st transform feedback object into gl one.
This just merges the object subclass into the main class,
this was left separate to ease review.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 18:52:37 +0000 (04:52 +1000)]
mesa/st: merge condrender code from st into mesa.
This merges conditional render code from state tracker into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 07:14:39 +0000 (17:14 +1000)]
mesa/st: merge queryobj code from st into mesa.
This merges all the query object code from st into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 06:59:03 +0000 (16:59 +1000)]
mesa/st: merge the syncobj code from st into mesa
This merges all the syncobj code into the mesa from the state tracker.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 04:37:51 +0000 (14:37 +1000)]
mesa/st: merge semaphore objects from st into mesa
Take all the semaphore objects code from state tracker and merge it
into mesa.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Thu, 9 Dec 2021 04:12:49 +0000 (14:12 +1000)]
mesa/st: merge memoryobjects code from st into mesa
This takes all the memory object code from state tracker and
merges it into mesa, cleaning it up on the way.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14327>
Dave Airlie [Fri, 7 Jan 2022 06:58:42 +0000 (16:58 +1000)]
glsl: drop glheader.h include.
This is unused.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:31:03 +0000 (16:31 +1000)]
mesa: split struct gl_config into it's own header.
avoids context.h/mtypes.h deps.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:27:02 +0000 (16:27 +1000)]
mesa: more mtypes.h cleanups
Add more from pepp
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:22:05 +0000 (16:22 +1000)]
docs: update docs for new extension header.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 06:14:45 +0000 (16:14 +1000)]
vbo: drop unused mtypes.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:38:39 +0000 (15:38 +1000)]
glsl: drop some more context.h/mtypes.h interactions
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:28:08 +0000 (15:28 +1000)]
glsl/fp64: move context.h dependent checks into main.
allows dropping context.h include.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:11:21 +0000 (15:11 +1000)]
glsl: move off mtypes.h in lots of places.
This moves to the new split out header files, should mean less recompiling
for unrelated changes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:08:46 +0000 (15:08 +1000)]
mtypes: move gl_shader_variable to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:03:47 +0000 (15:03 +1000)]
mtypes: move bindless image/sampler objects to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 05:01:47 +0000 (15:01 +1000)]
mtypes: move uniform shader types to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:50:57 +0000 (14:50 +1000)]
mtypes: move transform feedback internal structs to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:45:26 +0000 (14:45 +1000)]
mtypes: more gl_active_atomic_buffer to shader_types.h
allows dropping mtypes.h in glsl compiler
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:45:12 +0000 (14:45 +1000)]
mtypes: move gl_program to shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:26:08 +0000 (14:26 +1000)]
mtypes: move gl_linked_shader and gl_shader_program to new shader_types.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:23:06 +0000 (14:23 +1000)]
mesa: move ast_to_hir.cpp off mtypes.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:22:18 +0000 (14:22 +1000)]
glsl: move ast_function.cpp off mtypes.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:19:53 +0000 (14:19 +1000)]
glsl: avoid rebuilding builtin functions on mtypes.h changes.
Restrict to when shader types or consts change
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:19:29 +0000 (14:19 +1000)]
mesa: move some gl shader types to shader_types.h.
This moves some of these to further removes mtypes.h from the GLSL compiler.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:15:16 +0000 (14:15 +1000)]
glsl: remove some deps on mtypes.h.
This should reduce having to rebuild parts of the GLSL compiler
when mtypes.h changes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 04:12:43 +0000 (14:12 +1000)]
mesa/mtypes: move matrix enums to shader_enums.h
These are used in the compiler backend also.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Thu, 6 Jan 2022 22:21:15 +0000 (08:21 +1000)]
mtypes: split gl extensions and consts out into a separate header
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 03:31:55 +0000 (13:31 +1000)]
mesa: drop unused context parameter to shader program data reference.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Dave Airlie [Fri, 7 Jan 2022 03:05:09 +0000 (13:05 +1000)]
glsl/parser: extract consts/exts/api out of context at start.
This stores these pointers separately. in theory now gl_context
can be made more opaque later, if we split header files ups.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
Simon McVittie [Mon, 8 Nov 2021 13:14:59 +0000 (13:14 +0000)]
meson: Try to link all-targets module if Gallium OpenCL is enabled
If we don't do this, and we are statically linking LLVM
(-Dshared-llvm=disabled) while using a version of LLVM compiled for a
general-purpose distribution, then the link fails with undefined
references to the functions called by LLVMInitializeAllTargets().
Using a version of LLVM that was built specifically for Mesa will
sometimes mask this: if the only backends built into LLVM are backends
that we specifically link anyway, then the link will succeed.
According to commit
80817b6e "meson: Adjust Clover's required LLVM
modules", all-targets is not available when using CMake to locate LLVM,
so make it optional rather than mandatory.
This partially reverts commit
80817b6e344258ac9b955f824ebf9019a0fc1610.
Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3962
Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5609
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13720>
Emma Anholt [Fri, 24 Dec 2021 01:28:40 +0000 (17:28 -0800)]
nir/opt_offsets: Use nir_ssa_scalar to chase offset additions.
For nir_to_tgsi, I want to be able to fold into the base from a vector
load_const, which the ad-hoc scalar chasing couldn't handle.
r300:
total instructions in shared programs: 1278731 -> 1256502 (-1.74%)
instructions in affected programs: 457909 -> 435680 (-4.85%)
total flowcontrol in shared programs: 8316 -> 8313 (-0.04%)
flowcontrol in affected programs: 5 -> 2 (-60.00%)
total temps in shared programs: 213687 -> 213774 (0.04%)
temps in affected programs: 13140 -> 13227 (0.66%)
total consts in shared programs: 952850 -> 949929 (-0.31%)
consts in affected programs: 386352 -> 383431 (-0.76%)
Fixes: #5781
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14309>
Emma Anholt [Sun, 26 Dec 2021 17:07:32 +0000 (09:07 -0800)]
nir_to_tgsi: Use nir_opt_offsets for load_ubo_vec4.
This helps non-native-integers hardware where relative addressing of UBOs
has a constant offset field, and having addressing math (particularly for
D3D9) emitted as ALU ops ends up running us out of constants. For
native-integers drivers (such as softpipe), the possible-overflow check
typically triggers and we end up not folding.
r300:
total instructions in shared programs: 1279167 -> 1278731 (-0.03%)
instructions in affected programs: 50834 -> 50398 (-0.86%)
total temps in shared programs: 213736 -> 213687 (-0.02%)
temps in affected programs: 598 -> 549 (-8.19%)
total consts in shared programs: 952973 -> 952850 (-0.01%)
consts in affected programs: 26776 -> 26653 (-0.46%)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14309>
Emma Anholt [Tue, 11 Jan 2022 18:23:51 +0000 (10:23 -0800)]
nir/opt_offsets: Also apply the max offset to top-level constant folding.
nir_to_tgsi wants this for disabling folding into shared var accesses at
all.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14309>
Emma Anholt [Thu, 30 Dec 2021 00:50:06 +0000 (16:50 -0800)]
nir/opt_offsets: Disable unsigned wrap checks on non-native-integers HW.
Since we don't have 32-bit ints, these checks for 32-bit unsigned wrapping
don't help and just reduce optimization opportunities (particularly for
DX9 addressing math).
Doesn't affect any current consumers.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14309>
Emma Anholt [Thu, 23 Dec 2021 23:21:30 +0000 (15:21 -0800)]
nir: Add a .base field to nir_load_ubo_vec4.
This lets nir-to-tgsi fold the constant offset of addressing calculations
into the CONST[] reference, which is important for D3D9-era compatibility:
HW of that age has limited uniform space, and if we do the addressing math
as math in the shader for dynamic indexing, the nir_load_consts end up
taking up uniforms we don't have available.
r300:
total instructions in shared programs: 1279699 -> 1279167 (-0.04%)
instructions in affected programs: 134796 -> 134264 (-0.39%)
total instructions in shared programs: 1279699 -> 1279167 (-0.04%)
instructions in affected programs: 134796 -> 134264 (-0.39%)
total temps in shared programs: 213912 -> 213736 (-0.08%)
temps in affected programs: 2166 -> 1990 (-8.13%)
total consts in shared programs: 953237 -> 952973 (-0.03%)
consts in affected programs: 45980 -> 45716 (-0.57%)
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14309>
Emma Anholt [Thu, 23 Dec 2021 23:28:06 +0000 (15:28 -0800)]
nir/lower_dynamic_bo_access: Use copy_inst_indices for our cloned instrs.
The ad-hoc index duplication was missing setup of things like the ACCESS
or RANGE_BASE fields.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14309>
Dave Airlie [Wed, 19 Jan 2022 03:30:29 +0000 (13:30 +1000)]
intel/brw: drop gl header from the brw backend.
This shouldn't be used anywhere now once we drop the GLbitfield64 types.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
Dave Airlie [Wed, 19 Jan 2022 03:23:32 +0000 (13:23 +1000)]
nir: remove gl.h include from nir headers.
This saves a lot of pointless gl.h includes across the board,
it moves the one place that needs GLenum into a separate file
only used in those passes that require it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
Dave Airlie [Wed, 19 Jan 2022 07:42:04 +0000 (17:42 +1000)]
includes: add windows lean and mean guard.
When we drop gl.h some files pick up windows.h from here
without lean/mean and it causes conflicts.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
Dave Airlie [Wed, 19 Jan 2022 03:17:27 +0000 (13:17 +1000)]
mesa/*: add a shader primitive type to get away from GL types.
This creates an internal shader_prim enum, I've fixed up most
users to use it instead of GL types.
don't store the enum in shader_info as it changes size, and confuses
other things.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
Dave Airlie [Wed, 19 Jan 2022 01:43:15 +0000 (11:43 +1000)]
mesa/*: use an internal enum for tessellation primitive types.
To avoid dragging gl.h into places it has no business being,
defined tessellation primitive mode to an enum.
This has a lot of fallout all over the place.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
Stefan Brüns [Fri, 14 Jan 2022 12:49:49 +0000 (13:49 +0100)]
llvmpipe: Add get_{driver,device}_uuid implementations
Commit
9da15aa3aa94 ("llvmpipe: enable EXT_memory_object(_fd)") enabled
the extension, but left this unimplemented.
Leaving this unimplemented causes segfaults for anyone trying to retrieve
the UUIDs, as the calling code in the state tracker does not check if the
function is implemented. This affects e.g. current Wine versions.
Set the UUID to all zeros. Although this slightly violates the vulkan
specification (since 1.2.146), the UUIDs have to match the ones from
lavapipe (lvp_get_physical_device_properties_1_1).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5865
Fixes:
9da15aa3aa94 ("llvmpipe: enable EXT_memory_object(_fd)")
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Dave Airlie airlied@redhat.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14558>
Dave Airlie [Mon, 15 Nov 2021 03:02:29 +0000 (13:02 +1000)]
amd: move uvd decode definitions to common place
This just makes sharing these easier later.
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14607>
Dave Airlie [Fri, 5 Nov 2021 03:52:57 +0000 (13:52 +1000)]
amd: move vcn decoding regs + structs to a common file.
This just moves the main regs + fw interface structs to a new shared
file.
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14607>
Guilherme Gallo [Mon, 17 Jan 2022 02:52:16 +0000 (23:52 -0300)]
ci: freedreno: Update a530 dEQP fail expectation list
The test
`KHR-GLES31.core.shader_storage_buffer_object.basic-stdLayout_UBO_SSBO-case2-cs`
was failing even before the kernel uprev
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14548>
Guilherme Gallo [Wed, 12 Jan 2022 17:49:10 +0000 (14:49 -0300)]
ci: Uprev Kernel to v5.16
Changes in freedreno devices:
- Adding CONFIG_DRM_PANEL_EDP, split from CONFIG_DRM_PANEL_SIMPLE
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14548>
Alex Xu (Hello71) [Thu, 2 Dec 2021 23:34:56 +0000 (18:34 -0500)]
meson: tlsdesc: minor reformatting, add comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14027>
Samuel Pitoiset [Wed, 19 Jan 2022 09:35:56 +0000 (10:35 +0100)]
radv: fix missing destroy for the overallocation mutex
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/14611>
Samuel Pitoiset [Wed, 19 Jan 2022 13:37:54 +0000 (14:37 +0100)]
vulkan/runtime: fix accessing NULL pointers detected by UBSAN
Fixes:
7a84314c12a ("vulkan/runtime: Add sparse bind support.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14619>
Marcin Ślusarz [Thu, 8 Jul 2021 09:09:35 +0000 (11:09 +0200)]
Add new rules to .gitattributes
This will make sure that all source files have native line endings
when checked out locally.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11779>
Marcin Ślusarz [Wed, 19 Jan 2022 10:55:54 +0000 (11:55 +0100)]
radv/ci: add line endings exception for files generated with wine
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11779>
Marcin Ślusarz [Wed, 19 Jan 2022 10:53:39 +0000 (11:53 +0100)]
ci/windows: normalize line endings
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11779>
Marcin Ślusarz [Wed, 19 Jan 2022 10:52:10 +0000 (11:52 +0100)]
microsoft/compiler: normalize line endings
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11779>
Marcin Ślusarz [Thu, 8 Jul 2021 09:54:31 +0000 (11:54 +0200)]
freedreno/rnn: normalize line endings in rules-ng.xsd
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11779>
Rhys Perry [Tue, 18 Jan 2022 13:29:59 +0000 (13:29 +0000)]
aco: use p_extract for SGPR nir_op_unpack_half_2x16_split_y
fossil-db (Sienna Cichlid):
Totals from 7264 (5.40% of 134627) affected shaders:
VGPRs: 548152 -> 548184 (+0.01%)
SpillSGPRs: 7615 -> 7607 (-0.11%)
CodeSize:
71025152 ->
70993036 (-0.05%); split: -0.05%, +0.00%
Instrs:
13386799 ->
13298580 (-0.66%); split: -0.66%, +0.00%
Latency:
177464497 ->
177091693 (-0.21%); split: -0.21%, +0.00%
InvThroughput:
32185148 ->
32151873 (-0.10%); split: -0.10%, +0.00%
VClause: 233167 -> 233166 (-0.00%); split: -0.00%, +0.00%
SClause: 468423 -> 468426 (+0.00%); split: -0.00%, +0.01%
Copies: 950727 -> 942753 (-0.84%); split: -0.85%, +0.02%
Branches: 455919 -> 455901 (-0.00%); split: -0.01%, +0.00%
fossil-db (Vega):
Totals from 7264 (5.39% of 134762) affected shaders:
SGPRs: 738800 -> 738816 (+0.00%)
VGPRs: 550264 -> 550344 (+0.01%)
SpillSGPRs: 11149 -> 11157 (+0.07%)
CodeSize:
67487104 ->
67466772 (-0.03%); split: -0.03%, +0.00%
Instrs:
13142106 ->
13061767 (-0.61%)
Latency:
209278575 ->
208438854 (-0.40%); split: -0.40%, +0.00%
InvThroughput:
81486405 ->
81265773 (-0.27%); split: -0.27%, +0.00%
VClause: 222293 -> 222291 (-0.00%); split: -0.00%, +0.00%
SClause: 447783 -> 447800 (+0.00%); split: -0.00%, +0.01%
Copies: 1243760 -> 1238842 (-0.40%); split: -0.43%, +0.03%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14592>
Matti Hamalainen [Wed, 12 May 2021 10:07:23 +0000 (13:07 +0300)]
aux/trace: cosmetic cleanup
Fix up some function argument indentation alignments and
adjust few other small cosmetics.
Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14398>
Matti Hamalainen [Wed, 12 May 2021 09:52:58 +0000 (12:52 +0300)]
aux/trace: implement missing trace calls
Some call traces (resource_from_handle, resource_get_handle and
resource_get_param) were TODO, so implement them while we are here.
Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14398>
Matti Hamalainen [Thu, 9 Dec 2021 18:38:17 +0000 (20:38 +0200)]
aux/trace: print enum names instead of integer values in gallium traces
Having only magic constants instead of human-readable strings in
traces not only hinders readability, but also may affect trace
comparision of old and new traces if new enums have been added
or modified (thus possibly changing the values of existing ones.)
So we implement printing of enum names as strings instead.
In order to have those strings, we need to add some new helper
functions, which we will automatically generate from header file
src/gallium/include/pipe/p_defines.h via a new Python script
enums2names.py.
We also bolt this all into the Meson build system.
Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4609
Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14398>
Lionel Landwerlin [Sat, 8 Jan 2022 11:52:27 +0000 (13:52 +0200)]
genxml: reduce amount of generated code
$ wc -l build/src/intel/genxml/genX_bits.h
250581 build/src/intel/genxml/genX_bits.h (before)
5748 build/src/intel/genxml/genX_bits.h (after)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14469>
Lionel Landwerlin [Mon, 17 Jan 2022 12:02:30 +0000 (14:02 +0200)]
anv: fix missing descriptor copy of bufferview/surfacestate content
When doing copies of descriptors from one set to another, that contain
either a UNIFORM_BUFFER or STORAGE_BUFFER, both the buffer view &
surface state are allocated from the source descriptor. Therefore we
need to copy their content otherwise we could run into lifecycle
issues when the source descriptor is destroyed.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14585>
Lionel Landwerlin [Wed, 19 Jan 2022 09:03:39 +0000 (11:03 +0200)]
intel/dev: fix ppipe_mask computation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
e86ce98c6a08 ("intel/devinfo: deal with i915 topology query change")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14608>
Thomas H.P. Andersen [Tue, 18 Jan 2022 23:59:39 +0000 (00:59 +0100)]
meson: add check kwarg to run_command
run_command will change the default for the check arg to true
in the future. If it is true then meson will exit if the command
fails. It must be false here as we check the return code to
provide a meaningful error message.
With meson 0.61 we get the following warning:
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14602>
Mike Blumenkrantz [Tue, 18 Jan 2022 20:28:07 +0000 (15:28 -0500)]
zink: add deqp ci baseline for nv
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14603>
Mike Blumenkrantz [Tue, 18 Jan 2022 20:27:19 +0000 (15:27 -0500)]
zink: update nv ci baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14603>