platform/upstream/mesa.git
2 years agomesa/st: move intel blackhole noop enable to frontend
Dave Airlie [Mon, 20 Dec 2021 04:01:33 +0000 (14:01 +1000)]
mesa/st: move intel blackhole noop enable to frontend

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14632>

2 years agozink: hook up planar image format creation
Mike Blumenkrantz [Thu, 18 Nov 2021 22:04:02 +0000 (17:04 -0500)]
zink: hook up planar image format creation

it'll explode if used for anything, but this is how it's done

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

2 years agozink: link with vulkan utils
Mike Blumenkrantz [Thu, 18 Nov 2021 21:40:56 +0000 (16:40 -0500)]
zink: link with vulkan utils

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

2 years agontt: Extend ntt_compile::addr_declared and ntt_compile::addr_reg
Ian Romanick [Mon, 10 Jan 2022 22:52:08 +0000 (14:52 -0800)]
ntt: Extend ntt_compile::addr_declared and ntt_compile::addr_reg

This was identified by Coverity.  4bb9c0a28a5 added uses of a third
address register, but the arrays for tracking address registers only
have two slots.

Add back a version of the assertion from before 4bb9c0a28a5 to help
prevent future problems.  I don't think any drivers that would hit
this path use NIR-to-TGSI yet, so it may be moot.

Reviewed-by: Matt Turner <mattst88@gmail.com>
CID: 1496942
CID: 1496944
Fixes: 4bb9c0a28a5 ("nir_to_tgsi: Use the same address reg mappings as GLSL-to-TGSI did.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14487>

2 years agonir/algebraic: optimize expressions using fmulz/ffmaz
Rhys Perry [Tue, 14 Sep 2021 17:02:01 +0000 (18:02 +0100)]
nir/algebraic: optimize expressions using fmulz/ffmaz

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agonir: add some missing nir_alu_type_get_base_type
Rhys Perry [Fri, 15 Oct 2021 16:23:51 +0000 (17:23 +0100)]
nir: add some missing nir_alu_type_get_base_type

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agonir/algebraic: optimize open-coded fmulz/ffmaz
Rhys Perry [Fri, 1 Oct 2021 10:27:00 +0000 (11:27 +0100)]
nir/algebraic: optimize open-coded fmulz/ffmaz

This pattern will be found in future versions of D3D9 DXVK.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agonir/algebraic: add ignore_exact() wrapper
Rhys Perry [Fri, 15 Oct 2021 15:39:35 +0000 (16:39 +0100)]
nir/algebraic: add ignore_exact() wrapper

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agoaco: create v_mac_legacy_f32/v_fmac_legacy_f32
Rhys Perry [Tue, 27 Apr 2021 11:11:37 +0000 (12:11 +0100)]
aco: create v_mac_legacy_f32/v_fmac_legacy_f32

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agoaco: consider legacy multiplications in optimizer
Rhys Perry [Tue, 21 Sep 2021 16:03:05 +0000 (17:03 +0100)]
aco: consider legacy multiplications in optimizer

Optimize omod, -(a*b), b2f(a)*b, a*1, a*0 and create MAD/FMA.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agoradv,aco,ac/llvm: implement fmulz and ffmaz
Rhys Perry [Tue, 27 Apr 2021 11:28:27 +0000 (12:28 +0100)]
radv,aco,ac/llvm: implement fmulz and ffmaz

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agonir: add nir_op_fmulz and nir_op_ffmaz
Rhys Perry [Wed, 28 Apr 2021 16:48:54 +0000 (17:48 +0100)]
nir: add nir_op_fmulz and nir_op_ffmaz

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13436>

2 years agointel/fs: Fix gl_FrontFacing optimization on Gfx12+
Ian Romanick [Wed, 19 Jan 2022 00:30:37 +0000 (16:30 -0800)]
intel/fs: Fix gl_FrontFacing optimization on Gfx12+

It's not obvious why the (gl_FrontFacing ? -1.0 : 1.0) case was handled
different for Gfx12+ than for previous generations, and it's not
correct.  It tries to negate the result as an integer, and it does this
before the mask operation that clears the other bits in the value.

When we eventually support dual-SIMD8 dispatch, the other front-facing
bit is in g1.6 at bit 15, so similar code should be possible there.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c92fb60007f ("intel/fs/gen12: Implement gl_FrontFacing on gen12+.")
Closes: #5876
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14625>

2 years agozink: fix non-modifer dmabuf usage
Mike Blumenkrantz [Tue, 18 Jan 2022 20:07:31 +0000 (15:07 -0500)]
zink: fix non-modifer dmabuf usage

drivers/hardware lacking VK_EXT_image_drm_format_modifier can still use dmabuf,
but that setup has to do the old copy to linear scanout instead of copy to
modifier scanout

this requires a couple extra checks to be added to handle the case

Fixes: 619438bf7ce ("zink: check EXT_image_drm_format_modifier for dmabuf support")

fixes #5836

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14597>

2 years agoanv: add helper methods related to enabling CCS for external images
Renato Pereyra [Wed, 19 Jan 2022 02:35:56 +0000 (18:35 -0800)]
anv: add helper methods related to enabling CCS for external images

Also, clarify/improve related comments

Signed-off-by: Renato Pereyra <renatopereyra@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14416>

2 years agoanv: Enable implicit CCS for external images
Renato Pereyra [Thu, 6 Jan 2022 02:27:23 +0000 (18:27 -0800)]
anv: Enable implicit CCS for external images

AUX and clear state is stored in the VkDevice private binding

Signed-off-by: Renato Pereyra <renatopereyra@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14416>

2 years agodocs: add features/relnotes for zink sparse texture support
Mike Blumenkrantz [Thu, 20 Jan 2022 15:49:02 +0000 (10:49 -0500)]
docs: add features/relnotes for zink sparse texture support

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

2 years agozink: ARB_sparse_texture2
Mike Blumenkrantz [Thu, 13 Jan 2022 17:31:23 +0000 (12:31 -0500)]
zink: ARB_sparse_texture2

there is no vulkan driver that can currently pass all these tests, and
some of the tests themselves are broken, but this seems like it should be
correct

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

2 years agozink: enable ARB_sparse_texture pipe caps
Mike Blumenkrantz [Mon, 3 Jan 2022 19:35:31 +0000 (14:35 -0500)]
zink: enable ARB_sparse_texture pipe caps

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

2 years agozink: handle sparse texture miptail commits
Mike Blumenkrantz [Fri, 14 Jan 2022 18:03:41 +0000 (13:03 -0500)]
zink: handle sparse texture miptail commits

basically just allocate pages for miptail levels (probably just one) and
then bind them separately since they're probably never going to be batched

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

2 years agozink: batch sparse texture binds
Mike Blumenkrantz [Wed, 12 Jan 2022 20:27:17 +0000 (15:27 -0500)]
zink: batch sparse texture binds

do 10 binds per submit now (4 is enough for cts but yolo)

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

2 years agozink: handle min_lod texture operands
Mike Blumenkrantz [Fri, 14 Jan 2022 16:22:43 +0000 (11:22 -0500)]
zink: handle min_lod texture operands

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

2 years agozink: emit sparse residency cap in ntv
Mike Blumenkrantz [Fri, 14 Jan 2022 17:01:15 +0000 (12:01 -0500)]
zink: emit sparse residency cap in ntv

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

2 years agozink: only allocate ntv residency info if it will be used
Mike Blumenkrantz [Fri, 14 Jan 2022 14:51:47 +0000 (09:51 -0500)]
zink: only allocate ntv residency info if it will be used

odds are it will never be used, so don't bother allocating

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

2 years agozink: add nir_intrinsic_image_deref_sparse_load to image scanning in compiler
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>

2 years agozink: always pass shader info to ntv
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>

2 years agozink: rename zink_so_info -> zink_shader_info
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>

2 years agozink: handle residency return value from sparse texture instructions
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>

2 years agozink: always set actual_dest_type for ntv tex instruction emission
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>

2 years agozink: implement sparse shader instructions in ntv
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>

2 years agozink: fake sparse R9G9B9E5 support as needed
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>

2 years agozink: stop allocating such massive staging regions for buffer maps
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>

2 years agozink: allow sparse buffers to be suballocated
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>

2 years agozink: support sparse texture range commits
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>

2 years agozink: set up image create bits for sparse textures
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>

2 years agozink: add get_sparse_texture_virtual_page_size hook
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>

2 years agotu: expose VK_KHR_copy_commands2
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>

2 years agov3dv: Update LoaderICDInterfaceVersion to v5
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>

2 years agofreedreno, tu: Update LoaderICDInterfaceVersion to v5
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>

2 years agolavapipe: Update LoaderICDInterfaceVersion to v5
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>

2 years agoanv: Update LoaderICDInterfaceVersion to v5
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>

2 years agopanvk: Update LoaderICDInterfaceVersion to v5
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>

2 years agoradv: Update LoaderICDInterfaceVersion to v5
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>

2 years agomeson: start building intel earlier.
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>

2 years agointel/perf: use a function to do common allocations
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>

2 years agomesa: refactor GetProgramiv to use program resource list
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>

2 years agoci/softpipe: Drop the GS sampling known-flakes.
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>

2 years agosoftpipe: Request that st fix up DST_ALPHA blending for RGB render targets.
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>

2 years agosoftpipe: respect !independent_blend_enable for color masks.
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>

2 years agolavapipe: fix ptralloc typo
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>

2 years agoci: Add docs for Linux Kernel uprevs
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>

2 years agomesa/st: merge texture obj/image alloc/free into mesa
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>

2 years agomesa/st: merge texture object/image structs into mesa
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>

2 years agomesa/st: cleanup last bits of st perfmon code.
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>

2 years agomesa/st: move perfmon code from st into mesa
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>

2 years agomesa/st: merge perfmon groups init/cleanup from st into mesa
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>

2 years agomesa/st: merge perfmon counters/groups objects from st into mesa
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>

2 years agomesa/st: merge perfmon object from st into mesa
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>

2 years agomesa/st: merge transform feedback code from st into mesa
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>

2 years agomesa/st: merge st transform feedback object into gl one.
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>

2 years agomesa/st: merge condrender code from st into mesa.
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>

2 years agomesa/st: merge queryobj code from st into mesa.
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>

2 years agomesa/st: merge the syncobj code from st into mesa
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>

2 years agomesa/st: merge semaphore objects from st into mesa
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>

2 years agomesa/st: merge memoryobjects code from st into mesa
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>

2 years agoglsl: drop glheader.h include.
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>

2 years agomesa: split struct gl_config into it's own header.
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>

2 years agomesa: more mtypes.h cleanups
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>

2 years agodocs: update docs for new extension header.
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>

2 years agovbo: drop unused mtypes.h
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>

2 years agoglsl: drop some more context.h/mtypes.h interactions
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>

2 years agoglsl/fp64: move context.h dependent checks into main.
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>

2 years agoglsl: move off mtypes.h in lots of places.
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>

2 years agomtypes: move gl_shader_variable to shader_types.h
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>

2 years agomtypes: move bindless image/sampler objects to shader_types.h
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>

2 years agomtypes: move uniform shader types to shader_types.h
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>

2 years agomtypes: move transform feedback internal structs to shader_types.h
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>

2 years agomtypes: more gl_active_atomic_buffer to shader_types.h
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>

2 years agomtypes: move gl_program to shader_types.h
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>

2 years agomtypes: move gl_linked_shader and gl_shader_program to new shader_types.h
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>

2 years agomesa: move ast_to_hir.cpp off mtypes.h
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>

2 years agoglsl: move ast_function.cpp off mtypes.h
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>

2 years agoglsl: avoid rebuilding builtin functions on mtypes.h changes.
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>

2 years agomesa: move some gl shader types to shader_types.h.
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>

2 years agoglsl: remove some deps on mtypes.h.
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>

2 years agomesa/mtypes: move matrix enums to shader_enums.h
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>

2 years agomtypes: split gl extensions and consts out into a separate header
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>

2 years agomesa: drop unused context parameter to shader program data reference.
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>

2 years agoglsl/parser: extract consts/exts/api out of context at start.
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>

2 years agomeson: Try to link all-targets module if Gallium OpenCL is enabled
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>

2 years agonir/opt_offsets: Use nir_ssa_scalar to chase offset additions.
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>

2 years agonir_to_tgsi: Use nir_opt_offsets for load_ubo_vec4.
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>

2 years agonir/opt_offsets: Also apply the max offset to top-level constant folding.
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>

2 years agonir/opt_offsets: Disable unsigned wrap checks on non-native-integers HW.
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>

2 years agonir: Add a .base field to nir_load_ubo_vec4.
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>

2 years agonir/lower_dynamic_bo_access: Use copy_inst_indices for our cloned instrs.
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>

2 years agointel/brw: drop gl header from the brw backend.
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>

2 years agonir: remove gl.h include from nir headers.
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>

2 years agoincludes: add windows lean and mean guard.
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>

2 years agomesa/*: add a shader primitive type to get away from GL types.
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>