Commit Graph

132105 Commits

Author SHA1 Message Date
Marek Olšák 351ba767af gallium/u_threaded: set has_user_indices = false in the driver thread
to remove some overhead from the main thread.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 60653366b8 gallium/u_threaded: don't pass index bounds to the driver to decrease overhead
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 1b6b31bd1a glthread: count batch space in units of uint64_t elements
This removes one x86 shr instruction from _mesa_glthread_allocate_command.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 4b2445916e glthread: change sizes to unsigned or size_t where needed
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 6fe524d0f8 glthread: use uint64_t to declare the batch buffer instead of align(8)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Marek Olšák 70b778945b glthread: use glthread->used instead of glthread->next_batch->used
remove one pointer dereference by having "used" in glthread too

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7719>
2020-12-08 17:47:56 +00:00
Mike Blumenkrantz 0a4004e5fa zink: use shader keys for samplemask
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7801>
2020-12-08 17:35:48 +00:00
Mike Blumenkrantz 0ce792b2e2 zink: change a memcmp==0 to !memcmp
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7801>
2020-12-08 17:35:48 +00:00
Mike Blumenkrantz b47407269d zink: initial shader key implementation
this is a squashed version of a previously-reviewed series
ref https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7193

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7801>
2020-12-08 17:35:48 +00:00
Witold Baryluk f93b7d14d6 vulkan/device_select: Store Vulkan vendorID and deviceID as uint32_t
Vulkan uses 32-bit IDs, compared to PCI/USB 16-bit ones.

Some driver vendorIDs do exceed 0xffff, including MESA (used by lavapipe).

Without this, the value will be truncated, and device select layer
will not match expected (or any) device.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3935
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7977>
2020-12-08 16:19:25 +00:00
Rob Clark f4bbf29d76 gallium/aux: Update scons build for u_tracepoints.[ch]
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7974>
2020-12-08 16:02:10 +00:00
Rob Clark 7dda840f32 gallium/aux: Split u_tracepoints.[ch] generation
Allow for separate rules to be used to generate the .c and .h (partially
to make it easier for scons build, and partially because that is just a
better practice).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7974>
2020-12-08 16:02:10 +00:00
Rob Clark 4c670b13dd gallium/aux: Avoid creating queue when traces not enabled
Avoids unnecessarily creating an extra thread when tracing is not
enabled.  Which also side-steps a chrome/ium sandbox issue with
the setscheduler call in u_queue.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7974>
2020-12-08 16:02:10 +00:00
Rhys Perry d1283083ea nir: improve divergence analysis for loads with non-uniform resources
If ACCESS_NON_UNIFORM is not specified, we can assume the resource is
uniform. This requires nir_lower_non_uniform_access to remove that flag.

A few Detroit: Become Human shaders use a index sourced from a fragment
input which is expected to be uniform.

shader-db (Navi):
Totals from 8 (0.01% of 127638) affected shaders:
SGPRs: 224 -> 384 (+71.43%)
VGPRs: 208 -> 112 (-46.15%)
CodeSize: 5360 -> 5344 (-0.30%); split: -1.49%, +1.19%
Instrs: 1036 -> 1028 (-0.77%); split: -1.93%, +1.16%
VMEM: 1320 -> 608 (-53.94%)
SMEM: 384 -> 336 (-12.50%); split: +14.58%, -27.08%
VClause: 24 -> 16 (-33.33%)
SClause: 48 -> 56 (+16.67%)
PreSGPRs: 124 -> 216 (+74.19%)
PreVGPRs: 168 -> 88 (-47.62%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5201>
2020-12-08 13:02:27 +00:00
Rhys Perry b1619109ca nir/lower_non_uniform: remove non_uniform flags after lowering
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5201>
2020-12-08 13:02:18 +00:00
yshi18 3aaac40b12 iris: fix memleak for query_buffer_uploader
In the Chrome WebGL Aquarium  stress test, 20 instances of Chrome will run
Aquarium  simultaneously over 20+ hours. That causes Chrome crash.
During the stress, glBeginQueryIndexed is called frequently.

1.Each query will only use 32 bytes from query_buffer_uploader. After the offset
exceed 4096, it will alloc new buffer for query_buffer_uploader->buffer
and release the old buffer.

2.But iris_begin_query will call u_upload_alloc when the offset changed, and it
will increase the query_buffer_uploader->buffer->reference.count every time
when it called u_upload_alloc.

3.So when u_upload_release_buffer try to release the resource of
query_buffer_uploader->buffer, its reference.count is
already equal to 129. pipe_reference_described will only decrease its reference
count to 128.So it never called old_dst->screen->resource_destroy.

4.The old resouce bo will never be freeed. And chrome will called mmap every time
when it alloc new resource bo.

5. Chrome process map too many vmas in its process. Its map count exceed the
sysctl_max_map_count which is 65530 defined in kernel.

6. When iris_begin_query want to alloc new resource bo, it will meet NULL pointer
because mmap return failed. Finally chrome crashed when it access this NULL resource
bo.

The fix is decrease the reference count in iris_destroy_query.

Patch is verified by chrome webgl Aquarium test case for more than 72 hours.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Yang Shi <yang.a.shi@intel.com>
Reviewed-by: Alex Zuo <alex.zuo@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7890>
2020-12-08 11:48:53 +00:00
Jonathan Gray ebfb9e1817 aco: use UINT64_C on 64 bit constant arguments
avoids errors seen when building on OpenBSD/amd64

../src/amd/compiler/aco_instruction_selection.cpp:1677:62: error: ambiguous conversion for functional-style cast from 'unsigned long' to 'aco::Operand'
            bld.vop3(aco_opcode::v_mul_f64, Definition(dst), Operand(0x3FF0000000000000lu), tmp);
                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
glibc uses unsigned long for uint64_t on LP64 archs and unsigned long long for
uint64_t on ILP32 archs.  On OpenBSD unsigned long long is used for uint64_t
on all archs.

The Operand constructors are uint8_t uint16_t uint32_t uint64_t
use UINT64_C so lu or llu suffix will be used as needed.

Fixes: df645fa369 ("aco: implement VK_KHR_shader_float_controls")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7944>
2020-12-08 11:11:28 +00:00
Gert Wollny 454c848592 mesa/st: lower 64 bit ops to scalar before lowering to soft-float
The fp64 emulation is not prepared for vectorized 64 bit code, so
if the driver doesn't ask for lowering to scalar by itself, do it before
lowering to soft-fb, and run a vectorizazion pass afterwards.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7961>
2020-12-08 10:52:34 +00:00
Samuel Pitoiset 59b1578176 radv: disable alphaToOne feature
The feature was exposed but completely ignored by the driver. Other
AMD drivers don't expose it as well, probably because it's complicated
to implement alpha-to-coverage properly. Let's disable it.

Cc: mesa-stable.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7966>
2020-12-08 10:42:27 +01:00
Pierre-Eric Pelloux-Prayer 34b08a298d driconf: add allow_incorrect_primitive_id option
And enable it for SPECviewperf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:17:32 +01:00
Pierre-Eric Pelloux-Prayer ebb228bec5 vbo/dlist: only use merged primitives when it's ok to do so
Merging primitives generates incorrect gl_PrimitiveID[In] values.
So make merged primitives construction non-destructive and fallback
to drawing with original primitives if a program reads gl_PrimitiveId.

This commit adds _mesa_update_primitive_id_is_unused modeled after
_mesa_update_allow_draw_out_of_order to update ctx->_PrimitiveIDIsUnused
each time shaders are updated.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:17:28 +01:00
Pierre-Eric Pelloux-Prayer 1c016a5ba0 vbo/dlist: avoid splitting draw commands in multiple draws
For (Multi)DrawArrays and (Multi)DrawElements commands, the storage size
needed are known early so we can make sure that the prim_store/vertex_store
will be big enough to store the whole command.

This reduces the amount of drawcalls in snx03 tests. For instance in test10:

      | Num draw calls |     GPU-load    |
------|----------------|-----------------|
      | Before | After |  Before | After |
------|--------|-------|---------|-------|
test10|  35k   |   8k  |   58%   |  80%  |

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Pierre-Eric Pelloux-Prayer 83149e1c2d vbo/dlist: refactor prim_store/vertex_store allocations
This will be used in the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Pierre-Eric Pelloux-Prayer b81ed32ba8 mesa: optimize _mesa_program_resource_location
- xxhash is faster than sha1.
- remove superfluous calls to strlen

Using SPECviewperf13 snx-03 first subtest and "perf -e cycles -g", perf report says:

 Before  | After  | Function
---------|--------|---------------
  47.39% | 47.36% | _mesa_CallList
   5.00% |  3.03% | _mesa_program_resource_location

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Pierre-Eric Pelloux-Prayer ba67843dbd util/hash_table: add _mesa_hash_data_with_seed function
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Pierre-Eric Pelloux-Prayer 310991415e vbo/dlist: implement primitive merging
Merge consecutive primitives using the same mode while constructing the index buffer.

This improves performance a lot (x3 - x10) SPECviewperf13 snx-03 test by reducing the
number of draw calls per frame.
Here are some numbers for 4 of the tests:

      | Num draw calls |     GPU-load    |
------|----------------|-----------------|
      | Before | After |  Before | After |
------|--------|-------|---------|-------|
test1 |  390k  |  16k  |   68%   |  90%  |
test2 |  370k  |  16k  |   40%   |  90%  |
test3 |  1.2M  |  35k  |   38%   |  78%  |
test10|  3.5M  |  35k  |   36%   |  58%  |

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Pierre-Eric Pelloux-Prayer ac3d4c7635 vbo/dlist: convert LINE_STRIPS to LINES
Less primitive modes allows for better primitive merging.

Lines are always used (instead of picking dynamically lines or line
strips for instance) because:
- they don't need primitive restarts to be merged
- they perform better (at least on radeonsi) - SPECviewperf13 snx subtests
  with lines (like 4 or 10) are 1.5x-2x faster.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Pierre-Eric Pelloux-Prayer dc995adec5 vbo/dlist: create an index buffer in compile_vertex_list
This will be useful to implement other optimizations.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Pierre-Eric Pelloux-Prayer 7e296c62a7 dlist: do not call _mesa_lookup_list twice
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
2020-12-08 10:10:47 +01:00
Mauro Rossi 2b1930a50a android: radv: add libcutils shared dependency
Fixes the following building error:

    FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.android-x86_intermediates/LINKED/vulkan.android-x86.so
    ...
    ld.lld: error: undefined symbol: property_get
    >>> referenced by os_misc.c:193 (external/mesa/src/util/os_misc.c:193)
    >>>               os_misc.o:(os_get_option) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_util_intermediates/libmesa_util.a

Fixes: eeecc21d ("util: Add property_get() fallback for android")
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7861>
2020-12-07 23:54:25 +01:00
Marijn Suijten a0c5089935 mesa/math: Fix address of array always returning true
external/mesa3d/src/mesa/math/m_matrix.c:1403:13: error: address of array 'mat->inv' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
       if (mat->inv && (mat->flags & MAT_DIRTY_INVERSE)) {
           ~~~~~^~~ ~~

Fixes: 3175b63a0d ("mesa: don't allocate matrices with malloc")
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7861>
2020-12-07 23:27:03 +01:00
Marijn Suijten 77dafaece3 android: util: Add libcutils to Android.mk shared libs
Otherwise:

    external/mesa3d/src/util/os_misc.c:59:12: fatal error: 'cutils/properties.h' file not found
    #  include <cutils/properties.h>
               ^~~~~~~~~~~~~~~~~~~~~

And:

    ld.lld: error: undefined symbol: property_get
    >>> referenced by os_misc.c:193 (external/mesa3d/src/util/os_misc.c:193)
    >>>               os_misc.o:(os_get_option) in archive out/target/product/discovery/obj/STATIC_LIBRARIES/libmesa_util_intermediates/libmesa_util.a

Fixes: eeecc21d93 ("util: Add property_get() fallback for android")
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7861>
2020-12-07 23:27:03 +01:00
Witold Baryluk e2b4247e40 zink: Cap PIPE_SHADER_CAP_MAX_CONST_BUFFERS to 32
PIPE_MAX_CONSTANT_BUFFERS is 32, however many Vulkan implementations
has maxPerStageDescriptorUniformBuffers that exceeds it, for example:

radv 8388606,
anv 64
nvidia 1048580 for RTX 2000 and up.

and, together with the current zink logic, the returned value
will exceed the maximum allowed value for the cap.

This causes cso_destroy_context to pass big values back to zink
(via zink_set_constant_buffer), resulting in access beyond end of
allocated buffer for all UBOs.

Cap the cap to PIPE_MAX_CONSTANT_BUFFERS (32), not INT_MAX.

Add an assert to verify future drivers.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: daaf5f1d18 ("gallium: Fix leak of currently bound UBOs at CSO context destruction.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7976>
2020-12-07 21:19:13 +00:00
Marek Olšák 6b6cb44ec8 gallium: fix the PIPE_SHADER_CAP_SUPPORTED_IRS value for all drivers
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7826>
2020-12-07 20:55:28 +00:00
Marek Olšák a33dbba261 st/mesa: remove less useful debug options in hot paths
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7826>
2020-12-07 20:55:28 +00:00
Marek Olšák 44b7e1497f st/mesa: don't generate TGSI for the draw VS because it now supports NIR too
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7826>
2020-12-07 20:55:27 +00:00
Marek Olšák df11ceaaaf draw: add NIR support to draw_create_vertex_shader
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7826>
2020-12-07 20:55:27 +00:00
Erik Faye-Lund 8bb4a76add zink: fix channel ordering in format-mapping
This looks like a typo. Packed vulkan formats should always map to the
inverse order of the corresponding gallium notation. Besides, it makes
no sense that unsigned and signed formats have different ordering.

Fixes: cdfb1d925f ("zink: add last few format maps for ARB_vertex_type_2_10_10_10_rev")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7964>
2020-12-07 20:43:29 +00:00
Gert Wollny 6c0ce29b04 r600/sfn: Add support for shader_clock
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7973>
2020-12-07 20:33:51 +00:00
Gert Wollny d95791bb2e r600/sfn: Fix dest-swizzle for GS vertex loads
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7962>
2020-12-07 20:24:40 +00:00
Thong Thai c5088b4972 gallium: Fix VAAPI postproc blit
Fixes the VAAPI postproc issue mentioned in this comment
(https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6736#note_626808)
without changing the height of the underlying resource when doing the
blit.

This commit removes the 0.5 pixel center offset from the compute blit - VAAPI postproc is the only function that uses this compute blit.

Fixes: 49465babdb ("frontends/va/postproc: Use the actual image height when blitting")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7970>
2020-12-07 19:46:24 +00:00
Jason Ekstrand c47fe54bc7 nir/lower_non_uniform: Better handle non-derefs
In particular, if we have an index or bindless handle we were passing
the original handle which, technically, is uniform within the context of
the if.  However, we can save the back-end compiler some effort if we
pass it the result of the read_first_invocation().

(Rebased by Kenneth Graunke and Rhys Perry.)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7592>
2020-12-07 19:27:56 +00:00
Jason Ekstrand 0bf8d156a9 nir/lower_non_uniform: Refactor for better code organization
In theory, I don't think this is a functional change.  We should
generate the same code before and after.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7592>
2020-12-07 19:27:56 +00:00
Kenneth Graunke 562e07db38 nir/lower_non_uniform: Use nir_read_first_invocation helper.
We now have a general helper for this, and don't need to roll our own.

Suggested by Rhys Perry in the review for MR !7592.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7592>
2020-12-07 19:27:56 +00:00
Erik Faye-Lund 3abac03d49 gallium: do not reset buffers for unsupported stages
There's no good reason why drivers that doesn't grok geometry,
tesselation or compute shaders needs to deal with them.

This fixes a crash on a lot of Piglit tests for Zink.

Fixes: daaf5f1d18 ("gallium: Fix leak of currently bound UBOs at CSO context destruction.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7971>
2020-12-07 17:29:39 +00:00
Michel Zou c4342755cc llvmpipe: work around mingw compiler optimization bug
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3906

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7914>
2020-12-07 17:11:19 +00:00
Samuel Pitoiset ec3828add3 radv: fix clearing FMASK for layered MSAA images on GFX9+
If we always clear the whole FMASK buffer, layers can be corrupted.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3710
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/7924>
2020-12-07 16:19:22 +00:00
Samuel Pitoiset 35964e9387 ac/surface: initialize the FMASK slice size for GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7924>
2020-12-07 16:19:22 +00:00
Samuel Pitoiset c0319e4505 radv: advertise VK_EXT_sample_locations on GFX10+
Only MSAA2x and MSAA4X sample locations can be 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/7850>
2020-12-07 15:45:49 +00:00
Samuel Pitoiset 3adf8121a0 radv: enable using MSAA2x and MSAA4x sample locations on GFX10+
These failures are really weird but MSAA2x and MSAA4x work fine.

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/7850>
2020-12-07 15:45:49 +00:00