Commit Graph

148330 Commits

Author SHA1 Message Date
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
Dave Airlie df4f0672d3 mesa/st: merge NewDepthClamp state flag
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 535a9d4203 mesa: drop optional tex/tnl maintains mode.
These are always going to be on with gallium

v2: drop call, tidy up switch (kwg)

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 1adff0d0db mesa/st: move default enabled extensions into mesa.
This just moves a bunch of true assignments into the core

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 87cc3ee964 mesa/draw: drop the multi draw with indices fallback.
Gallium drivers don't need this.

v2: drop some more code

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 d17f45df1a mesa: remove StripTextureBorder option.
Always make this true.

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
Thomas H.P. Andersen 424941f0e4 ci: debian-clang: build more drivers
Add gallium drivers: i915 + asahi
Add vulkan drivers: swrast + panfrost

These can now compile with the current no-error list

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>
2021-12-23 17:08:29 +01:00
Thomas H.P. Andersen 08f7d37fb9 panvk: cast negative value to unint8_t
The index is a uint8_t but can be assigned a negative 1
value in panvk_pipeline_builder_parse_color_blend()
The comparison to ~0 thus makes sense but clang will complain:

"result of comparison of constant -1 with expression of type
'const uint8_t' (aka 'const unsigned char') is always true
[-Wtautological-constant-out-of-range-compare]"

Fix this by casting to a uint8_t before comparison.

Fixes a warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>
2021-12-23 17:08:24 +01:00
Thomas H.P. Andersen cea1df7d34 panvk: use FALLTHROUGH to stop a warning
Fixes a warning with clang

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>
2021-12-23 17:08:01 +01:00
Thomas H.P. Andersen bc19893f5d i915g: avoid left shifting a negative number
Fixes a warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>
2021-12-23 16:22:53 +01:00
Thomas H.P. Andersen 107c63aee8 lavapipe: fix string-plus-int warning
Fixes a warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>
2021-12-23 16:22:53 +01:00
Alyssa Rosenzweig 944c8907ba pan/bi: Don't call useless NIR passes
Cargo culted from the Midgard compiler.

nir_move_vec_src_uses_to_dest is intended for vec4 backends, which does
not apply to Bifrost. nir_lower_locals_to_regs runs much earlier in the
compiler and is a no-op here.

total instructions in shared programs: 107252 -> 107242 (<.01%)
instructions in affected programs: 2403 -> 2393 (-0.42%)
helped: 10
HURT: 0
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.33% max: 0.57% x̄: 0.43% x̃: 0.42%
95% mean confidence interval for instructions value: -1.00 -1.00
95% mean confidence interval for instructions %-change: -0.49% -0.37%
Instructions are helped.

total tuples in shared programs: 89664 -> 89664 (0.00%)
tuples in affected programs: 333 -> 333 (0.00%)
helped: 1
HURT: 1
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.52% max: 0.52% x̄: 0.52% x̃: 0.52%
HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.70% max: 0.70% x̄: 0.70% x̃: 0.70%

total cycles in shared programs: 8103.88 -> 8103.79 (<.01%)
cycles in affected programs: 29.42 -> 29.33 (-0.28%)
helped: 3
HURT: 1
helped stats (abs) min: 0.041665999999999315 max: 0.04166700000000034 x̄:
0.04 x̃: 0
helped stats (rel) min: 0.49% max: 0.55% x̄: 0.53% x̃: 0.54%
HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄:
0.04 x̃: 0
HURT stats (rel)   min: 0.74% max: 0.74% x̄: 0.74% x̃: 0.74%
95% mean confidence interval for cycles value: -0.09 0.05
95% mean confidence interval for cycles %-change: -1.22% 0.80%
Inconclusive result (value mean confidence interval includes 0).

total arith in shared programs: 3376.42 -> 3376.33 (<.01%)
arith in affected programs: 29.42 -> 29.33 (-0.28%)
helped: 3
HURT: 1
helped stats (abs) min: 0.041665999999999315 max: 0.04166700000000034 x̄:
0.04 x̃: 0
helped stats (rel) min: 0.49% max: 0.55% x̄: 0.53% x̃: 0.54%
HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄:
0.04 x̃: 0
HURT stats (rel)   min: 0.74% max: 0.74% x̄: 0.74% x̃: 0.74%
95% mean confidence interval for arith value: -0.09 0.05
95% mean confidence interval for arith %-change: -1.22% 0.80%
Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 79681 -> 79681 (0.00%)
quadwords in affected programs: 283 -> 283 (0.00%)
helped: 1
HURT: 1
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.62% max: 0.62% x̄: 0.62% x̃: 0.62%
HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.82% max: 0.82% x̄: 0.82% x̃: 0.82%

total threads in shared programs: 2226 -> 2227 (0.04%)
threads in affected programs: 1 -> 2 (100.00%)
helped: 1
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14293>
2021-12-23 14:01:48 +00:00
Emma Anholt f0f6aec545 glcpp: Disable the valgrind tests.
We have the glcpp unit tests covered with ASan and MSan in CI, no need to
make everyone doing a "meson test" suffer through valgrind slowly churning
through these.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14236>
2021-12-23 09:10:11 +00:00
Emma Anholt 059b71b58d ci: Enable a build with MSan.
This will catch uninitialized data usage (such as 37855fd59d ("glcpp:
Fully initialize struct gl_context")) much faster than valgrind does.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14236>
2021-12-23 09:10:11 +00:00