Commit Graph

154184 Commits

Author SHA1 Message Date
Emma Anholt b82f920384 ci/crosvm: Rename VSOCK_TEMP_DIR -> VM_TEMP_DIR.
It doesn't contain anything about the vsocks, just files shared between
the host and the guest.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16485>
2022-05-18 22:49:20 +00:00
Emma Anholt b836cd937c ci/crosvm: Simplify the CID setup.
Now that deqp-runner tells us which thread we are, we don't need to go
probing for a spare directory to use.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16485>
2022-05-18 22:49:20 +00:00
Jesse Natalie be5c7c0351 dzn: Add new parameter to vk_image_view_init call
Fixes: fc8d2543 ("vulkan,v3dv: Add a driver_internal flag to vk_image_view_init/create")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16589>
2022-05-18 11:03:26 -07:00
Jesse Natalie 29a8f1f03b d3d12: MSVC warning around operator precedence causing uint32_t==bool
Fixes: b171a6ba ("d3d12: Add video encode implementation of pipe_video_codec")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16588>
2022-05-18 09:28:49 -07:00
Jesse Natalie 4b34869d9d d3d12: Don't use VLAs
Fixes: 739283da ("d3d12: Improve planar resource support to handle video requirements")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16588>
2022-05-18 09:28:47 -07:00
Jesse Natalie 9e9c8df3f0 d3d12: Include windows.h on Windows before dxgicommon.h
The dxgicommon.h header uses UINT types without including windows.h itself.

Fixes: 6dbe05ff ("d3d12: Add util video functions to d3d12_format")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16588>
2022-05-18 09:28:30 -07:00
Samuel Pitoiset 8396df5ad9 radv: init states from pRasterizationState at only one place
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16552>
2022-05-18 13:53:35 +00:00
Samuel Pitoiset 7f08fe0b9f radv: init states from pViewportState at only one place
Except the viewport/scissor arrays to avoid useless array copies.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16552>
2022-05-18 13:53:35 +00:00
Samuel Pitoiset f13b30fe62 radv: init states from pTessellationState at only one place
It's part of the pre-rasterization state of graphics pipeline libs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16552>
2022-05-18 13:53:35 +00:00
Connor Abbott 9f67fa368e tu: Implement VK_EXT_pipeline_creation_cache_control
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16562>
2022-05-18 13:14:55 +00:00
Connor Abbott 49827da6fa tu: Implement VK_EXT_pipeline_creation_feedback
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16562>
2022-05-18 13:14:55 +00:00
Connor Abbott e348f2fb38 tu: Zero-initialize compute driver key
Fixes: 05329d7 ("tu: Implement pipeline caching with shared Vulkan cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16562>
2022-05-18 13:14:55 +00:00
Vadym Shovkoplias 33412e0231 drirc: Set limit_trig_input_range option for glmark2
This fixes jellyfish rendering issues in glmark2 on Intel.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6479
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16525>
2022-05-18 12:41:59 +00:00
Danylo Piliaiev 5d377f435b freedreno/a6xx: Add EARLYPREAMBLE flag to all a6xx_sp_xs_ctrl_reg0
Each shader stage has its own "early preamble" flag.

Early preamble is likely an optimization to hide some of latency
when loading UBOs into consts in the preamble.

Early preamble has the following limitations:
- Only shared, a1, and consts regs could be used
  (accessing other regs would result in GPU fault);
- No cat5/cat6, only stc/ldc variants are working;
- Values writen to shared regs are not accessible by the rest
  of the shader;
- Instructions before shps are also considered to be a part of
  early preamble.

Note, for all shaders from d3d11 games blob produced preambles
compatible with early preamble mode.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15901>
2022-05-18 11:17:47 +00:00
Kenneth Graunke c54555c496 Revert "st/mesa: Transcode ASTC to BC7 (BPTC) where possible"
This reverts commit 68ef895674.

When trying out transcode_astc=true with BPTC on Asphalt 9, we observed
very poor image quality - to the point that basic UI icons were blocky,
and buttons with a black border had smeared pixels on the edges.  Using
DXT5 had no such issues.

I originally suspected there was a bug in the BPTC encoder, but I now
believe the issue is deeper than that.  The commit that introduced the
encoder, 17cde55c53, says:

   "The compressor is written from scratch and takes a very simple
    approach.  It always uses a single mode of the BPTC format (4 for
    unorm and 3 for half-floats) and picks the two endpoints by dividing
    the texels into those which have more or less than the average
    luminance of the block and then calculating an average color of the
    texels within each division.

    It's probably not really sensible to try to use BPTC compression at
    runtime because for example with the Nvidia offline compression tool
    it can take in the order of an hour to compress a full-screen image.
    With that in mind I don't think it's worth having a proper compressor
    in Mesa and this approach gives reasonable results for a usage that
    is basically a corner case."

In other words, the reason our BPTC compressor was so fast is that it
only implements one of the modes and does a low quality approximation.
This honestly should probably be improved somewhat, but the original
use case was for online-compression, the uncommon but mandatory OpenGL
feature where you can supply uncompressed data and trust the driver to
compress it for you (at unknown and uncontrolled quality and speed).

Unfortunately, the compressor as it stands is simply not usable for
transcoding ASTC data where we want to preserve the underlying image
quality as much as possible.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16566>
2022-05-18 09:45:43 +00:00
Pierre-Eric Pelloux-Prayer 74a172a448 radeonsi: fix glTexBuffer max size handling
The spec says the number of texels must be clamped to the value of
GL_MAX_TEXTURE_BUFFER_SIZE.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16480>
2022-05-18 10:36:01 +02:00
Juan A. Suarez Romero 2f747663c9 docs: update extensions for V3D and VC4
Mark some extensions that are already supported by V3D and VC4.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16528>
2022-05-18 08:18:21 +00:00
Samuel Pitoiset b014d983bb radv: add new pipeline helpers for NIR->ASM compilation
It walks backwards to compile, looks cleaner to me.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553>
2022-05-18 07:19:20 +00:00
Samuel Pitoiset 8e1085c19a radv: do not try to dump the NIR of the trap handler shader
There is no NIR at all.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553>
2022-05-18 07:19:20 +00:00
Samuel Pitoiset 9207d791af radv: rename shader compile functions to spirv_to_nir/nir_to_asm
For better clarity.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16553>
2022-05-18 07:19:20 +00:00
Martin Roukala (né Peres) 5fc99a1536 radv/ci: enable the experimental support for mesh shaders
The experimental support has been merged for months already, but has
been left unexercised in CI even though dEQP has a mesh_shader.nv
category.

This commit enables the experimental support, which should bring
additional testing \o/.

Suggested-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16550>
2022-05-18 06:48:05 +00:00
Tomeu Vizoso 224544dc33 ci: Disable jobs to the Collabora lab
In anticipation of infrastructure work.

This commit is to be reverted later in the day.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16576>
2022-05-18 08:00:23 +02:00
Jason Ekstrand d35e78bb85 vulkan/pipeline_cache: Implement deserialize for raw objects
When caching NIR, it's cached as a raw object because we cache the
serialized NIR.  When it's then loaded from the disk cache later, we
fail to deserialize it because raw objects are a special case.  There
are two callers of vk_pipeline_cache_object_deserialize(), one of which
has a special case for raw objects and the other is called only when
we've checked that it isn't a raw object.  The special cases are
pointless; raw objects should deserialize themselves.

Fixes: 591da98779 ("vulkan: Add a common VkPipelineCache implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16281>
2022-05-18 04:43:10 +00:00
Mike Blumenkrantz b54516f944 zink: add ZINK_DEBUG=sync
this is great for debugging

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16544>
2022-05-18 02:47:52 +00:00
Mike Blumenkrantz 5d5b6197e3 zink: add c++ guards for zink_screen.h
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16544>
2022-05-18 02:47:52 +00:00
Mike Blumenkrantz b18448e7ac zink: fix non-dynamic vertex stride update flagging
without dynamic vertex input, pipeline vertex state must be recalculated
if buffer strides change or the enabled buffer mask changes in order
to accurately handle dynamic state stride VUs

cc: mesa-stable

fixes:
spec@!opengl 1.1@array-stride

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz ca1d98df99 zink: handle PIPE_BUFFER sparse texture queries
this is legal but was never handled

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 5e4009fe6c zink: clamp 1D_ARRAY sparse textures to 2D as needed
forgot to handle this case

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 7aee9f12b9 zink: force render target usage for sampler-only resources
these might hit u_blitter later, which will require rt usage
to handle texture views, so add rt usage now to avoid failing later

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 9924fecee6 zink: fix surface/bufferview cache comparisons
these caches ignore pNext from the create info since the pNext cannot
affect the eventual object that is created, so comparing it will break
the hash table

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 7057a36359 zink: add extended usage and retry if resource creation fails
this is one of those cases where some bizarro format is being created
for sampling only, but gallium blasts out all the bind flags at once

trust that we're not going to do anything too crazy and let surface
usage pruning handle the rest

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz b6eec12327 zink: remove input attachment usage when pruning surface usage
if the format doesn't support color attachment, it doesn't need to
be an input attachment

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 1c17502ab3 zink: add extra validation for resource creation
check image params against driver's returned limits to avoid
failing later

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 7e69384af1 zink: add separate error message for push descriptor set alloc fail
PRO triggers this if input attachments are used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
Mike Blumenkrantz 07efe6f129 zink: only reject non-blittable resource creation if it has no other binds
the idea here is that if a resource is intended to be used solely as a rendertarget
and can't be blitted to or drawn to, then resource creation should fail

but if the resource might be e.g., a texture, then it can probably hit the subdata
path and be fine

Fixes: 37ac8647fc ("zink: reject resource creation if format features don't match attachment")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16563>
2022-05-18 02:29:18 +00:00
xperia64 e5afbfbed5 wgl: Add driver_zink as a dependency of the wgl frontend
Fixes: 01ed71f945 ("wgl: support kopper")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16569>
2022-05-18 02:18:06 +00:00
Mike Blumenkrantz 43b3f5469d zink: never create a sw context unless sw is requested
this otherwise makes it impossible to accurately do hardware driver
fallback, as zink will create a sw context instead of failing, superceding
the actual sw driver priorities

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16572>
2022-05-17 21:55:55 -04:00
Jonathan Weinstein 2b844aab6a lavapipe: support instance rate zero for VK_EXT_vertex_attribute_divisor
gallium can't directly support vertex attribute instance rate zero, since
the instance rate is also used to determine if the data is per-vertex or
per-instance in the first place (hence divisor zero meaning the data is
per vertex).
While it's an optional feature for VK_EXT_vertex_attribute_divisor, some
apps require it to work (it's a standard d3d10 feature and widely
supported), hence translate it away as MAX_UINT32 divisor instead (which
at this point probably makes more sense than to change the gallium
interface), which should work all the same.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16526>
2022-05-18 01:29:36 +00:00
Jason Ekstrand fa67f119f2 glsl: Drop this != NULL assertions
If this == NULL, we'll get a crash which is pretty much the same thing
when it comes to ease of debugging.  This fixes a giant pile of warnings
with GCC 12 of the form:

    ../src/compiler/glsl/ir.h: In member function ‘ir_dereference* ir_instruction::as_dereference()’:
    ../src/util/macros.h:149:30: warning: ‘nonnull’ argument ‘this’ compared to NULL [-Wnonnull-compare]
      149 | #define assume(expr) ((expr) ? ((void) 0) \
          |                      ~~~~~~~~^~~~~~~~~~~~~~
      150 |                              : (assert(!"assumption failed"), \
          |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      151 |                                 __builtin_unreachable()))
          |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~
    ../src/compiler/glsl/ir.h:150:7: note: in expansion of macro ‘assume’
      150 |       assume(this != NULL);                             \
          |       ^~~~~~
    ../src/compiler/glsl/ir.h:160:4: note: in expansion of macro ‘AS_BASE’
      160 |    AS_BASE(dereference)

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16558>
2022-05-18 00:37:50 +00:00
Chia-I Wu 2410993ef6 turnip: fix off-by-one in border color bitset
BITSET_FFS reserves 0 for no bit set.  BITSET_CLEAR just below cleared
the wrong bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16567>
2022-05-17 23:29:15 +00:00
Kenneth Graunke b8799a499e iris: Add FLUSH_HDC to PIPE_CONTROL_CACHE_FLUSH_BITS
This is considered a bottom-of-pipe flush bit.

Fixes: a969ad1ddf ("iris: Demote DC flush to HDC flush in cache tracker")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16565>
2022-05-17 22:35:06 +00:00
Mike Blumenkrantz 3ddda935b1 zink: add an anv-tgl ci job
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16497>
2022-05-17 21:39:56 +00:00
Sil Vilerino 82e4fc654f meson: Support d3d12 as a video-supporting driver
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 39cf51ba9d d3d12: Add GLSL singleton refcounting to screen for offscreen non-GL rendering
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 8beabc6826 d3d12: Add support for d3d12 video in d3d12_screen
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 739283da13 d3d12: Improve planar resource support to handle video requirements
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 6dbe05ffda d3d12: Add util video functions to d3d12_format
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino 68bac42338 d3d12: Add create_video_codec and create_video_buffer entrypoints
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino b171a6baa2 d3d12: Add video encode implementation of pipe_video_codec
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00
Sil Vilerino d8206f6286 d3d12: Add video decode implementation of pipe_video_codec
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
2022-05-17 21:02:25 +00:00