Mike Blumenkrantz [Thu, 23 Jul 2020 11:47:14 +0000 (07:47 -0400)]
zink: handle struct derefs in ntv
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Mike Blumenkrantz [Thu, 17 Dec 2020 17:31:46 +0000 (12:31 -0500)]
zink: add get_storage_class() ntv util
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Mike Blumenkrantz [Thu, 23 Jul 2020 11:46:15 +0000 (07:46 -0400)]
zink: be more paranoid about array strides in ntv
arraystride is a required decoration for arrays of scalars, so ensure that
we put in some effort on this for the case where an array doesn't specify
an explicit stride
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Eric Anholt [Wed, 16 Dec 2020 20:16:22 +0000 (12:16 -0800)]
ci/freedreno: Stop specifying the number of deqp threads
For "0" (its default) deqp-runner picks a number of jobs corresponding to
the CPU count, so set our hardware runners to use that (note that mesa's
deqp-runner.sh will pick a default of 4 if we don't specify a
DEQP_PARALLEL).
This means we'll allocate threads for the slow cores on a630 now, reducing
gles3 runtime from 6.5 minutes to around 5.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8132>
Eric Anholt [Wed, 16 Dec 2020 20:14:26 +0000 (12:14 -0800)]
ci/freedreno: Treat all freedreno deqp runs as saving results.
They've been doing so since the webdav results upload was added. This
means that we'll get normal truncated failures lists with the pointer to
the job artifacts, rather than filling a log file if you broke everything.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8132>
Mike Blumenkrantz [Fri, 23 Oct 2020 16:07:08 +0000 (12:07 -0400)]
zink: add nir pass for splitting 64bit vertex attribs which cross slot boundaries
according to spec, dvec3 and dvec4 vertex attribs require 2 slots (locations),
and so the shader loads have to be explicitly split to reflect this
helpfully, gallium already gives us the vertex element state in a split format,
so no other changes are necessary to have this work as expected
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8141>
Mike Blumenkrantz [Fri, 23 Oct 2020 20:08:40 +0000 (16:08 -0400)]
zink: support frem shader op
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8144>
Danylo Piliaiev [Thu, 17 Dec 2020 12:41:52 +0000 (14:41 +0200)]
tu: pCounterBuffers can be NULL in vkCmd*TransformFeedbackEXT()
According to the spec:
"pCounterBuffers is an optional array of buffer handles [...]
If pCounterBuffers is NULL, then transform feedback will start
capturing vertex data to byte offset zero in all bound transform
feedback buffers."
"If counterBufferCount is not 0, and pCounterBuffers is not NULL,
pCounterBuffers must be a valid pointer to an array [...]"
So counterBufferCount could be non-zero with pCounterBuffers
being NULL.
Fixes crash in RenderDoc when inspecting draw call with tesselation
or geometry shader present.
Fixes:
98b0d900 "turnip: rework streamout state and add missing counter buffer read/writes"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8140>
Danylo Piliaiev [Thu, 17 Dec 2020 11:50:04 +0000 (13:50 +0200)]
tu: Ignore pTessellationState if there is no tesselation shaders
According to the spec:
"pTessellationState [...] is ignored if the pipeline does not
include a tessellation control shader stage and tessellation
evaluation shader stage."
Fixes crash in RenderDoc when inspecting draw call with
geometry shader but without tesselation shaders.
Fixes:
eefdca2e "turnip: Parse tess state and support PATCH primtype"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8140>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:52:21 +0000 (12:52 -0500)]
glsl/float64: make this compatible with glsl 330
just a minor tweak
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7483>
Samuel Pitoiset [Thu, 17 Dec 2020 11:01:40 +0000 (12:01 +0100)]
radv: add missing DB flush after depth/stencil resolve operations
I thought this was a bug in CTS but the Vulkan spec says:
"VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT specifies write access
to a color, resolve, or depth/stencil resolve attachment during
a render pass or via certain subpass load and store operations."
So, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT is used to synchronize
depth/stencil resolve attachments. Yes, it's counterintuitive.
This can't actually be fixed properly for now because RADV performs
the end subpass barrier *before* resolve attachments instead of after.
Cc: 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/8138>
Daniel Schürmann [Tue, 15 Dec 2020 15:21:12 +0000 (16:21 +0100)]
aco/ra: fix phi operand renaming
In case one operand was renamed and another operand came
from an incomplete phi, it could happen, that the original
name was not restored.
This has no impact on the code, but ensures correct SSA
is maintained during RA.
Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8109>
Juan A. Suarez Romero [Mon, 14 Dec 2020 12:57:59 +0000 (13:57 +0100)]
ci: Bump deqp to current vulkan-cts-1.2.5.0
This new version contains several fixes.
v1 (Eric):
- Rebuild fail list for freedreno and lavapipe
- Move freedreno crashes to skip list
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3902
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8088>
Pierre-Eric Pelloux-Prayer [Tue, 15 Dec 2020 18:19:22 +0000 (19:19 +0100)]
egl: fix EGL_EXT_protected_content/surface mixup
EGL_EXT_protected_surface introduces EGL_PROTECTED_CONTENT_EXT,
while EGL_EXT_protected_content is about protected context.
When I implemented EGL_EXT_protected_surface I mixed up the 2
names, so this commit fixes it.
Fixes:
bd182777c8f ("egl: implement EGL_EXT_protected_surface support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8122>
Erik Faye-Lund [Mon, 14 Dec 2020 11:01:40 +0000 (12:01 +0100)]
lavapipe: implement VK_EXT_index_type_uint8
Since Gallium supports 8 bit indices, this extension is a simple matter
of plumbing a value through, exposing a feature and flipping the switch
for the extension. This lets zink avoid up-converting the index-buffer
before drawing.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8082>
Iago Toral Quiroga [Tue, 15 Dec 2020 08:21:49 +0000 (09:21 +0100)]
v3dv: fix BO list for TFU jobs
Instead of checking whether the source and destination are the same,
we should check if the underlying BOs are the same, since we may
be suballocating resources from the same allocation and the kernel
will fail to execute jobs if the BO list has duplicated entries.
Fixes aborts with Unreal Engine due to failed TFU jobs.
Fixes:
30f1fc25ce ('v3dv: implement TFU blits')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8098>
Iago Toral Quiroga [Tue, 15 Dec 2020 08:20:41 +0000 (09:20 +0100)]
v3dv: fix incorrect slice selection for TFU jobs
Fixes:
30f1fc25ce ('v3dv: implement TFU blits')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8098>
cheyang [Mon, 14 Dec 2020 11:55:28 +0000 (19:55 +0800)]
symbol_table:fix mesa symbol table return scope error
According to the comment of this function,return a non-negative
number for the number of scopes between the current scope and
the scope where a symbol was defined.
Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8084>
Vinson Lee [Wed, 25 Nov 2020 02:51:10 +0000 (18:51 -0800)]
glsl: Initialize glsl_type member name.
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member name is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7766>
Alyssa Rosenzweig [Tue, 15 Dec 2020 00:04:27 +0000 (19:04 -0500)]
docs: Add a stub page for Panfrost
List the supported hardware with some remarks. This page should grow in
the future.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8096>
Michael Forney [Wed, 16 Dec 2020 08:48:25 +0000 (00:48 -0800)]
meson: add missing dependency on generated git_sha1.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8121>
Dylan Baker [Wed, 16 Dec 2020 21:58:01 +0000 (13:58 -0800)]
docs: update calendar and link releases notes for 20.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8131>
Dylan Baker [Wed, 16 Dec 2020 21:53:03 +0000 (13:53 -0800)]
docs: Add sha256 sums for 20.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8131>
Dylan Baker [Wed, 16 Dec 2020 21:40:05 +0000 (13:40 -0800)]
docs: add release notes for 20.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8131>
Icecream95 [Wed, 16 Dec 2020 10:00:24 +0000 (23:00 +1300)]
pan/decode: Fix "Access to unknown memory" message formatting
The format string was missing a newline.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Icecream95 [Wed, 16 Dec 2020 10:14:19 +0000 (23:14 +1300)]
panfrost: Fix negative LOD bias support on Bifrost
The LOD bias can be negative, so mark it as signed in the XML.
The code in pan_cmdstream.c already calls FIXED_16 with
'allow_negative' set to true, so doesn't need to be adjusted.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Icecream95 [Wed, 16 Dec 2020 10:03:29 +0000 (23:03 +1300)]
pan/gen_pack: Fix signed integer packing
Any excess sign-extend bits would spill into adjacent fields, so mask
off anything after the end bit.
Shift from 2 instead of 1, because there needs to be one extra bit in
the mask as 'end' is inclusive.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Icecream95 [Wed, 16 Dec 2020 09:57:22 +0000 (22:57 +1300)]
panfrost: Split up batches with many jobs
If there are too many jobs in a batch, split it. Although the GPU
theoretically supports 65536 jobs in a batch, set the threshold lower
to avoid GPU timeouts.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Erik Faye-Lund [Mon, 7 Dec 2020 20:20:55 +0000 (21:20 +0100)]
zink: map some more formats
These formats correspond to missing vk_format_to_pipe_format formats, so
let's add support for them as well.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 19:53:31 +0000 (20:53 +0100)]
zink: add format test
This will help avoid future mistakes when mapping formats.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 19:51:45 +0000 (20:51 +0100)]
zink: fix format-mapping
These formats are incorrectly mapped, and should be reversed.
Fixes:
8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 18:50:04 +0000 (19:50 +0100)]
zink: make zink_format all about raw format-translation
This moves the parts of zink_format.c that also operates on zink_screen
into zink_screen.c. This has the benefit that we can start testing the
enum-translation code separately from the state.
This will make the next commit a bit cleaner.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 19:49:15 +0000 (20:49 +0100)]
zink: convert x8-formats in zink_get_format
This allows us to make zink_pipe_format_to_vk_format a perfectly
roudtripable function.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Dylan Baker [Wed, 16 Dec 2020 19:00:45 +0000 (11:00 -0800)]
docs: update calendar and link releases notes for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:57:25 +0000 (10:57 -0800)]
docs: Add sha256 sums for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:19:43 +0000 (10:19 -0800)]
docs: add release notes for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:59:51 +0000 (10:59 -0800)]
docs: update calendar and link releases notes for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:16:23 +0000 (10:16 -0800)]
docs: add sha256 sums for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 17:41:49 +0000 (09:41 -0800)]
docs: add release notes for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Jesse Natalie [Tue, 15 Dec 2020 17:57:43 +0000 (09:57 -0800)]
d3d12: Flush and wait in flush_frontbuffer
If we have a context, make sure any work on it's done before
reading from the render target. There may even be pending
MSAA resolves that haven't been submitted yet.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Mon, 7 Dec 2020 21:19:58 +0000 (13:19 -0800)]
gallium/dri: Add D3D12 software driver option
This lets you use GALLIUM_DRIVER=d3d12 to choose the d3d12
backend with a software winsys.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Fri, 4 Dec 2020 23:39:55 +0000 (15:39 -0800)]
d3d12: Don't require DXIL for WSL
Always use the experimental shader models feature, which allows
unsigned DXIL to be used, so we don't need a libdxil for WSL.
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 22:57:12 +0000 (14:57 -0800)]
d3d12: Support Linux eventfds for fences
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:58:16 +0000 (10:58 -0800)]
d3d12: Only support DXGI and GDI APIs on Windows
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Thu, 10 Dec 2020 01:10:45 +0000 (17:10 -0800)]
d3d12: Only play DLL path tricks on Windows
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:56:03 +0000 (10:56 -0800)]
d3d12: Use u_dl instead of Windows DLL APIs
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:17:24 +0000 (10:17 -0800)]
d3d12: Add forward declaration for LUID
This is needed so that the driver can be initialized by
external code without windows.h or winadapter.h.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:16:02 +0000 (10:16 -0800)]
d3d12: Scope down wrl includes to just client.h
We only use wrl for ComPtr, and the DirectX-Headers project
only includes client.h and implements.h.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:14:47 +0000 (10:14 -0800)]
d3d12: Use IID_PPV_ARGS instead of __uuidof
We've been inconsistent between IID_PPV_ARGS,
__uuidof(var), and __uuidof(type). Since Linux doesn't
support the latter of these, they need to be changed.
While we're at it, switch all __uuidof to the more terse
IIV_PPV_ARGS option.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:02:35 +0000 (10:02 -0800)]
d3d12: Include dxguids/dxguids.h in files that need __uuidof
MSVC has an extension for getting IIDs (GUIDs) from types. Other
compilers can support this extension when targeting Windows, but
don't support it when targeting Linux. Instead, winadapter.h
defines __uuidof(var) to uuidof<decltype(var)>. Then dxguids.h
provides inline specialized definitions for the known D3D types.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 17:56:46 +0000 (09:56 -0800)]
d3d12: Include wsl/winadapter.h when not compiling for Windows
The winadapter.h provides typedefs and defines to enable the
D3D/DXCore headers to be included as-is when targeting non-
Windows platforms.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 17:53:52 +0000 (09:53 -0800)]
winsys_handle: Change D3D12 resource handle type to void*
This lets us include it in Linux builds as well, without needing
to pull in IUnknown.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 17:52:03 +0000 (09:52 -0800)]
microsoft/compiler: Pick up new dxcapi.h
This is more up-to-date with what's on GitHub, and more importantly,
it embeds some of the non-Windows support logic in the header, instead
of shelling out to a nonexistent header.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 20:21:11 +0000 (12:21 -0800)]
d3d12: Add DXCore screen variation
Not all Windows platforms have DXGI, and neither does WSL.
Instead, we can use the DXCore API for adapter enumeration.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 20:14:40 +0000 (12:14 -0800)]
d3d12: Refactor screen to abstract DXGI details
The next commit will add an alternative that can be dropped in instead.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 24 Nov 2020 19:54:07 +0000 (11:54 -0800)]
d3d12: Use DirectX-Headers wrap for d3d12.h
This does 2 things for us:
1. Allows us to compile-time depend on any features from new headers,
instead of having to conditionally compile based on Windows SDK version.
2. Allows us to reference d3d12.h when compiling for non-Windows.
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Simon Ser [Tue, 8 Dec 2020 18:17:37 +0000 (19:17 +0100)]
egl/wayland: add a NULL guard for the authenticate callback
On some platforms, the authenticate callback may be NULL, e.g. on
surfaceless. If a client tries to send a wl_drm.authenticate request
the handler tries to dereference the NULL pointer.
This can be reproduced with libva which unconditionally tries to use
wl_drm.authenticate even with render nodes [1]. Run a compositor with
a surfaceless context, then try to start e.g. mpv to trigger the
segfault.
[1]: https://github.com/intel/libva/pull/476
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7992>
Mike Blumenkrantz [Tue, 15 Dec 2020 04:35:55 +0000 (23:35 -0500)]
st/mesa: set drawpixels swizzle before creating sampler view
(some) drivers need to have the swizzle set prior to create_sampler_view
being called in order to actually apply it
Fixes:
d11fefa9616 ("st/mesa: optimize 4-component ubyte glDrawPixels")
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8107>
Erik Faye-Lund [Mon, 14 Dec 2020 10:51:14 +0000 (11:51 +0100)]
zink: fix 8 bit index handling code
index_size is specified in bytes, not bits.
Fixes:
f4583b40863 ("zink: move 8bit index handling out of u_primconvert path")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8081>
Erik Faye-Lund [Thu, 10 Dec 2020 16:51:39 +0000 (17:51 +0100)]
zink: ralloc spirv_shader
This uses ralloc for spirv_shader and it's data-payload, which seems a
bit neater than having to remember to free twice. We can now also easily
piggy back on more sophisticated ralloc usage as well.
No need to use rzalloc here, as we'll write all memory in the struct,
and the struct isn't used as a hashmap key, so padding shouldn't matter.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8049>
Erik Faye-Lund [Thu, 10 Dec 2020 14:51:08 +0000 (15:51 +0100)]
zink: use emit_bitcast helper
We already have this helper, so let's use it. It makes the code
*slightly* shorter and easier to follow IMO.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8049>
Erik Faye-Lund [Tue, 17 Nov 2020 10:37:14 +0000 (11:37 +0100)]
zink: use shader-read-only-optimal for samplers
Using the general layout for samplers can have terrible performance, so
let's use shader-read-only-optimal instead.
This is fairly straight-forward if we use conservative bounds for the
barriers, and assume they are being used in all stages.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7655>
Pierre-Eric Pelloux-Prayer [Wed, 9 Dec 2020 14:41:59 +0000 (15:41 +0100)]
driconf: add workaround for Enter The Gungeon
Quoting a comment on the bug report:
I suspect the shader is incorrect.
When a (conditional) discard is executed then control flow
becomes non-uniform, meaning that subsequent implicit
derivatives required for the texture operation are not
computed correctly.
Using glsl_correct_derivatives_after_discard fixes it. Note
that for radeonsi this requires LLVM master to work properly.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1386
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8005>
Pierre-Eric Pelloux-Prayer [Thu, 10 Dec 2020 17:50:50 +0000 (18:50 +0100)]
st/mesa: disable line stippling if pattern is all 1's
The spec says:
When disabled, it is as if theline stipple has its default value
(the default value being all 1's)
So treat pattern=0xffff as line stippling = off.
This improves performance in specviewperf13 snx lines tests.
For instance in the last test I get:
* master: 260 fps, gpu-load: ~92%
* with this commit: 280 fps, gpu-load: ~72%
(both tested with
d60930c017 reverted)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8105>
Erik Faye-Lund [Tue, 15 Dec 2020 18:54:56 +0000 (19:54 +0100)]
Revert "st/dri: make sure software color-buffers are linear"
This reverts commit
040a2643c08dd0accee6942bc05836b99417ee49.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8115>
Erik Faye-Lund [Tue, 15 Dec 2020 18:51:29 +0000 (19:51 +0100)]
zink: force display-targets to be linear
This is close to a revert of commit
b5b25ee0327f65d837ff84f59b497232d52ec25d, but it limits the scope a bit
to avoid needless performance degregation.
In the long run, we should really allow using tiled resources here, and
instead detile while presenting.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8115>
jzielins [Thu, 10 Dec 2020 16:55:35 +0000 (17:55 +0100)]
swr: Fix building with LLVM12
Updates SWR code to match recent changes
in StructType and VectorType APIs
Fixes: #3917
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8041>
Marek Olšák [Wed, 9 Dec 2020 23:18:33 +0000 (18:18 -0500)]
radeonsi: improve a comment about an MSAA bug workaround
It doesn't make complete sense to me, but it's copied from the commit
message that made this change.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8022>
Marek Olšák [Wed, 9 Dec 2020 23:22:21 +0000 (18:22 -0500)]
radeonsi: disable NGG fast launch with indexed triangle strips to fix a hang
This will be added to our TODO list.
Fixes:
aaed7a29bef - radeonsi: implement GS fast launch for indexed triangle strips
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8022>
Marek Olšák [Thu, 10 Dec 2020 00:18:37 +0000 (19:18 -0500)]
radeonsi: fix small primitive culling with MSAA force-disabled and smoothing
The problem was that the shader constants were based on the framebuffer
sample count and ignored the multisample enable state and the line/polygon
smoothing state, which uses MSAA rasterization that only sets SampleMaskIn
to get the coverage for alpha-blended smoothing (the PS epilog computes
the alpha channel from SampleMaskIn and blending generates the AA results).
- This is a complete rework that adds a new state for NGG cull constants.
- It fixes the same thing for the prim discard compute shader.
- It documents how VS_STATE.SMALL_PRIM_PRECISION is encoded.
It fixes blue corruption in Unigine Heaven with MSAA and Medium details
or better.
Fixes:
7648060dc03 - radeonsi: enable NGG culling by default on gfx10.3 dGPUs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8022>
Vinson Lee [Wed, 25 Nov 2020 02:59:03 +0000 (18:59 -0800)]
glsl: Fix typos in comments.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7767>
Erico Nunes [Fri, 11 Dec 2020 18:58:07 +0000 (19:58 +0100)]
lima: adjust pp and gp max const buffer size
According to the mali driver output, the Mali-400 GP provides space for
304 vec4 uniforms, globals and temporary variables.
The Mali-PP supports a uniform table up to size 32768 total.
However, indirect access to an uniform only supports indices up to 8192
(a 2048 vec4 array). Trying to access beyond that currently causes a pp
job timeout with both lima and the mali driver. To prevent indices
bigger than that in application uniforms, limit to 8192 for now.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8079>
jzielins [Tue, 15 Dec 2020 17:23:50 +0000 (18:23 +0100)]
gallium/swr: Fix Windows build
Fixing small mistake in the swr code that caused
compilation issues on Windows
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Fixes:
9ac8f8f490d0ee08ac9ca6f1c6963043c2991443
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8117>
Jesse Natalie [Tue, 15 Dec 2020 19:28:22 +0000 (11:28 -0800)]
CI: Add repeat-wait to Windows Piglit skip
This test is flaky/racy due to an incorrect timeout value being used.
See https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/433
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8114>
Jesse Natalie [Tue, 8 Dec 2020 22:58:45 +0000 (14:58 -0800)]
d3d12: Fix incorrect fence timeout calculation
Fixes:
2ea15cd6 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8114>
Eric Anholt [Mon, 30 Nov 2020 20:01:23 +0000 (12:01 -0800)]
ci: Add an ASan build on x86.
I want to enable ASan runs on freedreno. It turns out it's a long road to
get there, starting with making sure we can run our unit tests with the
sanitizer enabled.
While I'm revving this container, add in valgrind too to make sure that
our build paths with valgrind enabled work.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Mon, 14 Dec 2020 22:17:32 +0000 (14:17 -0800)]
amd: Fix leak in ac_surface_modifier_test.
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 23:34:47 +0000 (15:34 -0800)]
driconf: Fix memory leak in the unit test.
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 23:17:51 +0000 (15:17 -0800)]
glsl/standalone: Fix memory leaks
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 21:23:03 +0000 (13:23 -0800)]
mapi: Fix symbols check with ASan enabled.
ASan apparently introduces public symbols with __odr_asan as the prefix.
Fixes unit tests when building with ASan.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 21:19:32 +0000 (13:19 -0800)]
glsl/uniform_initializer_tests: Fix memory leak
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 20:54:46 +0000 (12:54 -0800)]
glsl/general_ir_test: Fix leaks.
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 20:51:45 +0000 (12:51 -0800)]
disk_cache: Fix memory leaks in the unit test.
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 20:46:12 +0000 (12:46 -0800)]
freedreno/ir3: Free the compiler at the end of the unit tests.
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 19:47:46 +0000 (11:47 -0800)]
glx/tests: Fix leaks in the unit tests.
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 19:37:43 +0000 (11:37 -0800)]
glx/tests: Remove unused teardown function.
If you called it, it would be full of double frees because deleting some
of the objects cleans up their owned stuff.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 19:17:39 +0000 (11:17 -0800)]
util/vma: Fix leak of the heap in the unit test.
Needed for unit testing with asan enabled.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Fri, 4 Dec 2020 19:13:37 +0000 (11:13 -0800)]
util: Fix memory leak in a hash table unit test.
Needed for unit testing with asan enabled.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Eric Anholt [Mon, 30 Nov 2020 20:40:34 +0000 (12:40 -0800)]
etnaviv, v3d: Fix valgrind include paths.
dep_valgrind gives you -I/usr/include/valgrind (or whatever) so if
valgrind/ wasn't in the search path anyway, these includes would fail.
Found in CI when adding valgrind to the build images.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>
Tony Wasserka [Tue, 1 Dec 2020 11:31:05 +0000 (12:31 +0100)]
radv,aco: Compile with -Wimplicit-fallthrough when available
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7847>
Tony Wasserka [Tue, 1 Dec 2020 10:52:20 +0000 (11:52 +0100)]
aco: Annotate switch fallthroughs
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7847>
Samuel Pitoiset [Thu, 10 Dec 2020 08:33:36 +0000 (09:33 +0100)]
radv: add support for resolving layered depth/stencil images
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/8025>
Adam Jackson [Fri, 11 Dec 2020 21:52:10 +0000 (16:52 -0500)]
glx/xlib: Build fix
Helgrind support missed a spot.
Fixes:
53f7d539cd9 ("util: Add helgrind support for simple_mtx")
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8108>
Adam Jackson [Wed, 9 Dec 2020 17:20:45 +0000 (12:20 -0500)]
zink: Simplify MoltenVK support a bit
There's no harm in checking for the extension on non-macOS, just do it.
Nor can I see any point in checking for both the layer and the
extension, since you're never going to see the extension if the layer
isn't available, so just check for the extension instead of the reduced
boolean. Simplify some variable naming while we're at it.
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8019>
Adam Jackson [Tue, 8 Dec 2020 22:11:19 +0000 (17:11 -0500)]
zink: Factor out zink_create_logical_device
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8019>
Adam Jackson [Tue, 8 Dec 2020 22:02:47 +0000 (17:02 -0500)]
zink: Factor out zink_get_loader_version()
This result isn't actually used within zink_create_instance, so don't do
it there.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8019>
Adam Jackson [Wed, 2 Dec 2020 20:38:35 +0000 (15:38 -0500)]
zink: Factor out winsys awareness from zink_internal_create_screen
Magic parameters are gross, this makes zink_internal_create_screen a bit
more reusable.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8019>
Adam Jackson [Wed, 9 Dec 2020 17:27:27 +0000 (12:27 -0500)]
zink: Fix indentation in zink_create_instance
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8019>
Erik Faye-Lund [Thu, 10 Dec 2020 12:20:53 +0000 (13:20 +0100)]
gallium/util: add bitcast helpers for double and uint
This complements u_bitcast_f2u and u_bitcast_u2f with similar helpers
to cast between double and unsigned integers as well.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8034>
Erik Faye-Lund [Thu, 10 Dec 2020 12:18:36 +0000 (13:18 +0100)]
gallium/util: make bitcast-helpers explicitly sized
These always work on 32-bit variables, so let's make that assumption
explicit.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8034>