platform/upstream/mesa.git
3 years agozink: update docs
Mike Blumenkrantz [Mon, 26 Apr 2021 19:29:15 +0000 (15:29 -0400)]
zink: update docs

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

3 years agozink: ci updates
Mike Blumenkrantz [Mon, 26 Apr 2021 15:43:08 +0000 (11:43 -0400)]
zink: ci updates

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>

3 years agozink: implement VK_EXT_provoking_vertex
Mike Blumenkrantz [Tue, 20 Apr 2021 21:04:02 +0000 (17:04 -0400)]
zink: implement VK_EXT_provoking_vertex

this only needs to be set if the mode is LAST, otherwise the normal
pipeline state can be used and this one can be omitted

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>

3 years agozink: hook up VK_EXT_provoking_vertex
Mike Blumenkrantz [Tue, 20 Apr 2021 20:32:50 +0000 (16:32 -0400)]
zink: hook up VK_EXT_provoking_vertex

ideally we would want to require transformFeedbackPreservesTriangleFanProvokingVertex,
but as there is no fallback path, any amount of provoking vertex support
is still better than none, so tests related to this will continue to fail
for that hardware (intel)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>

3 years agolavapipe: implement VK_EXT_provoking_vertex
Mike Blumenkrantz [Tue, 20 Apr 2021 21:19:05 +0000 (17:19 -0400)]
lavapipe: implement VK_EXT_provoking_vertex

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458>

3 years agovulkan/x11: Mark present complete using serial instead of MSC
Keith Packard [Sat, 24 Apr 2021 22:35:34 +0000 (15:35 -0700)]
vulkan/x11: Mark present complete using serial instead of MSC

Present operations do not necessarily complete after the requested
time; if the CRTC has been blanked, they will complete
immediately. This means we cannot use the MSC value to tell when a
present has finished.

Instead of using MSC, track whether each present is complete by serial
number, which is the low 32-bits of the SBC value. This value is
provided in the present_pixmap request and returned in the present
complete notify event.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
3 years agor600: update pipe_draw_info::restart_index only when primitive_restart is enabled
Gert Wollny [Sun, 25 Apr 2021 10:22:20 +0000 (12:22 +0200)]
r600: update pipe_draw_info::restart_index only when primitive_restart is enabled

This avoids the use of uninitialized memory:

Conditional jump or move depends on uninitialised value(s)
   at 0x5EDBF87: r600_draw_vbo (r600_state_common.c:2232)
   by 0x5DEFA00: u_vbuf_draw_vbo (u_vbuf.c:1329)
   by 0x5D990EF: cso_multi_draw (cso_context.c:1445)
   by 0x59B7EF4: _mesa_draw_arrays (draw.c:1346)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10442>

3 years agovirgl: use pipe_draw_info::restart_index only when primitive_restart is enabled
Gert Wollny [Fri, 23 Apr 2021 10:14:05 +0000 (12:14 +0200)]
virgl: use pipe_draw_info::restart_index only when primitive_restart is enabled

Closes #5651

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10442>

3 years agofreedreno: Don't lower indirects in GLSL IR
Connor Abbott [Thu, 22 Oct 2020 13:26:21 +0000 (15:26 +0200)]
freedreno: Don't lower indirects in GLSL IR

nir_lower_io_to_temporaries should generate better code.

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

3 years agoir3, tu: Cleanup indirect i/o lowering
Connor Abbott [Thu, 22 Oct 2020 12:58:01 +0000 (14:58 +0200)]
ir3, tu: Cleanup indirect i/o lowering

Do all the necessary lowering in one place, during finalization, and
stop uselessly calling nir_lower_indirect_derefs in turnip. Splitting
i/o to elements should no longer be necessary since we use the i/o
semantics instead of variables now.

This has the side effect that we no longer generate enormous if-ladders
for tess/GS shaders with turnip.

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

3 years agonir/lower_clip_disable: Fix store writemask
Connor Abbott [Thu, 22 Apr 2021 09:58:35 +0000 (11:58 +0200)]
nir/lower_clip_disable: Fix store writemask

We're storing into the array element, not the whole variable.

Fixes: fb2fe80 ("nir: add lowering pass for clip plane enabling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7274>

3 years agoir3: Prevent oob writes to inputs/outputs array
Connor Abbott [Thu, 22 Apr 2021 13:52:05 +0000 (15:52 +0200)]
ir3: Prevent oob writes to inputs/outputs array

Don't setup inputs and outputs if we aren't using
load_input/store_output intrinsics. While it's mostly harmless, there
may be more outputs than expected which would lead to an oob write of
the outputs array when setting the register id to INVALID_REG.

Also be more paranoid with asserts to catch this.

Fixes: a6291b1 ("freedreno/ir3: rework setup_{input,output} to make struct varyings work")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7274>

3 years agozink: enable required instance ext
Erik Faye-Lund [Mon, 26 Apr 2021 14:33:08 +0000 (16:33 +0200)]
zink: enable required instance ext

VK_KHR_swapchain requires VK_KHR_surface in the instance to be enabled.

This fixes a validation-error.

Fixes: bbeee415eeb ("zink: Learn about VK_KHR_swapchain")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10461>

3 years agodocs: someome -> someone
Erik Faye-Lund [Mon, 26 Apr 2021 15:43:04 +0000 (17:43 +0200)]
docs: someome -> someone

A typo in the section about choice of language is a bit funny, but
let's fix it anyway ;)

Thanks to Ilia Mirkin for pointing this out.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10464>

3 years agoanv: Implement VK_EXT_provoking_vertex
Jason Ekstrand [Fri, 10 Jul 2020 19:09:48 +0000 (14:09 -0500)]
anv: Implement VK_EXT_provoking_vertex

Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10460>

3 years agovulkan: Update the XML and headers to 1.2.177
Jason Ekstrand [Mon, 26 Apr 2021 14:02:07 +0000 (09:02 -0500)]
vulkan: Update the XML and headers to 1.2.177

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10460>

3 years agoanv: Use the same re-order mode for streamout as for GS
Jason Ekstrand [Fri, 10 Jul 2020 18:26:16 +0000 (13:26 -0500)]
anv: Use the same re-order mode for streamout as for GS

This makes the vertex order of TRISTRIP and TRISTRIP_ADJ primitves
consistent between XFB output and GS input.  Technically, the Vulkan
spec allows us to XFB out in whatever order we want but being consistent
with GS inputs is probably nicer to apps.

Fixes: 36ee2fd61c8 "anv: Implement the basic form of VK_EXT_transform_feedback"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10460>

3 years agodocs: add missing zink-requirement
Erik Faye-Lund [Mon, 26 Apr 2021 12:11:56 +0000 (14:11 +0200)]
docs: add missing zink-requirement

We need this feature in order to enable OpenGL 4.2 on Zink.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10456>

3 years agozink: correct image cap checks
Erik Faye-Lund [Wed, 21 Apr 2021 13:37:59 +0000 (15:37 +0200)]
zink: correct image cap checks

PIPE_CAP_IMAGE_LOAD_FORMATTED doesn't depend on
shaderStorageImageExtendedFormats or
shaderStorageImageWriteWithoutFormat.

PIPE_SHADER_CAP_MAX_SHADER_IMAGES enables
GL_EXT_shader_image_load_store, which *does* require
shaderStorageImageExtendedFormats. Having
shaderStorageImageWriteWithoutFormat and
shaderStorageImageReadWithoutFormat isn't enough to support this.

It *might* be possible to lower extended formats to format-less
reads or writes, but we don't currently do that, so we should
just correct the test for now.

Fixes: 3f9a6d333b3 ("zink: export shader image caps using features")
Fixes: 5282210c0b9 ("zink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10456>

3 years agomesa: fix _mesa_add_state_reference() declaration mismatch
Timothy Arceri [Mon, 26 Apr 2021 06:39:06 +0000 (16:39 +1000)]
mesa: fix _mesa_add_state_reference() declaration mismatch

Fixed gcc warnings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>

3 years agomesa: fix _mesa_add{_typed}_unnamed_constant() declarations
Timothy Arceri [Mon, 26 Apr 2021 06:37:01 +0000 (16:37 +1000)]
mesa: fix _mesa_add{_typed}_unnamed_constant() declarations

The function may be passed in a single float or a vec4. Fixes
gcc warnings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>

3 years agomesa: make _mesa_find_temp_intervals() a static function
Timothy Arceri [Mon, 26 Apr 2021 06:35:05 +0000 (16:35 +1000)]
mesa: make _mesa_find_temp_intervals() a static function

It is no longer used externally.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10446>

3 years agodocs: fix quoting around a few limits
Erik Faye-Lund [Mon, 26 Apr 2021 12:11:01 +0000 (14:11 +0200)]
docs: fix quoting around a few limits

These two were quoted differently than the other limits in this
document. Let's fix that to be consistent.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10455>

3 years agodocs: fixup link to extension
Erik Faye-Lund [Mon, 26 Apr 2021 12:09:49 +0000 (14:09 +0200)]
docs: fixup link to extension

I accidentally missed the actual link-definition here, so let's add
that.

Fixes: ff007afce25 ("zink: document requirement of VK_EXT_custom_border_color")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10455>

3 years agozink: remove memory-model leftovers
Erik Faye-Lund [Wed, 21 Apr 2021 14:08:41 +0000 (16:08 +0200)]
zink: remove memory-model leftovers

We also need to stop emitting these details, otherwise we need to answer
to the validator!

Fixes: 95d9d811c91 ("zink: do not require vulkan memory model for shader-images")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10377>

3 years agoradv: disable VK_FORMAT_R64_SFLOAT
Rhys Perry [Mon, 26 Apr 2021 10:45:32 +0000 (11:45 +0100)]
radv: disable VK_FORMAT_R64_SFLOAT

This format was enabled by accident, isn't useful, and doesn't work.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4701
Cc: 21.1 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10450>

3 years agozink: only emit extended-formats cap if needed
Erik Faye-Lund [Wed, 21 Apr 2021 09:53:40 +0000 (11:53 +0200)]
zink: only emit extended-formats cap if needed

We do not require the extended formats feature to enable shader-images,
so we can end up accidentally enabling the cap even when we don't need
to, which can lead to validation issues.

This also prepares us for the SPV_EXT_shader_image_int64 extension, if
we ever want to support that.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10370>

3 years agodocs: use code-block for ini
Erik Faye-Lund [Thu, 15 Apr 2021 13:47:08 +0000 (15:47 +0200)]
docs: use code-block for ini

These code-blocks are close enough to INI-files to parse that way, so
let's use that for some syntax-coloring :)

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: use code-block for c
Erik Faye-Lund [Thu, 15 Apr 2021 14:08:52 +0000 (16:08 +0200)]
docs: use code-block for c

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: use code-block for glsl
Erik Faye-Lund [Thu, 15 Apr 2021 12:51:15 +0000 (14:51 +0200)]
docs: use code-block for glsl

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: use code-block for console-content
Erik Faye-Lund [Thu, 15 Apr 2021 13:39:10 +0000 (15:39 +0200)]
docs: use code-block for console-content

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: use math notation for example matrices
Erik Faye-Lund [Thu, 15 Apr 2021 14:23:34 +0000 (16:23 +0200)]
docs: use math notation for example matrices

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: use tables instead of pre-formatted text
Erik Faye-Lund [Thu, 15 Apr 2021 13:32:26 +0000 (15:32 +0200)]
docs: use tables instead of pre-formatted text

This makes this easier to read.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: nest cherry-pick example under note
Erik Faye-Lund [Thu, 15 Apr 2021 13:58:15 +0000 (15:58 +0200)]
docs: nest cherry-pick example under note

This example relates to the message in the note, so it should be nested
under that note.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: remove documentation of MESA_HPCR_CLEAR
Erik Faye-Lund [Fri, 16 Apr 2021 09:07:55 +0000 (11:07 +0200)]
docs: remove documentation of MESA_HPCR_CLEAR

We haven't respected this variable for about 10 years, as the support
was removed in bc63b226bcc ("xlib: remove a ton of old xlib driver
cruft").

So let's also remove the documentation.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: remove documentation of MESA_PRIVATE_CMAP
Erik Faye-Lund [Fri, 16 Apr 2021 09:02:09 +0000 (11:02 +0200)]
docs: remove documentation of MESA_PRIVATE_CMAP

This is used in the Mesa GLUT implementation, which has been separated
out into its own repo, and is largely abandoned in favour of FreeGLUT.

So let's not try to document MESA_PRIVATE_CMAP, as it's just going to
confuse users.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: remove documentation of MESA_CI_VISUAL
Erik Faye-Lund [Fri, 16 Apr 2021 08:53:15 +0000 (10:53 +0200)]
docs: remove documentation of MESA_CI_VISUAL

The support for color-indexed rendering was removed from mesa all the
way back in 2010, in commit 81fe9949ef0 ("mesa/xlib: Remove support for
color-index rendering").

So let's drop it from our documentation as well. This environment
variable does nothing.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agodocs: remove out-of-date gles info
Erik Faye-Lund [Thu, 15 Apr 2021 13:49:02 +0000 (15:49 +0200)]
docs: remove out-of-date gles info

This info is no longer true, so let's delete it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10281>

3 years agoradv: re-introduce missing skip list for Polaris10
Samuel Pitoiset [Mon, 26 Apr 2021 06:43:13 +0000 (08:43 +0200)]
radv: re-introduce missing skip list for Polaris10

The list shouldn't have been removed but replaced.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10448>

3 years agomesa: fix incomplete GL_NV_half_float implementation
Timothy Arceri [Fri, 23 Apr 2021 10:39:50 +0000 (20:39 +1000)]
mesa: fix incomplete GL_NV_half_float implementation

All of the VertexAttrib* functions were missing.

Fixes: ef66e02a408c ("src/mesa: add GL_NV_half_float extension support (v2)")

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

3 years agodocs/lima: add an initial page for Lima
Erico Nunes [Wed, 21 Apr 2021 23:15:06 +0000 (01:15 +0200)]
docs/lima: add an initial page for Lima

This is a cleaned up and updated version of the readme page for Lima
that was until now being maintained separately.
Let's move it in-tree so it is maintained along with the pages for
other similar drivers.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10406>

3 years agomicrosoft/spirv_to_dxil: Treat read-only storage images as SRVs
Jesse Natalie [Tue, 20 Apr 2021 15:24:33 +0000 (08:24 -0700)]
microsoft/spirv_to_dxil: Treat read-only storage images as SRVs

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>

3 years agomicrosoft/compiler: Treat read-only SSBOs as SRVs
Jesse Natalie [Tue, 20 Apr 2021 15:23:20 +0000 (08:23 -0700)]
microsoft/compiler: Treat read-only SSBOs as SRVs

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10356>

3 years agonir_lower_readonly_images_to_tex: Use nir_shader_lower_instructions
Jesse Natalie [Wed, 21 Apr 2021 14:40:04 +0000 (07:40 -0700)]
nir_lower_readonly_images_to_tex: Use nir_shader_lower_instructions

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

3 years agonir_lower_readonly_images_to_tex: Support non-CL semantics
Jesse Natalie [Tue, 20 Apr 2021 15:08:32 +0000 (08:08 -0700)]
nir_lower_readonly_images_to_tex: Support non-CL semantics

For non-CL, intrinsic access isn't set, because the image type doesn't
have access qualifier. Instead, the access qualifier is set on the variable.

So, add a mode to this pass which can chase back to the variable in addition
to the intrinsic access. Also, update the variable type and the deref chain
types so everything is consistent, that the tex is accessing a sampler. Note
we can't do this for CL, because void-typed samplers don't exist.

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

3 years agonir: Rename nir_lower_cl_images_to_tex, replace 'cl' with 'readonly'
Jesse Natalie [Tue, 20 Apr 2021 14:43:18 +0000 (07:43 -0700)]
nir: Rename nir_lower_cl_images_to_tex, replace 'cl' with 'readonly'

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

3 years agovtn: Propagate access data from UBO/SSBO/push constant types to variables of that...
Jesse Natalie [Tue, 20 Apr 2021 00:32:55 +0000 (17:32 -0700)]
vtn: Propagate access data from UBO/SSBO/push constant types to variables of that type, not just their pointers

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

3 years agovtn: Propagate access data that's present on all struct members to the struct itself
Jesse Natalie [Mon, 19 Apr 2021 23:04:14 +0000 (16:04 -0700)]
vtn: Propagate access data that's present on all struct members to the struct itself

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

3 years agotgsi_exec: Fix NaN behavior of min and max
Ian Romanick [Fri, 23 Apr 2021 00:46:39 +0000 (17:46 -0700)]
tgsi_exec: Fix NaN behavior of min and max

Modern shader APIs, like DX10 and GLSL 1.30, want min() and max() to
"cleanse" NaN.  If one source is NaN, the other value should be chosen.
If both sources are NaN, the result may be either.

There are many cases where TGSI is generate from NIR, and many
optimizations in NIR expect this behavior.  Not meeting these
expectations can lead to unexpected results.

Reviewed-by: Eric Anholt <eric@anholt.net>
Fixes: ffe58739da9 ("Softpipe: import TGSI tree. Not hooked-up yet.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10419>

3 years agotgsi_exec: Fix NaN behavior of saturate
Ian Romanick [Fri, 23 Apr 2021 00:41:57 +0000 (17:41 -0700)]
tgsi_exec: Fix NaN behavior of saturate

Modern shader APIs, like DX10 and GLSL 1.30, want saturate or
clamp(..., 0.0, 1.0) to "cleanse" NaN.  If the source is NaN, the
result should be zero.

There are many cases where TGSI is generate from NIR, and many
optimizations in NIR expect this behavior.  Not meeting these
expectations can lead to unexpected results.

Reviewed-by: Eric Anholt <eric@anholt.net>
Fixes: 56c30bf17b9 ("tgsi: Saturate modifier obeys ExecMask. Implement NVIDIA [-1;+1] saturate mode.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10419>

3 years agoradv: Merge dEQP default skips into all generation-specific skip lists
Charlie Turner [Thu, 22 Apr 2021 15:17:28 +0000 (16:17 +0100)]
radv: Merge dEQP default skips into all generation-specific skip lists

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8147
obsoleted
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4656 so the
default skips are not being used.

Instead, merge the defaults into each generation's skip list. Also
remove the "Fixed by CTS 3dddaeca8 ("Fix source blit image size")",
since the VK-GL-CTS has been updated to vulkan-cts-1.2.6.0 already,
which includes 3dddaeca8

Nowadays, the only option is to have default skips per GPU
version (c.f. GPU_VERSION variable in deqp-runner), since the runner
doesn't have a "skip list merge" feature.

v2.
  - Removed deqp-radv-polaris10-skips.txt in response to Samuel's feedback.

v3.
  - Add review tags.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10413>

3 years agoci: Remove obsolete reference to DEQP_SKIPS
Charlie Turner [Tue, 6 Apr 2021 18:18:04 +0000 (19:18 +0100)]
ci: Remove obsolete reference to DEQP_SKIPS

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8147 didn't
remove all the incidences.

v2.
  - Add review tags.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10413>

3 years agoglx: Implement GLX_EXT_no_config_context
Adam Jackson [Tue, 14 Nov 2017 20:13:06 +0000 (15:13 -0500)]
glx: Implement GLX_EXT_no_config_context

This is the GLX counterpart to EGL_KHR_no_config_context. Contexts may
now be created without reference to an fbconfig, in which case it is
treated as compatible with any fbconfig (and thus any GLX drawable).

Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8999>

3 years agoci/radeonsi: Mark a glx_arb_sync_control/timing flake.
Eric Anholt [Thu, 22 Apr 2021 22:02:20 +0000 (15:02 -0700)]
ci/radeonsi: Mark a glx_arb_sync_control/timing flake.

I've seen this one happen at least twice today. Log shows something like:

    Wallclock time between MSCs 16982.888889us does not match
    glXGetMscRateOML 16668.071966us

or

    Wallclock time between MSCs 16500.333333us does not match
    glXGetMscRateOML 16668.071966us

Incidentally, both runs I've looked into had one run too fast and one run
too slow.

Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10414>

3 years agod3d12: Switch to nir_lower_fragcolor
Alyssa Rosenzweig [Thu, 22 Apr 2021 15:29:51 +0000 (11:29 -0400)]
d3d12: Switch to nir_lower_fragcolor

Does everything your pass did, with some bug fixes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>

3 years agonir/lower_fragcolor: Take max cbufs as argument
Alyssa Rosenzweig [Thu, 22 Apr 2021 15:28:42 +0000 (11:28 -0400)]
nir/lower_fragcolor: Take max cbufs as argument

One step closer to generalizing this pass to more drivers.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>

3 years agonir/lower_fragcolor: Fix driver_location assignment
Alyssa Rosenzweig [Thu, 22 Apr 2021 15:23:39 +0000 (11:23 -0400)]
nir/lower_fragcolor: Fix driver_location assignment

Fixes crash in
dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data
when using this pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10411>

3 years agoradv: enable DCC stores with the LLVM backend
Samuel Pitoiset [Fri, 23 Apr 2021 13:06:27 +0000 (15:06 +0200)]
radv: enable DCC stores with the LLVM backend

Just to make it consistent compared to ACO.

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

3 years agoradv/llvm: implement the image load DCC bug
Samuel Pitoiset [Fri, 23 Apr 2021 13:06:10 +0000 (15:06 +0200)]
radv/llvm: implement the image load DCC bug

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

3 years agoradv: remove warnings about RADV_PERFTEST=aco,llvm
Samuel Pitoiset [Fri, 23 Apr 2021 12:11:33 +0000 (14:11 +0200)]
radv: remove warnings about RADV_PERFTEST=aco,llvm

These warnings have been introduced after switching ACO by default
for Mesa 20.2. I think it's time to remove them for 21.2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10435>

3 years agoradv: Remove assert about pDepthStencilState
Tony Wasserka [Fri, 23 Apr 2021 14:56:52 +0000 (16:56 +0200)]
radv: Remove assert about pDepthStencilState

RenderDoc's serialization code replaces unused references with NULL
pointers, which caused this assert to fire when the NULL state wasn't
really dereferenced.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8860>

3 years agopanfrost/ci: Skip draw_indirect.compute_interop.large.*
Boris Brezillon [Fri, 23 Apr 2021 07:46:01 +0000 (09:46 +0200)]
panfrost/ci: Skip draw_indirect.compute_interop.large.*

Some of the dEQP-GLES31.functional.draw_indirect.compute_interop.large
tests create heavy compute jobs which might takes more than the
maximum allowed by the kernel driver (0.5s). Skip them for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10425>

3 years agopan/decode: Print errors when closing dump file
Icecream95 [Fri, 23 Apr 2021 05:34:41 +0000 (17:34 +1200)]
pan/decode: Print errors when closing dump file

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

3 years agopan/decode: Allow frame shader DCDs to be in another BO than the FBD
Icecream95 [Wed, 21 Apr 2021 23:08:49 +0000 (11:08 +1200)]
pan/decode: Allow frame shader DCDs to be in another BO than the FBD

Fixes: 96b71a59c0a ("panfrost: Decode pre/post frame DCDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>

3 years agopanfrost: Fix shader texture count
Icecream95 [Wed, 21 Apr 2021 19:13:39 +0000 (07:13 +1200)]
panfrost: Fix shader texture count

Instead of using num_textures, determine the texture count from the
last bit set in textures_used.

Fixes ADDR_RANGE_FAULTs when draw_textured_quad writes only stencil.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>

3 years agopanfrost: Fix formats converting uninit from AFBC
Alyssa Rosenzweig [Thu, 22 Apr 2021 23:14:47 +0000 (19:14 -0400)]
panfrost: Fix formats converting uninit from AFBC

If no slices were valid (the resource is uninitialized), we were reading
a bogus PIPE_FORMAT_NONE format from the blit.dst.format. Fix this --
and guard against scope similar issues -- by hoisting the blit
assignments out of the loop so they're valid.

Fixes: 9d0ad7fd2e1 ("panfrost: Patch the gallium driver to use pan_image_layout_init()")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10415>

3 years agoradv: make sure CP DMA is idle before executing secondary command buffers
Samuel Pitoiset [Fri, 23 Apr 2021 09:54:22 +0000 (11:54 +0200)]
radv: make sure CP DMA is idle before executing secondary command buffers

Buffer copies with CP DMA aren't synced.

Fix dEQP-VK.memory.pipeline_barrier.transfer_src_transfer_dst.65536
flakes on GFX10+.

Fixes: e8707961134 ("radv: prefer CP DMA for GTT buffer copies/clears on dGPUs due to slow PCIe")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10427>

3 years agoradv/winsys: fix resetting the number of padded IB words
Samuel Pitoiset [Wed, 21 Apr 2021 14:06:30 +0000 (16:06 +0200)]
radv/winsys: fix resetting the number of padded IB words

The number of padded words is per IB, so it should be reset.

Found with Valgrind and dEQP-VK.api.command_buffers.record_many_draws*

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10376>

3 years agoradv/winsys: fix allocating the number of CS in the sysmem path
Samuel Pitoiset [Wed, 21 Apr 2021 13:58:27 +0000 (15:58 +0200)]
radv/winsys: fix allocating the number of CS in the sysmem path

Found with Valgrind and dEQP-VK.api.command_buffers.record_many_draws*.

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10376>

3 years agoradv: remove RADV_DEBUG=nothreadllvm
Samuel Pitoiset [Fri, 23 Apr 2021 10:16:40 +0000 (12:16 +0200)]
radv: remove RADV_DEBUG=nothreadllvm

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

3 years agodocs: list more vulkan extensions
Michel Zou [Mon, 19 Apr 2021 21:36:19 +0000 (23:36 +0200)]
docs: list more vulkan extensions

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10334>

3 years agoci: Update Windows image to build RADV
James Park [Fri, 29 Jan 2021 21:06:04 +0000 (13:06 -0800)]
ci: Update Windows image to build RADV

Add AMDGPU to LLVM_TARGETS_TO_BUILD.

Remove explicit CMAKE_CXX_COMPILER from libclc to dodge regression from
newer CMake. The potential range seems like (3.19.7, 3.20.1].

Add -Dc_std=c17 to support static_assert.

Add -Dcpp_std=vc++latest to support designated initializers.

Add -Dvulkan-drivers=amd for RADV.

Add -Dlibelf:warning_level=1 because of warnings as error.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>

3 years agollvmpipe: Remove stray ## operator for MSVC
James Park [Thu, 22 Apr 2021 20:40:15 +0000 (13:40 -0700)]
llvmpipe: Remove stray ## operator for MSVC

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

3 years agodraw/clip: Use NAN to make MSVC happy
James Park [Thu, 22 Apr 2021 20:38:14 +0000 (13:38 -0700)]
draw/clip: Use NAN to make MSVC happy

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

3 years agoradv: Add <io.h> on WIndows for missing close()
James Park [Thu, 22 Apr 2021 20:13:29 +0000 (13:13 -0700)]
radv: Add <io.h> on WIndows for missing close()

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>

3 years agoradv: Fix unused label warning on Windows
James Park [Thu, 22 Apr 2021 20:12:19 +0000 (13:12 -0700)]
radv: Fix unused label warning on Windows

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>

3 years agoradv: Add _WIN32 guard in radv_check_gpu_hangs
James Park [Thu, 22 Apr 2021 20:11:31 +0000 (13:11 -0700)]
radv: Add _WIN32 guard in radv_check_gpu_hangs

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>

3 years agoamd: Fix warnings around variable sizes
James Park [Thu, 22 Apr 2021 20:09:20 +0000 (13:09 -0700)]
amd: Fix warnings around variable sizes

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>

3 years agoradv: cleanup LLVM related includes
Samuel Pitoiset [Thu, 22 Apr 2021 13:59:22 +0000 (15:59 +0200)]
radv: cleanup LLVM related includes

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

3 years agoac: move ac_lower_indirect_derefs() outside of the LLVM dir
Samuel Pitoiset [Thu, 22 Apr 2021 14:14:32 +0000 (16:14 +0200)]
ac: move ac_lower_indirect_derefs() outside of the LLVM dir

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10403>

3 years agoradv: remove old comment about LLVM <= 8
Samuel Pitoiset [Thu, 22 Apr 2021 08:15:46 +0000 (10:15 +0200)]
radv: remove old comment about LLVM <= 8

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

3 years agoradv/winsys: remove set but never used use_llvm
Samuel Pitoiset [Thu, 22 Apr 2021 08:13:24 +0000 (10:13 +0200)]
radv/winsys: remove set but never used use_llvm

It's no longer necessary since LLVM version has been bumped.

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

3 years agoradv: fix emitting default depth bounds state on GFX6
Samuel Pitoiset [Tue, 20 Apr 2021 11:09:09 +0000 (13:09 +0200)]
radv: fix emitting default depth bounds state on GFX6

GFX6 has no CLEAR_STATE.

One step towards Vulkan conformance on these old chips.

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10347>

3 years agozink: when performing an implicit reset, sync qbos
Mike Blumenkrantz [Thu, 15 Apr 2021 19:13:02 +0000 (15:13 -0400)]
zink: when performing an implicit reset, sync qbos

resetting a query pool+qbo dumpsters the existing qbo results,
so these need to be copied to the new qbo if they exist, and then the query
id needs to be updated to match the expected result offset so everything
keeps working as expected

Fixes: 00fc85a0119 ("zink: reset queries when suspending if >50% of total pool is used")

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

3 years agozink: only reset query on suspend if the query has previously been stopped
Mike Blumenkrantz [Thu, 15 Apr 2021 19:10:30 +0000 (15:10 -0400)]
zink: only reset query on suspend if the query has previously been stopped

if the query has never been stopped, then doing an implicit reset here does
nothing except give the gpu more work

Fixes: 00fc85a0119 ("zink: reset queries when suspending if >50% of total pool is used")

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

3 years agozink: init timeline semaphore on screen creation, not first batch creation
Mike Blumenkrantz [Tue, 13 Apr 2021 13:14:34 +0000 (09:14 -0400)]
zink: init timeline semaphore on screen creation, not first batch creation

this is less racy

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

3 years agozink: use cached memory for staging resources
Mike Blumenkrantz [Mon, 19 Apr 2021 22:28:13 +0000 (18:28 -0400)]
zink: use cached memory for staging resources

I think at one point before staging resource flagging was less reliable
this method made sense, but now it's worse

Fixes: 6ff6d01c377 ("zink: don't use cached mem for staging resources")

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

3 years agozink: restore previous semaphore (prev_sem) handling
Mike Blumenkrantz [Fri, 23 Apr 2021 03:04:47 +0000 (23:04 -0400)]
zink: restore previous semaphore (prev_sem) handling

this was accidentally lost during refactoring

Fixes: fa36a16c684 ("zink: make timeline semaphores per-screen")

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

3 years agozink: track persistent resource objects, not resources
Mike Blumenkrantz [Thu, 15 Apr 2021 12:40:34 +0000 (08:40 -0400)]
zink: track persistent resource objects, not resources

this is broken after the backing object split because resources themselves
no longer have guaranteed lifetimes

Fixes: 616720d6aec ("zink: track resource_object usage instead of resource usage")

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

3 years agosoftpipe: ci updates
Mike Blumenkrantz [Thu, 22 Apr 2021 13:05:46 +0000 (09:05 -0400)]
softpipe: ci updates

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

3 years agosoftpipe: fix streamout queries
Mike Blumenkrantz [Thu, 22 Apr 2021 12:44:53 +0000 (08:44 -0400)]
softpipe: fix streamout queries

these need to always use the query index in order to access the correct
vertex stream

Fixes: ddb9ad363d9 ("softpipe: add support for indexed queries.")

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

3 years agosoftpipe: fix render condition checking
Mike Blumenkrantz [Wed, 21 Apr 2021 23:50:23 +0000 (19:50 -0400)]
softpipe: fix render condition checking

always casting this to a u64 is invalid if the value is just a bool,
and it even generates ASAN/valgrind errors about uninitialized reads

Fixes: 41450b03a8e ("softpipe: implement conditional rendering")

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

3 years agopan/bi: Skip nir_opt_move/sink for blend shaders
Icecream95 [Wed, 7 Apr 2021 11:43:05 +0000 (23:43 +1200)]
pan/bi: Skip nir_opt_move/sink for blend shaders

Otherwise the dual-source input load is moved further down in the
shader, so the registers can get clobbered before then.

Fixes text not being visible in Alacritty.

Fixes: 52863f2e60f ("pan/bi: Enable all nir_opt_move/sink optimizations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10089>

3 years agopanfrost/ci: Enable some dEQP 3.1 tests on Mali T860
Tomeu Vizoso [Mon, 7 Sep 2020 06:49:43 +0000 (08:49 +0200)]
panfrost/ci: Enable some dEQP 3.1 tests on Mali T860

We have now enough machines in the lab for the extra job.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>

3 years agopanfrost/ci: Test GLES 3.1 on Bifrost
Boris Brezillon [Wed, 21 Apr 2021 09:10:46 +0000 (11:10 +0200)]
panfrost/ci: Test GLES 3.1 on Bifrost

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>

3 years agoci: Update to a kernel that has the panfrost MMU fixes
Boris Brezillon [Wed, 21 Apr 2021 12:57:05 +0000 (14:57 +0200)]
ci: Update to a kernel that has the panfrost MMU fixes

Needed for dEQP-GLES31.functional.draw_indirect, otherwise we end up
with GPU faults.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>

3 years agopanfrost: Only advertise INDIRECT_DRAW if the kernel supports HEAP BOs
Boris Brezillon [Wed, 21 Apr 2021 16:04:34 +0000 (18:04 +0200)]
panfrost: Only advertise INDIRECT_DRAW if the kernel supports HEAP BOs

The indirect draw implementation uses a HEAP pool to allocate varyings.
Don't advertise INDIRECT_DRAW if the kernel doesn't support allocating
HEAP BOs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>

3 years agofrontends/va: add VASurfaceAttribUsageHint attribute
Leo Liu [Thu, 22 Apr 2021 18:32:48 +0000 (14:32 -0400)]
frontends/va: add VASurfaceAttribUsageHint attribute

Chrome browser has been calling this attribute to give driver the surface
usage hint. The hints include:
   VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC
   VA_SURFACE_ATTRIB_USAGE_HINT_DECODER
   VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER
   VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ
   VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE
   VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY
   VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT

The surface allocation are generic for us, and we don't need to specify
it. To add the attribute here is because we don't want application which
is calling this attribute to end up returning error and getting no surface
allocated.

Fixes: ebab310987 ("frontends/va: improve surface attribs processing")

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10353>

3 years agor600: don't set an index_bias for indirect draw calls
Gert Wollny [Sun, 28 Mar 2021 08:27:20 +0000 (10:27 +0200)]
r600: don't set an index_bias for indirect draw calls

The bug #4657 mixed up which commit was actually responsible for
the regression, so re-apply this patch.

The indirect draw call already encodes the index bias so that no
additional encoding in the hardware is needed in this case.

This fixes a regression with a number of tests from
   dEQP-GLES31.functional.draw_indirect.random.*

Fixes: c6c532faa8cf172715b38783ec7175b626a63944
  "gallium/u_vbuf: use updated pipe_draw_start_count while using draw_vbo"

Closes #4671

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10388>

3 years agoRevert "r600: Don't advertise support for scaled int16 vertex formats"
Gert Wollny [Tue, 20 Apr 2021 21:57:12 +0000 (23:57 +0200)]
Revert "r600: Don't advertise support for scaled int16 vertex formats"

This reverts commit 00a1521529ccb4f7527c6d55a471ef18d1b000d1.

While the commit fixed some GLES cts tests it introduced heavy regressions
that made the driver unusable.

Closes #4680

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10388>