Commit Graph

130626 Commits

Author SHA1 Message Date
Marek Olšák d9c4ca2b7b radeonsi don't get count from pipe_draw_info in si_num_prims_for_vertices
This is needed for multi draws.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056>
2020-10-31 00:18:11 +00:00
Marek Olšák 7cc939f7dd radeonsi: add num_draws parameter into si_need_gfx_cs_space
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056>
2020-10-31 00:18:11 +00:00
Marek Olšák 095ee8f867 winsys/amdgpu: remove incorrect assertion check against max_check_space_size
Fixes: 114a899cc8 "winsys/amdgpu: cs_check_space sets the minimum IB size for future IBs"

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056>
2020-10-31 00:18:11 +00:00
Marek Olšák 73f2d3c291 gallium: add pipe_context::multi_draw
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056>
2020-10-31 00:18:11 +00:00
Marek Olšák d9c12c6072 gallium: move pipe_draw_info::start/count to the beginning and pad empty space
for memcmp and merging draw calls

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056>
2020-10-31 00:18:11 +00:00
Bas Nieuwenhuizen 8943c80c9b radv: Fix variable name collision.
idx was aliased, and eb104e949e started
using the outer var in the inner scope ...

Fixes: eb104e949e
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3701
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7388>
2020-10-30 23:44:48 +01:00
Christian Gmeiner 41be85ad7b ci/x86: speed up piglit testing
Add python3 packages to speed up piglit run.

 - lxml. An accelerated python xml library using libxml2 (http://lxml.de/)
 - simplejson. A fast C based implementation of the python json library.
   (https://simplejson.readthedocs.org/en/latest/)

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7379>
2020-10-30 17:22:06 +00:00
Mauro Rossi e54c7f4b1a android: aco: add aco_form_hard_clauses.cpp to Makefile.sources
Fixes the following building error:

external/mesa/src/amd/compiler/aco_interface.cpp:160:
error: undefined reference to 'aco::form_hard_clauses(aco::Program*)'

Fixes: 3dfbed2a8 ("aco: create s_clause on GFX10+")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7380>
2020-10-30 13:34:06 +00:00
Lucas Stach a1d6c03e2f etnaviv: don't import allocated scanout resources via from_handle
etna_resource_from_handle() recomputes (or second guesses) a lot of
properties we already have available in the allocation call. To make
things a bit more easier to follow, just import the BO without going
through the full handle import.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach 3862cec314 etnaviv: pass correct layout to etna_resource_alloc for scanout resources
Since b962776530 (etnaviv: rework compatible render base) the base resource
may be linear and a render compatible resource is allocated as needed. As
scanout surfaces without a modifier are always assumed to be linear, make
sure to pass the correct layout to etna_resource_alloc().

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach ec21148311 etnaviv: simplify etna_screen_bo_from_handle
There is no need to have a out_stride parameter, as the only callsite
already has the winsys handle, which includes the stride, so there is
no need to pass the stride back and forth.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach 94ec412b26 etnaviv: do proper cpu prep/fini when clearing allocated buffer
The debug memset 0 of all allocated buffers did not sync the buffer for CPU
access as required by the UAPI.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach 181790117b etnaviv: cosmetic etna_resource_alloc fixes
Get rid if the local bo variable, we can just assign it to the pointer
in the etna_resource struct.
Get rid of superfluous clearing of the TS bo pointer, the struct is already
zero initialized.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Michael Tretter 98db7c4841 etnaviv: free tgsi tokens when shader state is deleted
The tokens are allocated using tgsi_dup_tokens when the shader state is
created, so we need to free them explicitly when deleting the shader state.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach 3fd512440b etnaviv: tex_desc: fix TS compression enable
The TX_CTRL register has a bit to enable TS compression, the setting in
TS_SAMPLER_CONFIG is ignored for descriptor based textures. Apparently
256B tile mode already implies enabled compression to the HW, as with
the larger tile mode with compression was working fine, only the 128B
tile mode needs this change to work correctly.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach cf871e9232 etnaviv: update headers from rnndb
Update to etna_viv commit c9a26f3b776a.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach 3ba753d9f5 etnaviv: blt: properly program surface TS offset for clears
We clear the wrong TS region for != level 0 surfaces or TS buffers
with a internal offset.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Lucas Stach 866bb22d6b etnaviv: drm: fix BO refcount race
There is a race where the BO refcount might drop to 0 before the
dmabuf/name import paths had a chance to grab a reference for a
BO found in the handle_table. The easiest solution is to keep the
refcount stable as long as the table_lock is held.

While a more involved scheme of rechecking the refcount before
actually destroying the BO might also work, the bo_del path isn't
called very often, so micro-optimizing a single mutex_lock seems
to be over-engineered, so go for the easy solution.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
2020-10-30 13:27:44 +00:00
Christian Gmeiner 8b0218beb5 etnaviv: drop etna_pipe_wait(..)
It is unused -> drop it.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7371>
2020-10-30 11:28:27 +00:00
Marek Olšák b7501184b9 radeonsi: implement inlinable uniforms
This improves performance for uber shaders.

It must be enabled using the new driconf option.

The driver compiles the specialized shaders in another thread without stalls,
same as all other optimizations.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7057>
2020-10-30 11:07:22 +00:00
James Park 6d058ac6c9 aco: Fix accidental copies, attempt two
Use auto to avoid mistyping the constness of the pair key, which
triggers implicit conversions rather than compilation errors.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7346>
2020-10-30 09:55:53 +00:00
Lionel Landwerlin b03c86a71f intel/dev: Bump Max EU per subslice/dualsubslice
This isn't a problem right now because the previous max would give the
same result when aligned to a byte (8bits).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7288>
2020-10-30 08:22:26 +00:00
Marek Olšák 5957b0c162 glthread: pin driver threads to the same L3 as the main thread regularly
This improves performance on my Ryzen 3900X, which has 4 L3 caches and
6 threads per L3.

The best improvement is 33% if the kernel CPU scheduler doesn't move
the main thread too often.

v2: pin only once in 128 batch flushes

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054>
2020-10-30 05:07:57 +00:00
Marek Olšák d8ea509965 util: completely rewrite and do AMD Zen L3 cache pinning correctly
This queries the CPU cache topology correctly.

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054>
2020-10-30 05:07:57 +00:00
Marek Olšák 4f2c2307f9 util: add util_get_current_cpu using sched_getcpu and Windows equivalent
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054>
2020-10-30 05:07:57 +00:00
Marek Olšák 9758b1d416 util: add util_set_thread_affinity helpers including Windows support
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054>
2020-10-30 05:07:57 +00:00
Marek Olšák 3433d193e7 st/mesa: remove random L3 pinning heuristic for glthread
This is not very effective. A better solution will be added to glthread.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054>
2020-10-30 05:07:57 +00:00
Marek Olšák 96d9f7761d util: consolidate thread_get_time functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054>
2020-10-30 05:07:57 +00:00
Marek Olšák 53a15925da util: remove unused util_get_L3_for_pinned_thread
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7054>
2020-10-30 05:07:57 +00:00
Mauro Rossi cc16113202 android: fix libsync dependencies (v2)
(v2) Remove include from Android.common.mk
     Avoid adding libsync shared dependency in Android.common.mk
     Add libsync shared dependency where needed, for easier tracking

(v1) Fixes the following building errors:

In file included from external/mesa/src/gallium/drivers/freedreno/a3xx/fd3_query.c:27:
In file included from external/mesa/src/gallium/drivers/freedreno/freedreno_query_hw.h:33:
In file included from external/mesa/src/gallium/drivers/freedreno/freedreno_context.h:33:
external/mesa/src/util/libsync.h:48:10: fatal error: 'android/sync.h' file not found
         ^~~~~~~~~~~~~~~~
1 error generated.

In file included from external/mesa/src/mesa/drivers/dri/i965/brw_sync.c:41:
external/mesa/src/util/libsync.h:48:10: fatal error: 'android/sync.h' file not found
         ^~~~~~~~~~~~~~~~
1 error generated.

In file included from external/mesa/src/gallium/auxiliary/util/u_tests.c:513:
external/mesa/src/util/libsync.h:48:10: fatal error: 'android/sync.h' file not found
         ^~~~~~~~~~~~~~~~
1 error generated.

FAILED: out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/i965_dri_intermediates/LINKED/i965_dri.so
...
external/mesa/src/mesa/drivers/dri/i965/brw_sync.c:223: error: undefined reference to 'sync_wait'
external/mesa/src/mesa/drivers/dri/i965/brw_sync.c:287: error: undefined reference to 'sync_wait'

FAILED: out/target/product/x86_64/obj_x86/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
external/mesa/src/util/libsync.h:142: error: undefined reference to 'sync_merge'
external/mesa/src/gallium/drivers/freedreno/freedreno_fence.c:94: error: undefined reference to 'sync_wait'
external/mesa/src/gallium/auxiliary/util/u_tests.c:575: error: undefined reference to 'sync_wait'

Fixes: 27b8887946 ("android: Add pre-4.7 Android kernel compatibility to our libsync header.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7306>
2020-10-30 01:31:27 +01:00
Timothy Arceri a09717c4de glsl: add extra pp tokens workaround and enable for CoR
The CTS now tests to make sure these are not allowed. However, previously
drivers (including Mesa) would allow them to exist and just issue a
warning. Some old applications such as Champions of Regnum seem to
depend on this.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/422

Fixes: 43047384c3 ("glsl/glcpp: Promote "extra token at end of directive" from warning to error")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7361>
2020-10-29 23:35:58 +00:00
Caio Marcelo de Oliveira Filho ce0b72a13a intel/fs: Don't emit_uniformize when getting a constant SSBO index
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7340>
2020-10-29 21:54:01 +00:00
Alejandro Piñeiro 0fe5490724 v3d/format: use XYZ1 swizzle for three-component formats
R11G11B10_FLOAT and R9G9B9E5_FLOAT are three-component formats, so we
shouldn't use 1 for the alpha component.

We don't know about any test/app getting fixed with this change, but
it is the equivalent to v3dv commit
e07c546763. Vulkan CTS has some tests
that used that format and failed if not using XYZ1.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7365>
2020-10-29 20:52:07 +00:00
Dave Airlie f7d1460418 gallivm: zero init the temporary register storage.
Due to flow control we can end up with random values in here having
side effects.

This fixes a crash in gtk4-demo.

Fixes: 44a6b0107b ("gallivm: add nir->llvm translation (v2)")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7327>
2020-10-30 05:30:35 +10:00
Rhys Perry 1761379481 aco: handle SDWA in the optimizer
Apply SGPRs/modifiers when possible and try not to break when SDWA
instructions are encountered.

No shader-db changes.

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/7349>
2020-10-29 18:08:31 +00:00
Rhys Perry ecc5b59a70 aco: don't allow destination opsel for v_cvt_pknorm
It doesn't make sense to do this.

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/7349>
2020-10-29 18:08:31 +00:00
Rhys Perry bb890f2e7c aco: fix combine_inverse_comparison()
fossil-db (Navi):
Totals from 16 (0.01% of 137413) affected shaders:
CodeSize: 6788 -> 6724 (-0.94%)
Instrs: 1250 -> 1234 (-1.28%)
Cycles: 4984 -> 4920 (-1.28%)

fossil-db (Polaris):
Totals from 16 (0.01% of 138881) affected shaders:
CodeSize: 7024 -> 6960 (-0.91%)
Instrs: 1337 -> 1321 (-1.20%)
Cycles: 5332 -> 5268 (-1.20%)

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/7349>
2020-10-29 18:08:31 +00:00
Rhys Perry 7e4aa8c8e9 aco: fix printing of some sdwa sels
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/7349>
2020-10-29 18:08:31 +00:00
Rhys Perry 70320f4117 aco: assert a label only uses one of the members in ssa_info's union
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/7349>
2020-10-29 18:08:31 +00:00
Rhys Perry 3dfbed2a87 aco: create s_clause on GFX10+
This seems to give no measurable benefit to Strange Brigade or Shadow of
Mordor, but it's simple to do, helps in theory and all other compilers do
it.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5919>
2020-10-29 15:08:05 +00:00
Daniel Schürmann f4c090a3b3 aco: refactor split_store_data() to always split into evenly sized elements
This fixes a couple of issues on GFX67 and
has no negative impact on newer hardware

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7105>
2020-10-29 14:32:59 +00:00
Marcin Ślusarz daec83c7d6 intel/genxml: don't generate identical code for different branches
Quiets 16 Coverity warnings like:

CID 1403401: Identical code for different branches (IDENTICAL_BRANCHES)

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7351>
2020-10-29 12:49:36 +00:00
Marcin Ślusarz e96f33cd30 intel/tools: fix invalid type in argument to printf
$2 is exp2, exp2 is defined to be llint and llint is defined to be
unsigned long long int.

Fixes error reported by Coverity:
CID 1451141: Invalid type in argument to printf format specifier (PRINTF_ARGS)

Fixes: 70308a5a8a ("intel/tools: New i965 instruction assembler tool")

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7351>
2020-10-29 12:49:36 +00:00
Philipp Zabel 13859c769f gallium/dri: fix dri2_from_planar for multiplanar images
Fix the gbm_dri_bo_get_handle_for_plane use case by allowing plane > 0
in dri2_from_planar for images with multiple planes in separate chained
texture resources.

Not all multiplanar resources are chained, though. The iris aux buffer
is a separate plane in the same resource.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7028>
2020-10-29 12:40:41 +01:00
Philipp Zabel 6c118aebb1 gallium/dri: fix dri2_query_image for multiplanar images
Images with multiple planes in separate chained texture resources should
report the correct number of planes.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
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/7028>
2020-10-29 12:33:55 +01:00
Lucas Stach 0f3594cd7b gallium/dri: allow create image for formats that only support SV or RT binding
Unconditionally requesting both bindings can lead to premature
failure to create a valid image.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7028>
2020-10-29 12:31:28 +01:00
Karol Herbst 25f984812b nv50/ir/nir: don't use designated initializers
This is a C++20 feature...

Fixes: 8850a63161 ("radv/aco,nir/lower_subgroups: don't lower elect")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3693
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Andrew Randrianasulu <randrianasulu@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7338>
2020-10-29 11:00:57 +00:00
Alejandro Piñeiro e07c546763 v3dv/format: use XYZ1 swizzle for three-component formats
So far for the formats E5B9G9R9_UFLOAT_PACK32 and
B10G11R11_UFLOAT_PACK32 we were using a XYZW swizzle. But from Vulkan
spec those are three-component, without alpha, formats. So we should
use XYZ1 instead, as we were already doing for other three-component
formats.

Curiously the only case where this raised a problem were when using
clamp to border with transparent black. This change allows us to
remove the code that handled only that specific case.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7355>
2020-10-29 11:06:44 +01:00
Tomeu Vizoso d8562b742e virgl: Correctly align size of blobs
Probably a copy-paste error.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: cd31f46f08 ("virgl/drm: add resource create blob function")
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7332>
2020-10-29 08:10:17 +01:00
Vinson Lee 7dc17ae5ab glsl: Update loop_terminator constructor to accept parameters.
Fix defect reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member continue_from_then is not
initialized in this constructor nor in any functions that it calls.

Suggested-by: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7283>
2020-10-28 19:28:40 -07:00