Commit Graph

132380 Commits

Author SHA1 Message Date
Dylan Baker aade49f956 docs: add release notes for 20.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8131>
2020-12-16 21:59:48 +00:00
Icecream95 2a627e7a03 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>
2020-12-16 21:47:09 +00:00
Icecream95 1baddfcff6 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>
2020-12-16 21:47:09 +00:00
Icecream95 3a2a005404 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>
2020-12-16 21:47:09 +00:00
Icecream95 e541aa76e2 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>
2020-12-16 21:47:09 +00:00
Erik Faye-Lund 720a2d8f29 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>
2020-12-16 20:51:33 +00:00
Erik Faye-Lund 74132b761c 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>
2020-12-16 20:51:33 +00:00
Erik Faye-Lund d788a1d6f4 zink: fix format-mapping
These formats are incorrectly mapped, and should be reversed.

Fixes: 8d46e35d16 ("zink: introduce opengl over vulkan")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
2020-12-16 20:51:33 +00:00
Erik Faye-Lund 123f3d0d64 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>
2020-12-16 20:51:33 +00:00
Erik Faye-Lund d66df61bf7 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>
2020-12-16 20:51:33 +00:00
Dylan Baker 96f1c54266 docs: update calendar and link releases notes for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
2020-12-16 11:00:45 -08:00
Dylan Baker 066689cb59 docs: Add sha256 sums for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
2020-12-16 11:00:40 -08:00
Dylan Baker 245145f3c3 docs: add release notes for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
2020-12-16 11:00:39 -08:00
Dylan Baker e836005194 docs: update calendar and link releases notes for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
2020-12-16 11:00:21 -08:00
Dylan Baker b8005592bd docs: add sha256 sums for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
2020-12-16 10:59:45 -08:00
Dylan Baker 8c12442ba3 docs: add release notes for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
2020-12-16 10:59:43 -08:00
Jesse Natalie 2d78e28ba7 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie 0507da62c4 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie eb4353838d 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie 0b60d6a24d 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie ee4c80f77d 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie ed286325a0 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie dfeb5ecd4a 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie 29ccbd9b1e 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie 738564a753 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie af2e212c59 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie e1e05ad772 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie da9b6a21f4 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie 8fc2676e47 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie 4ee55769d6 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie f673648003 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie 50fab5da93 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>
2020-12-16 16:25:54 +00:00
Jesse Natalie bc5f69faee 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>
2020-12-16 16:25:54 +00:00
Simon Ser c37d8ae82b 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>
2020-12-16 13:48:48 +00:00
Mike Blumenkrantz a709d99bfd 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: d11fefa961 ("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>
2020-12-16 13:25:05 +00:00
Erik Faye-Lund ba74e1be22 zink: fix 8 bit index handling code
index_size is specified in bytes, not bits.

Fixes: f4583b4086 ("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>
2020-12-16 10:43:34 +00:00
Erik Faye-Lund 008bf6ca61 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>
2020-12-16 10:37:10 +00:00
Erik Faye-Lund 03ccd3c468 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>
2020-12-16 10:37:10 +00:00
Erik Faye-Lund 134df0069f 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>
2020-12-16 10:27:52 +00:00
Pierre-Eric Pelloux-Prayer 1a4c4cd110 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>
2020-12-16 10:52:54 +01:00
Pierre-Eric Pelloux-Prayer 296316b5de 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>
2020-12-16 09:33:06 +00:00
Erik Faye-Lund 967ae12931 Revert "st/dri: make sure software color-buffers are linear"
This reverts commit 040a2643c0.

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>
2020-12-16 09:25:59 +00:00
Erik Faye-Lund 1fd5e7b14e zink: force display-targets to be linear
This is close to a revert of commit
b5b25ee032, 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>
2020-12-16 09:25:59 +00:00
jzielins 87d7568d69 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>
2020-12-16 10:10:53 +01:00
Marek Olšák 27097ca6b5 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>
2020-12-16 00:43:51 -05:00
Marek Olšák 3b9fb98c4b radeonsi: disable NGG fast launch with indexed triangle strips to fix a hang
This will be added to our TODO list.

Fixes: aaed7a29be - 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>
2020-12-16 00:43:48 -05:00
Marek Olšák dffc27e5e1 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: 7648060dc0 - 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>
2020-12-16 00:43:45 -05:00
Vinson Lee 836b9e1d88 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>
2020-12-16 02:19:56 +00:00
Erico Nunes 001411774d 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>
2020-12-16 01:04:41 +00:00
jzielins 9ed50cba6e 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: 9ac8f8f490
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8117>
2020-12-15 20:39:06 +00:00