platform/upstream/mesa.git
3 years agovbo/dlist: apply start_offset after indices construction
Pierre-Eric Pelloux-Prayer [Tue, 10 Aug 2021 09:42:28 +0000 (11:42 +0200)]
vbo/dlist: apply start_offset after indices construction

This will make our life easier for the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>

3 years agovbo/dlist: simplify add_vertex function
Pierre-Eric Pelloux-Prayer [Tue, 10 Aug 2021 09:28:27 +0000 (11:28 +0200)]
vbo/dlist: simplify add_vertex function

Use the correct pointer directly instead of adding/removing the same
offset.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12646>

3 years agofreedreno/a6xx: Fix VS primid with tess + GS.
Connor Abbott [Wed, 8 Sep 2021 13:05:20 +0000 (15:05 +0200)]
freedreno/a6xx: Fix VS primid with tess + GS.

Analogous to the previous commit.

Fixes: 8115cde3ba6 ("tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12768>

3 years agotu: Fix VS primid with tess + GS
Connor Abbott [Wed, 8 Sep 2021 12:59:28 +0000 (14:59 +0200)]
tu: Fix VS primid with tess + GS

If tess is enabled, then VS chains to the HS and we have to use the HS
value for the PrimID sysval. This is still true if GS is also enabled,
so we need to use the HS instead of the GS if both are enabled.  In
particular if the HS or DS uses gl_PrimitiveID but the GS doesn't then
we still need to setup the register.

This fixes a bunch of dEQP-VK.tessellation.invariance.primitive_set.*
cases on a650, although it seems they managed to still pass on a630 with
the broken PrimID handling.

Fixes: 8115cde3ba6 ("tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12768>

3 years agonir: fix serialization of loop/if control
Rhys Perry [Wed, 8 Sep 2021 17:09:18 +0000 (18:09 +0100)]
nir: fix serialization of loop/if control

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fixes: e76ae39ae22 ("nir: add support for user defined select control")
Fixes: b56451f82c1 ("nir: add support for user defined loop control")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12778>

3 years agoci: Use FDO_DISTRIBUTION_TAG where possible
Rohan Garg [Tue, 7 Sep 2021 13:58:45 +0000 (15:58 +0200)]
ci: Use FDO_DISTRIBUTION_TAG where possible

This allows for de duplicating some variables.

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12750>

3 years agoradeonsi: enable nir option pack_varying_options
Qiang Yu [Thu, 26 Aug 2021 06:32:32 +0000 (14:32 +0800)]
radeonsi: enable nir option pack_varying_options

flat interpolation type is not enabled because we need to set
    SPI_PS_INPUT_CNTL_x.FLAT_SHADE=1
which is per vec4.

16 bit varying also need to set
    SPI_PS_INPUT_CNTL_x.FP16_INTERP_MODE
but varying packing only support 32 bit, so we don't need to
worry about this for now.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537>

3 years agonir/linker: pack varyings with different interpolation qualifier
Qiang Yu [Wed, 25 Aug 2021 06:07:50 +0000 (14:07 +0800)]
nir/linker: pack varyings with different interpolation qualifier

Driver like radeonsi load varying in a scalar manner, so prefer to pack
varying with different interpolation qualifier into same slot to save
space.

But driver like panfrost/bifrost can load varying in vector manner,
so prefer to pack varying with same interpolation qualifier.

Driver can add interpolation qualifiers which are able to be
packed into same varying slot to pack_varying_options nir option.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537>

3 years agonir/lower_io_to_vector: check centroid & sample when merge variable
Qiang Yu [Wed, 25 Aug 2021 01:32:52 +0000 (09:32 +0800)]
nir/lower_io_to_vector: check centroid & sample when merge variable

These qualifiers should be respected for different varying load code
generation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12537>

3 years agomesa: fix glthread deadlock when EGL multi thread shared context
Qiang Yu [Wed, 11 Aug 2021 05:30:31 +0000 (13:30 +0800)]
mesa: fix glthread deadlock when EGL multi thread shared context

This fixes dEQP EGL tests when glthread is enabled:
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copyteximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random.images.texsubimage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_server_sync.images.teximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_server_sync.images.texsubimage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.copyteximage2d.*
dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.images.texsubimage2d.*

Deadlock happens when:

  Thread A: call EGL context functions which will involve _mesa_glthread_finish(), like
  eglMakeCurrent() and eglDestroyContext(). It will hold the EGLDisplay.Mutex and wait
  on glthread job queue empty (util_queue_fence_wait(&last->fence)). glthread job thread
  executes batch holding gl_context.Shared.TexMutex (glthread_unmarshal_batch()).

  Thread B: call EGLImage import functions like EGLImageTargetTexture2DOES() which will
  hold gl_context.Shared.TexMutex (egl_image_target_texture()) then validate EGLImage
  and hold EGLDisplay.Mutex (dri2_lookup_egl_image()).

This fixes the deadlock by moving the EGLImage validation out of gl_context.Shared.TexMutex
lock area.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336>

3 years agomesa: add ValidateEGLImage driver callback
Qiang Yu [Wed, 11 Aug 2021 02:26:00 +0000 (10:26 +0800)]
mesa: add ValidateEGLImage driver callback

Check EGLImage imported.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336>

3 years agogallium/api: add validate_egl_image interface
Qiang Yu [Wed, 11 Aug 2021 02:10:07 +0000 (10:10 +0800)]
gallium/api: add validate_egl_image interface

For being used by mesa state tracker.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336>

3 years agogallium/dri: add dri_screen egl image validate hooks
Qiang Yu [Tue, 10 Aug 2021 08:52:12 +0000 (16:52 +0800)]
gallium/dri: add dri_screen egl image validate hooks

For being used by EGLImage import in the following commits.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336>

3 years agogbm/dri: implement image lookup extension version 2
Qiang Yu [Wed, 11 Aug 2021 08:59:05 +0000 (16:59 +0800)]
gbm/dri: implement image lookup extension version 2

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336>

3 years agoegl/dri2: seperate EGLImage validate and lookup
Qiang Yu [Tue, 10 Aug 2021 06:49:12 +0000 (14:49 +0800)]
egl/dri2: seperate EGLImage validate and lookup

Version 2 of DRIImageLookupExtension add two interface for EGLImage
validate and lookup. This is for resolving deak lock in the following
commits.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12336>

3 years agodocs: update calendar and link releases notes for 21.1.8
Eric Engestrom [Wed, 8 Sep 2021 21:38:13 +0000 (22:38 +0100)]
docs: update calendar and link releases notes for 21.1.8

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

3 years agodocs: add release notes for 21.1.8
Eric Engestrom [Wed, 8 Sep 2021 21:18:24 +0000 (22:18 +0100)]
docs: add release notes for 21.1.8

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

3 years agogl.h: Remove dllimport
Jesse Natalie [Wed, 8 Sep 2021 16:26:02 +0000 (09:26 -0700)]
gl.h: Remove dllimport

__declspec(dllimport) isn't needed for linking to functions, extern
is sufficient. The preprocessor define used to determine when to
set it (_DLL) was incorrect, since that preprocessor define is set
anytime you're linking against dynamic CRT as opposed to static CRT.

Reviewed-by: Bill Kristiansen <billkris@Microsoft.com>
Reviewed-by: Marek Ol\9aák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12776>

3 years agoaux/trace: dump more pipe_vertex_element members
Mike Blumenkrantz [Tue, 7 Sep 2021 21:46:24 +0000 (17:46 -0400)]
aux/trace: dump more pipe_vertex_element members

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12754>

3 years agomesa/st: use uint for instance_divisor instead of int
Mike Blumenkrantz [Tue, 7 Sep 2021 22:01:57 +0000 (18:01 -0400)]
mesa/st: use uint for instance_divisor instead of int

this is confusing

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12755>

3 years agovenus: raise the ring buffer size to 64KB
Chia-I Wu [Thu, 26 Aug 2021 18:42:18 +0000 (11:42 -0700)]
venus: raise the ring buffer size to 64KB

When the renderer supports largeRing, raise the ring buffer size to 64KB
and raise the direct submit threshold to 4KB.  The numbers are randomly
picked.

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

3 years agovenus: update venus-protocol headers
Chia-I Wu [Thu, 26 Aug 2021 18:25:33 +0000 (11:25 -0700)]
venus: update venus-protocol headers

There are some decoder changes.  But we mainly want to gain largeRing
support.

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

3 years agovenus: make ring buffer size configurable
Chia-I Wu [Thu, 26 Aug 2021 18:30:18 +0000 (11:30 -0700)]
venus: make ring buffer size configurable

Until we can assume large ring support.

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

3 years agovenus: rework vn_instance_submission
Chia-I Wu [Mon, 30 Aug 2021 16:44:29 +0000 (09:44 -0700)]
venus: rework vn_instance_submission

The goal is to remove local_cs_data.  To that end, vn_ring_submit is
modified to take a cs than a pointer.

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

3 years agovenus: add and use VN_CS_ENCODER_INITIALIZER
Chia-I Wu [Mon, 30 Aug 2021 16:37:08 +0000 (09:37 -0700)]
venus: add and use VN_CS_ENCODER_INITIALIZER

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

3 years agovenus: init experimental features before the ring
Chia-I Wu [Mon, 30 Aug 2021 05:02:16 +0000 (22:02 -0700)]
venus: init experimental features before the ring

We can no longer use
vn_call_vkGetVenusExperimentalFeatureData100000MESA which requires the
ring to be initialized.

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

3 years agovenus: support reply shmem without ring
Chia-I Wu [Mon, 30 Aug 2021 05:07:24 +0000 (22:07 -0700)]
venus: support reply shmem without ring

Let vn_instance_get_reply_shmem_locked use the renderer if it is called
before the ring is initialized.

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

3 years agovenus: add vn_renderer_submit_simple_sync
Chia-I Wu [Mon, 30 Aug 2021 05:52:00 +0000 (22:52 -0700)]
venus: add vn_renderer_submit_simple_sync

It submits a command stream to the renderer and waits.

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

3 years agovenus: init roundtrip fields in vn_instance later
Chia-I Wu [Mon, 30 Aug 2021 04:56:15 +0000 (21:56 -0700)]
venus: init roundtrip fields in vn_instance later

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

3 years agovenus: reorder version fields in vn_instance
Chia-I Wu [Mon, 30 Aug 2021 04:58:57 +0000 (21:58 -0700)]
venus: reorder version fields in vn_instance

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

3 years agodocs: Update Windows llvmpipe doc for driver split
Jesse Natalie [Wed, 1 Sep 2021 14:28:30 +0000 (07:28 -0700)]
docs: Update Windows llvmpipe doc for driver split

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agowgl: Refactor drivers to a libgallium_wgl.dll
Jesse Natalie [Wed, 1 Sep 2021 14:07:57 +0000 (07:07 -0700)]
wgl: Refactor drivers to a libgallium_wgl.dll

I'd like to support EGL on Windows, using the same architecture as Linux.
On Linux, libgallium_dri.so is a "megadriver," containing the Mesa Gallium
state tracker, plus the actual driver implementations.

Now, on Windows, libgallium_wgl.dll is a proper OpenGL ICD, and OpenGL32.dll
is just a stub DLL which implements the wgl* APIs in terms of that ICD.

This is the more "architecturally clean" way to share the state tracker
between EGL and WGL.

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agowgl: Make overridden entrypoints local to stw_ext_context
Jesse Natalie [Fri, 3 Sep 2021 22:41:48 +0000 (15:41 -0700)]
wgl: Make overridden entrypoints local to stw_ext_context

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agowgl: Move wgl* non-extension definitions to libgl-gdi
Jesse Natalie [Wed, 1 Sep 2021 14:06:49 +0000 (07:06 -0700)]
wgl: Move wgl* non-extension definitions to libgl-gdi

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agowgl: Move opengl32.def to target instead of frontend
Jesse Natalie [Wed, 1 Sep 2021 14:04:02 +0000 (07:04 -0700)]
wgl: Move opengl32.def to target instead of frontend

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agowgl: Don't use BUILD_GL32 for wgl frontend
Jesse Natalie [Wed, 1 Sep 2021 14:01:31 +0000 (07:01 -0700)]
wgl: Don't use BUILD_GL32 for wgl frontend

The set of GL exports from OpenGL32.dll is controlled by a .def file,
there's no need to also use __declspec(dllexport) for all of them.

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agostatic-glapi: Fix MSVC preprocessor definitions
Jesse Natalie [Wed, 1 Sep 2021 13:58:14 +0000 (06:58 -0700)]
static-glapi: Fix MSVC preprocessor definitions

Previously, any DLL which links any function from libglapi-static would
end up exporting the entire GL API surface area, due to the dllexport
introduced by BUILD_GL32. This fix allows DLLs to internally include
definitions of gl* APIs without having to export the entire surface.

Also, remove unreachable with_shared_glapi branch already in an else block.

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agowgl: Fix unit test when using shared glapi
Jesse Natalie [Fri, 3 Sep 2021 22:43:15 +0000 (15:43 -0700)]
wgl: Fix unit test when using shared glapi

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agomapi: Fix shared-glapi build with MSVC
Jesse Natalie [Wed, 1 Sep 2021 13:57:40 +0000 (06:57 -0700)]
mapi: Fix shared-glapi build with MSVC

Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Reviewed-by: Charmaine Lee >charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>

3 years agoglx: Prevent crashes when an extension isn't found
Corentin Noël [Tue, 7 Sep 2021 15:53:41 +0000 (17:53 +0200)]
glx: Prevent crashes when an extension isn't found

Avoid a NULL-pointer dereference.

Fixes: 2c8a85b712e ("glx: Stash a copy of the XExtCodes in the glx_display")
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12751>

3 years agofreedreno/ir3: Update physical_predecessors for streamout block
Rob Clark [Tue, 7 Sep 2021 22:23:56 +0000 (15:23 -0700)]
freedreno/ir3: Update physical_predecessors for streamout block

Caught by newly added ir3_validate checks.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>

3 years agofreedreno/ir3: Improve error msg for block level validation
Rob Clark [Tue, 7 Sep 2021 21:45:51 +0000 (14:45 -0700)]
freedreno/ir3: Improve error msg for block level validation

Printing whatever happened to be the last instruction is misleading.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>

3 years agofreedreno/ir3: Validate physical successors
Rob Clark [Tue, 7 Sep 2021 21:21:40 +0000 (14:21 -0700)]
freedreno/ir3: Validate physical successors

Each block's physical successors should be a superset of the logical
successors.

Also validate that the successors are sane (ie. we shouldn't have the
2nd one if we don't have the first)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>

3 years agofreedreno/ir3: Fix double printing of branch suffix
Rob Clark [Tue, 7 Sep 2021 21:36:39 +0000 (14:36 -0700)]
freedreno/ir3: Fix double printing of branch suffix

print_instr_name() already prints the suffix.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>

3 years agofreedreno/ir3: Fix physical successors for break out of loop
Rob Clark [Tue, 7 Sep 2021 21:27:17 +0000 (14:27 -0700)]
freedreno/ir3: Fix physical successors for break out of loop

We can't just clobber the existing successor[0] which is based on
logical successor[0]

Suggested-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>

3 years agofreedreno/ir3: Update physical_successors after retargetting jumps
Rob Clark [Tue, 7 Sep 2021 21:55:04 +0000 (14:55 -0700)]
freedreno/ir3: Update physical_successors after retargetting jumps

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12742>

3 years agoglsl: break out early if compound assignment's operand errored out
Marcin Ślusarz [Mon, 6 Sep 2021 11:02:41 +0000 (13:02 +0200)]
glsl: break out early if compound assignment's operand errored out

Fixes compiler crashes on:

struct Foo
{
  float does_exist_member;
};

in vec2 tex;
out vec4 color;

void
main(void)
{
  Foo foo;

  foo.does_not_exist_member %= 3; /* or any of: <<=, >>=, &=, |=, ^= */
  color = vec4(tex.xy, tex.xy);
}

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
CC: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12717>

3 years agoglsl: propagate errors from *=, /=, +=, -= operators
Marcin Ślusarz [Fri, 3 Sep 2021 09:46:46 +0000 (11:46 +0200)]
glsl: propagate errors from *=, /=, +=, -= operators

Fixes compiler crash on:

void main()
{
    gl_FragColor = a += 1;
}

(a is not declared anywhere)

Found with AFL++.

Fixes: d1fa69ed61d ("glsl: do not attempt assignment if operand type not parsed correctly")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12717>

3 years agozink: fix some pipe caps for max instructions
Mike Blumenkrantz [Wed, 1 Sep 2021 13:47:44 +0000 (09:47 -0400)]
zink: fix some pipe caps for max instructions

all shaders are supported now

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

3 years agozink: use dispatch table for (almost) all vulkan calls
Mike Blumenkrantz [Wed, 18 Aug 2021 13:59:18 +0000 (09:59 -0400)]
zink: use dispatch table for (almost) all vulkan calls

try to avoid hitting the loader when possible

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

3 years agolima: Improve error messages for unsupported GP operations
Icecream95 [Mon, 6 Sep 2021 09:42:13 +0000 (21:42 +1200)]
lima: Improve error messages for unsupported GP operations

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738>

3 years agolima: Fix crashes for GPUs with more than four cores
Icecream95 [Mon, 6 Sep 2021 09:38:43 +0000 (21:38 +1200)]
lima: Fix crashes for GPUs with more than four cores

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738>

3 years agolima: Enable PIPE_CAP_VERTEX_COLOR_UNCLAMPED
Icecream95 [Mon, 6 Sep 2021 09:35:26 +0000 (21:35 +1200)]
lima: Enable PIPE_CAP_VERTEX_COLOR_UNCLAMPED

Fixes lighting being too bright in Neverball.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12738>

3 years agoglsl: fix variable scope for do-while loops
Timothy Arceri [Mon, 23 Aug 2021 08:54:16 +0000 (18:54 +1000)]
glsl: fix variable scope for do-while loops

Without this the following code was successfully compiling.

   void main()
   {
      do
         int var_1 = 0;
      while (false);

      var_1++;
   }

Fixes: a87ac255cf7e ("Initial commit.  lol")

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465>

3 years agoglsl: handle scope correctly when inlining loop expression
Timothy Arceri [Tue, 24 Aug 2021 07:54:06 +0000 (17:54 +1000)]
glsl: handle scope correctly when inlining loop expression

We need to clone the previously evaluated loop expression when
inlining otherwise we will have conflicts with shadow variables
defined in deeper scopes.

Fixes: 5c02e2e2de75 ("glsl: Generate IR for switch statements")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5255

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465>

3 years agoglsl: fix variable scope for loop-expression
Timothy Arceri [Mon, 23 Aug 2021 07:52:22 +0000 (17:52 +1000)]
glsl: fix variable scope for loop-expression

We need to evaluate the loop-expression of a for loop before
we evaluate the loop body otherwise we will find the wrong
variable for the following loop.

   int var_0 = 0;
   for(; var_0 < 10; var_0++) {
      const float var_0 = 1.0;
      gl_FragColor = vec4(0.0, var_0, 0.0, 0.0);
   }

Fixes: a87ac255cf7e ("Initial commit.  lol")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5262

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12465>

3 years agomesa: fix mesa_problem() call in _mesa_program_state_flags()
Timothy Arceri [Tue, 7 Sep 2021 06:19:17 +0000 (16:19 +1000)]
mesa: fix mesa_problem() call in _mesa_program_state_flags()

Previously STATE_INTERNAL returned 0 for the unhandled states
but the outer switch throws the error for unhandled states.

Fixes: b4f3497786ef ("mesa: remove STATE_INTERNAL")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5316

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12746>

3 years agozink: use EXT_primitive_topology_list_restart where available
Mike Blumenkrantz [Mon, 30 Aug 2021 19:22:43 +0000 (15:22 -0400)]
zink: use EXT_primitive_topology_list_restart where available

this also fixes an error where PATCHES was reported as supported

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

3 years agozink: hook up VK_EXT_primitive_topology_list_restart
Mike Blumenkrantz [Mon, 30 Aug 2021 19:17:19 +0000 (15:17 -0400)]
zink: hook up VK_EXT_primitive_topology_list_restart

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

3 years agolavapipe: fix primitive restart with indexed indirect draws
Mike Blumenkrantz [Wed, 8 Sep 2021 02:44:41 +0000 (22:44 -0400)]
lavapipe: fix primitive restart with indexed indirect draws

restart index needs to be set

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

3 years agoutil/primconvert: force restart rewrites if original primtype wasn't supported
Mike Blumenkrantz [Mon, 30 Aug 2021 20:22:08 +0000 (16:22 -0400)]
util/primconvert: force restart rewrites if original primtype wasn't supported

if we're doing a primtype change, the restart needs to be eliminated to
avoid losing restart data after the rewrite

Fixes: 583070748cb ("util/primconvert: handle rewriting of prim-restart draws with unsupported primtype")

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12625>

3 years agomicrosoft/spirv_to_dxil: Add `install : true` to spirv_to_dxil library.
Michael Tang [Tue, 7 Sep 2021 23:55:10 +0000 (16:55 -0700)]
microsoft/spirv_to_dxil: Add `install : true` to spirv_to_dxil library.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12758>

3 years agoci: Add osmesa to Windows GitLab CI
pal1000 [Tue, 7 Sep 2021 19:16:44 +0000 (22:16 +0300)]
ci: Add osmesa to Windows GitLab CI

osmesa CI coverage on Windows was lost when Windows CI with
Meson build was migrated from AppVeyor to GitLab CI

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8672>

3 years agomain: don't always clamp pixels read from snorm buffers
Italo Nicola [Tue, 7 Sep 2021 13:37:20 +0000 (10:37 -0300)]
main: don't always clamp pixels read from snorm buffers

From the OpenGL 4.6 spec, section 18.2.8:

"For a signed normalized fixed-point color buffer, each component is
clamped to [0,1] if read color clamping is enabled, or if type
represents un- signed integer components; otherwise type represents
signed integer components, and each component is clamped to [−1,1]."

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12749>

3 years agozink: clamp query results to 500 per qbo on 32bit
Mike Blumenkrantz [Tue, 7 Sep 2021 16:17:55 +0000 (12:17 -0400)]
zink: clamp query results to 500 per qbo on 32bit

this makes 4000byte qbos instead of 40000, which avoids bypassing slab
allocation and makes the buffers more reusable to avoid exploding 32bit
address space

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12752>

3 years agollvmpipe: memcpy user_buffers at set_constant_buffer time.
Emma Anholt [Fri, 3 Sep 2021 17:54:36 +0000 (10:54 -0700)]
llvmpipe: memcpy user_buffers at set_constant_buffer time.

The data in the user buffer is only valid for a short period of time, and
we could use-after-free it if rendering hadn't been flushed by shader
deletion time.

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

3 years agollvmpipe: Fix leak of CS local memory with 0 threads.
Emma Anholt [Fri, 3 Sep 2021 20:28:58 +0000 (13:28 -0700)]
llvmpipe: Fix leak of CS local memory with 0 threads.

Fixes: bde08ce4d7bf ("llvmpipe: handle compute shader launch with 0 threads")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12724>

3 years agollvmpipe: Free CS shader images on context destroy.
Emma Anholt [Fri, 3 Sep 2021 23:02:46 +0000 (16:02 -0700)]
llvmpipe: Free CS shader images on context destroy.

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

3 years agoiris: signal the syncobj after a failed batch
Paulo Zanoni [Tue, 31 Aug 2021 21:16:32 +0000 (14:16 -0700)]
iris: signal the syncobj after a failed batch

When a batch fails we either recreate our context (in case we got -EIO
or -ENOMEM) or we abort() (every other error). If we don't abort and a
later batch has a dependency on the batch that failed, then this newer
batch will fail with -EINVAL since it requires a syncobj that was
never submitted, which means we'll abort().

To avoid this problem, in this patch we simply signal syncobjs of
failed batches. This means we may be breaking our dependency tracking,
but IMHO it's better than simply letting it abort() later.

In other words, this moves the situation for some apps from "app
causes a GPU hang and then aborts" to "app causes a GPU hang but keeps
running".

Note: on some older Kernels (like today's Debian 5.10 Kernel) I see X
simply freezing after the GPU hang when the app doesn't decide to
abort(). Switching to a more recent Kernel fixes this issue for me, so
in case it happens to you make sure you have the most recent stable
trees.

v2:
  - Fix coding style (Ken).
  - Use the big comment block provided by Ken (Ken).
  - Adjust the commit message so avoid saying we retry (Ken).
  - Rebase after the syncobj ownership changes.
  - Drive-by add a missing white space in the header.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12657>

3 years agoci/freedreno: Skip slow SizedDeclarationsPrimitive in CI.
Emma Anholt [Tue, 7 Sep 2021 18:10:16 +0000 (11:10 -0700)]
ci/freedreno: Skip slow SizedDeclarationsPrimitive in CI.

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

3 years agoci/freedreno: Mark a630 basic-glsl-misc-fs as flaky.
Emma Anholt [Tue, 7 Sep 2021 17:58:58 +0000 (10:58 -0700)]
ci/freedreno: Mark a630 basic-glsl-misc-fs as flaky.

My branch mostly fixed it, but apparently it's not stable yet.

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

3 years agoci/freedreno: Fix typo in glx-tfp flake annotation.
Emma Anholt [Tue, 7 Sep 2021 18:11:17 +0000 (11:11 -0700)]
ci/freedreno: Fix typo in glx-tfp flake annotation.

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

3 years agofreedreno/a6xx: Emit a WFI after event writes flushing CCU.
Emma Anholt [Wed, 18 Aug 2021 17:08:15 +0000 (10:08 -0700)]
freedreno/a6xx: Emit a WFI after event writes flushing CCU.

Following on from !12475, do the same CCU workaround for freedreno as
turnip is doing, so that we flush CCU correctly for when color/depth is
next read under a different cache domain from where it was written.

Fixes instability (particularly if the GPU is clocked up) on
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8* in bypass
mode on a630.

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

3 years agoac,radv: remove unused inputs array and VS input code
Marek Olšák [Sat, 4 Sep 2021 05:20:12 +0000 (01:20 -0400)]
ac,radv: remove unused inputs array and VS input code

The previous commit stopped using "inputs".

"load_layer_id" has always been broken and it was probably unused anyway.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoac,radeonsi: load VS inputs at the call site of nir_intrinsic_load_input
Marek Olšák [Sat, 21 Aug 2021 03:59:05 +0000 (23:59 -0400)]
ac,radeonsi: load VS inputs at the call site of nir_intrinsic_load_input

to match ACO

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoac/llvm: implement nir_intrinsic_elect
Marek Olšák [Wed, 1 Sep 2021 08:02:16 +0000 (04:02 -0400)]
ac/llvm: implement nir_intrinsic_elect

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoac/llvm: implement nir_intrinsic_overwrite_*_arguments_amd
Marek Olšák [Sat, 21 Aug 2021 02:10:38 +0000 (22:10 -0400)]
ac/llvm: implement nir_intrinsic_overwrite_*_arguments_amd

This should work if the intrinsics are not called from conditional blocks.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoac: make ac_shader_abi::inputs an array instead of a pointer
Marek Olšák [Sat, 21 Aug 2021 14:16:47 +0000 (10:16 -0400)]
ac: make ac_shader_abi::inputs an array instead of a pointer

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoac: remove needless parameters from ac_shader_abi::emit_outputs
Marek Olšák [Sat, 21 Aug 2021 14:12:23 +0000 (10:12 -0400)]
ac: remove needless parameters from ac_shader_abi::emit_outputs

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoac/llvm: implement a bunch of NIR AMD intrinsics for NGG
Marek Olšák [Sat, 21 Aug 2021 02:09:15 +0000 (22:09 -0400)]
ac/llvm: implement a bunch of NIR AMD intrinsics for NGG

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoac/llvm: remove load_tess_coord callback
Marek Olšák [Fri, 20 Aug 2021 23:32:20 +0000 (19:32 -0400)]
ac/llvm: remove load_tess_coord callback

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12570>

3 years agoci/iris: Switch GL/GLES testing to suites.
Emma Anholt [Tue, 17 Aug 2021 20:14:37 +0000 (13:14 -0700)]
ci/iris: Switch GL/GLES testing to suites.

Better board utilization, less fussy load-balancing of the boards, and
being able to add KHR-GLES* and multisample testing without having to add
more reboots.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437>

3 years agoci/iris: Consistently use .test-manual-mr for our unstable hardware.
Emma Anholt [Fri, 20 Aug 2021 21:01:39 +0000 (14:01 -0700)]
ci/iris: Consistently use .test-manual-mr for our unstable hardware.

... and place it in the board's definition, instead of the consuming jobs.

GLK and APL are the boards that are enabled by default so far, and the
rest are off.  But, if you want to check on some other board, you should
be able to click the button.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437>

3 years agoci/iris: Unmark dma_buf_import_export tests as failing.
Emma Anholt [Tue, 31 Aug 2021 17:17:28 +0000 (10:17 -0700)]
ci/iris: Unmark dma_buf_import_export tests as failing.

We now get the binaries built in our rootfs.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437>

3 years agoci/iris: Mark create_context-no_error as failing.
Emma Anholt [Tue, 31 Aug 2021 19:08:13 +0000 (12:08 -0700)]
ci/iris: Mark create_context-no_error as failing.

Consistent in CI, and other drivers fail at it too.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12437>

3 years agoir3/lower_pcopy: Set entry->done in the swap loop
Connor Abbott [Tue, 7 Sep 2021 09:45:07 +0000 (11:45 +0200)]
ir3/lower_pcopy: Set entry->done in the swap loop

We process all the remaining copy entries one-at-a-time when emitting
swaps, so normally we wouldn't need to care about whether the entry is
done, except that we need to look at the other entries to split them up
and we need to skip this when the copy to be split has already been
processed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5307
Fixes: 0ffcb19b9d9 ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12747>

3 years agoir3/lower_pcopy: Use right flags for src const/immed
Connor Abbott [Tue, 7 Sep 2021 09:42:21 +0000 (11:42 +0200)]
ir3/lower_pcopy: Use right flags for src const/immed

At some point I split up the flags into overall/source flags and made
copies from immed/const only set IR3_REG_IMMED/IR3_REG_CONST on the
source flags, but I forgot to update this. Noticed by inspection.

Fixes: 0ffcb19b9d9 ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12747>

3 years agollvmpipe: Don't wait for already-terminated threads on Windows
Jesse Natalie [Sat, 4 Sep 2021 19:18:21 +0000 (12:18 -0700)]
llvmpipe: Don't wait for already-terminated threads on Windows

In the case of an app returning from main(), Windows will apparently terminate
other threads before invoking final cleanup on the main thread.

llvmpipe can't wait for threads to signal a semaphore if the thread is already
gone. Since we're already in a WIN32 special case, just call the Win32 API
to check if the thread is terminated or STILL_ALIVE.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12731>

3 years agov3d: Enable PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE
Jose Maria Casanova Crespo [Mon, 6 Sep 2021 17:43:14 +0000 (19:43 +0200)]
v3d: Enable PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12744>

3 years agowinsys/radeonsi: Set vce_encode = true when VCE found
Ed Martin [Wed, 1 Sep 2021 14:39:08 +0000 (10:39 -0400)]
winsys/radeonsi: Set vce_encode = true when VCE found

Allows VA-API encoding on AMD PITCAIRN

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5305
Fixes: 43c04ab2b43 ("radeonsi: separate video hw info based on HW engine individually")

Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12679>

3 years agoradeon/vcn: Add FW header flag to enable VP9 header parsing
Veerabadhran Gopalakrishnan [Fri, 27 Aug 2021 06:43:55 +0000 (12:13 +0530)]
radeon/vcn: Add FW header flag to enable VP9 header parsing

set flags to enable VP9 uncompressed header parsing in FW and extract
quantization and loop filter parameters.

Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12703>

3 years agozink: fix PIPE_SHADER_CAP_FP16_DERIVATIVES handling
Mike Blumenkrantz [Wed, 1 Sep 2021 13:35:58 +0000 (09:35 -0400)]
zink: fix PIPE_SHADER_CAP_FP16_DERIVATIVES handling

this requires 16bit io, not just alus

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

3 years agozink: handle bo struct types that are just a runtime array
Mike Blumenkrantz [Thu, 5 Aug 2021 18:04:49 +0000 (14:04 -0400)]
zink: handle bo struct types that are just a runtime array

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

3 years agozink: handle 8/16bit ssbo storage
Mike Blumenkrantz [Tue, 20 Jul 2021 20:40:59 +0000 (16:40 -0400)]
zink: handle 8/16bit ssbo storage

this is a bit gross, but basically just add an array of extra spvids
so that each bitsize can have its own variables to keep the types in sync

glsl can't do this, but (future) internal mesa shaders can

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

3 years agozink: implement nir_op_pack_half_2x16_split
Mike Blumenkrantz [Tue, 20 Jul 2021 20:07:34 +0000 (16:07 -0400)]
zink: implement nir_op_pack_half_2x16_split

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

3 years agozink: lower 32_2x16_split pack/unpack instructions
Mike Blumenkrantz [Tue, 20 Jul 2021 20:07:07 +0000 (16:07 -0400)]
zink: lower 32_2x16_split pack/unpack instructions

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

3 years agozink: hook up 8/16bit storage exts
Mike Blumenkrantz [Tue, 20 Jul 2021 20:06:58 +0000 (16:06 -0400)]
zink: hook up 8/16bit storage exts

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

3 years agozink: add 8bit alu handling
Mike Blumenkrantz [Tue, 20 Jul 2021 20:06:45 +0000 (16:06 -0400)]
zink: add 8bit alu handling

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

3 years agozink: fix PIPE_CAP_DRAW_PARAMETERS export
Mike Blumenkrantz [Thu, 2 Sep 2021 17:27:25 +0000 (13:27 -0400)]
zink: fix PIPE_CAP_DRAW_PARAMETERS export

before 1.2, assume this is available if the extension is there, otherwise
require the feature

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

3 years agozink: always emit sample id 0 for non-msaa texel pointers in ntv
Mike Blumenkrantz [Thu, 2 Sep 2021 16:44:07 +0000 (12:44 -0400)]
zink: always emit sample id 0 for non-msaa texel pointers in ntv

in practice this shouldn't matter since the sample id must always be zero,
but it's still a spec violation

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