Daniel Stone
05818bf7a4
Revert "gitlab-ci: disable radv-fossils"
...
The fossils-db repository is fixed now.
This reverts commit 7b8ea33848 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14337 >
2021-12-29 13:48:03 +00:00
Eleni Maria Stea
0357a2e012
dri_drawable: missing header
...
dri_util.h must be included in dri_drawable.h for __DRI* types and
driDrawPriv to be defined.
Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14334 >
2021-12-29 13:55:40 +02:00
Hamish Arblaster
cafca76fa2
zink: Fix building on macOS
...
This fixes building on macOS:
Disable ZINK_USE_DMABUF on macOS, it is unsupported.
Import vk_mvk_moltenvk.h for MVK_VERSION in zink_resource.c.
Add additional build arguments (see meson.build) to build properly.
To build on macOS, you will probably need to run:
brew install bison llvm cmake libxext xquartz ninja xorgproto meson
And you also need to setup meson with something like:
-Dmoltenvk-dir=/Users/<Username>/VulkanSDK/<VersionNumber>/MoltenVK
-Dc_std=c11
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14255 >
2021-12-29 03:21:35 +00:00
Lionel Landwerlin
eca7b24e74
intel/devinfo: adjust subslice array size
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14324 >
2021-12-28 14:22:53 -08:00
Nanley Chery
cd182a31c3
iris: Use util packing fns in convert_clear_color
...
A couple things happen as a result of this:
1. This function is more consistent. It aims to clamp clear color ranges
to format-dependent values, but it didn't clamp the upper ranges of
10-bit and 11-bit floats (64512 and 65024 respectively). Those are
handled now.
2. The clear colors are quantized. The quantization method seems to
differ from what the HW uses for slow (and obviously fast) clears.
Due to this change in quantization method, iris starts failing
dEQP-EGL.functional.image.modify.renderbuffer_rgba4_renderbuffer_clear_color.
That's okay however. That test was removed from the mustpass list
because of threshold issues (see egl-test-issues.txt).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7740 >
2021-12-28 17:49:11 +00:00
Samuel Pitoiset
34151f9be9
radv: fix clears with value of "1" and different DCC signedness
...
For example, if the driver clears a view of SINT with 127 and the image
format is UNORM, the hw fills "1" instead of the clear value
(127.0f / 255.0f). This CB feature is GFX9+ only.
This should fix test_typed_srv_cast_clear from vkd3d-proton once it
correctly sets the MUTABLE flag (which is still buggy as of c0a3fa8a).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5676
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/14228 >
2021-12-28 16:35:51 +00:00
Georg Lehmann
554e1c2000
radv: Increase maxFragmentCombinedOutputResources.
...
This also includes storage images and storage buffers, not just color
attachments.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14311 >
2021-12-28 16:15:26 +00:00
Bas Nieuwenhuizen
50658ed8da
radv/amdgpu: Use VkResult for wait_timeline_syncobj.
...
So we can actually return errors.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14165 >
2021-12-28 15:55:18 +00:00
Bas Nieuwenhuizen
20b51cdabe
radv: Skip wait timeline ioctl with 0 handles.
...
Fixes: 55d8022878 "radv: Add winsys functions for timeline syncobj."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14165 >
2021-12-28 15:55:18 +00:00
Bas Nieuwenhuizen
afff9dd0f0
radv: Use correct buffer size for query pool result copies.
...
1. the dst stride may be too small if count=1.
2. the src stride may be too small due to the availability bit.
So lets just compute the size needed explicitly and use it.
Fixes: 90a0556c ("radv: use pool stride when copying single query results")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14242 >
2021-12-28 15:35:51 +00:00
Samuel Pitoiset
b775aaff1e
radv: re-apply "Do not access set layout during vkCmdBindDescriptorSets."
...
Uplay needs this to avoid a crash because it does an use-after-free
of a descriptor set layout. This was initially introduced by Bas to
workaround a similar issue with Baldur's Gate 3, it seems needed again.
Cc: 21.3 mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5789
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/14318 >
2021-12-28 15:56:55 +01:00
Samuel Pitoiset
01f1bd4dfd
radv: re-enable fast clears for images that support comp-to-single
...
This optimized path was disabled, oops.
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/14176 >
2021-12-28 14:24:40 +00:00
Alyssa Rosenzweig
311077c483
panfrost: Make pan_merge macro more robust
...
Consider the following innocuous-looking code:
pan_merge(packed, vtx->attributes[i], ATTRIBUTE);
Under the current implementation, this code is completely broken. Why?
The current implemention is a macro which hardcodes the loop index i,
which shadows the i used to index attributes. Pull out a helper method
so we do the right thing without resulting to further preprocessor abuse
(__COUNTER__).
While making things more robust, assert the crucial pan_merge
invariant that the total size is a multiple of 4; if this fails, the
routine risks memory corruption.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14119 >
2021-12-28 13:55:21 +00:00
Jason2013
36f8f9b882
Fix typo
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14169 >
2021-12-28 13:34:04 +00:00
Samuel Pitoiset
7b7debe8f9
radv: fix restoring subpass during hw/fs color resolves
...
This fixes an stack-use-after-scope detect by ASAN because the
subpass is used after the loop by radv_mark_noncoherent_rb().
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/14317 >
2021-12-28 12:53:12 +00:00
Samuel Pitoiset
030daf80b5
radv/winsys: remove radv_amdgpu_winsys_bo::is_shared
...
This has never been used.
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/14287 >
2021-12-28 12:51:29 +01:00
Samuel Pitoiset
847048fa24
radv/winsys: stop zeroing few structs in buffer_from_fd()
...
Errors are correctly handled here.
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/14287 >
2021-12-28 12:51:27 +01:00
Samuel Pitoiset
3368e522b4
radv: remove unnecessary NULL checks in vkMapMemory()/vkUnmapMemory()
...
It's required to have a valid device memory handle and it would make
no sense to call these functions with a NULL pointer.
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/14287 >
2021-12-28 12:51:25 +01:00
Thomas H.P. Andersen
ff7aee2ac9
tu/clear_blit: use || when working with bools
...
Fixes a warning with clang
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14315 >
2021-12-28 03:13:38 +00:00
Jesse Natalie
5c69c44a99
d3d12: Avoid a debug warning trying to unmap a not-mapped resource
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:25 +00:00
Jesse Natalie
0c5fde39e4
d3d12: Set SSBO support caps
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:25 +00:00
Jesse Natalie
416a807854
d3d12: Use DXIL load/store lowering pass
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
32375789e5
d3d12: Support setting SSBOs on the context and turning them into descriptors
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
49cf325d82
d3d12: Always create buffers as UAV-capable
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
de4c38c3a7
d3d12: Support SSBOs in root signatures
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
c375b05bfe
microsoft/compiler: Handle write masks in SSBO lowering pass
...
Previously, the lowering was for 8/16/64-bit values, or 8/16-component
vectors. Now, it also handles write masks on 32-bit 1/2/3/4-component
vectors.
DXIL looks like it supports putting an interesting write mask in the
buffer store intrinsic, but DXC never generates stores with write
masks, and multiple drivers completely ignore the write mask.
Also, set the write mask properly on the output intrinsic.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
efc47571d4
microsoft/compiler: Hook up uavs-at-every-stage flag
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Jesse Natalie
72b0d0cda0
microsoft/compiler: Emit SSBOs from 0 -> count for GL (non-kernel, non-Vulkan) shaders
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294 >
2021-12-27 23:40:24 +00:00
Lionel Landwerlin
7b8ea33848
gitlab-ci: disable radv-fossils
...
For some reason CI is unable to pull a git repo needed to run this.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14312 >
2021-12-27 15:13:40 -08:00
Jesse Natalie
01821a2601
CI: Trigger Windows build on softpipe changes
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14312 >
2021-12-27 12:26:02 -08:00
Jesse Natalie
d87a089579
softpipe: Add a dummy field to sp_fragment_shader_variant_key
...
MSVC doesn't support 0-size structs in C.
Fixes: 0b7a0d1a ("softpipe: Use the draw module's poly stipple handling, like llvmpipe.")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14312 >
2021-12-27 12:25:57 -08:00
Emma Anholt
79af19ab9e
softpipe: Drop duplicate decl of softpipe_find_fs_variant
...
Reviewed-by: Zoltán Böszőrményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13731 >
2021-12-27 09:57:57 -08:00
Emma Anholt
0b7a0d1a49
softpipe: Use the draw module's poly stipple handling, like llvmpipe.
...
softpipe was using the draw helper module as a testbed for the draw helper
module long ago, but we can just use the finished product.
Reviewed-by: Zoltán Böszőrményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13731 >
2021-12-27 09:57:53 -08:00
Emma Anholt
764d367a62
softpipe: Drop the quad pstipple stage.
...
It's unused, and it doesn't have the information it needs ("what is the
prim type after poly fill mode but without considering
wide point/line-to-triangle conversion) to stipple correctly.
Reviewed-by: Zoltán Böszőrményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13731 >
2021-12-27 09:57:46 -08:00
Vinson Lee
222487fabe
radv: Fix memory leak on error path.
...
Fix defects reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable signal_semaphore_infos going out of scope leaks the storage it points to
leaked_storage: Variable wait_semaphore_infos going out of scope leaks the storage it points to.
Fixes: 3da7d10d9b ("radv: implement vkQueueSubmit2KHR()")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14260 >
2021-12-24 00:15:53 -08:00
Dave Airlie
d2148af2ca
mesa/st: remove conditionals for driver state bits that are always set.
...
Just removes some conditional checks that never work out now.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:57 +00:00
Dave Airlie
86a7a36164
mesa/st: drop multisample mask/locations state drivers bits
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:57 +00:00
Dave Airlie
ddade693d0
mesa/st: drop new framebuffer srgb driver state bit
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:57 +00:00
Dave Airlie
cbaf072971
mesa/st: drop clip plane driver state bits
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:57 +00:00
Dave Airlie
33991f0743
mesa/st: drop scissor/window rect driver state bits
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
42c7570eed
mesa/st: drop ssbo, image and sampler driver state flags bits
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
75255a1d06
mesa: drop unused transform feedback state driver flags
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
6e15cc69ec
mesa/st: drop new uniform driver state bit
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
f35d22b2ee
mesa/st: drop new tess state driver bit
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
562f01fbc7
mesa/st: drop poly stipple driver state bit
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
784ced98f0
mesa/st: drop new depth/stencil state bits
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
14e1f9cb98
mesa/st: drop NewBlend driver state flags
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
4f0316613f
mesa/st: remove the viewport driver state flags
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
c5af853cb9
mesa/st: drop the rasterizer driver flags
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00
Dave Airlie
b2175609ba
mesa/st: drop the new array driver state bit
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261 >
2021-12-23 19:06:56 +00:00