summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2 hoursandroid: fix libsync dependencies (v2)HEADmasterMauro Rossi5-3/+6
(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: 27b888794624 ("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>
3 hoursglsl: add extra pp tokens workaround and enable for CoRTimothy Arceri9-1/+27
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: 43047384c331 ("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>
5 hoursintel/fs: Don't emit_uniformize when getting a constant SSBO indexCaio Marcelo de Oliveira Filho1-5/+3
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7340>
6 hoursv3d/format: use XYZ1 swizzle for three-component formatsAlejandro Piñeiro1-2/+2
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 e07c5467633431377ce4c9890f96d58cc7a77fdc. 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>
7 hoursgallivm: zero init the temporary register storage.Dave Airlie1-2/+2
Due to flow control we can end up with random values in here having side effects. This fixes a crash in gtk4-demo. Fixes: 44a6b0107b37 ("gallivm: add nir->llvm translation (v2)") Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7327>
9 hoursaco: handle SDWA in the optimizerRhys Perry1-22/+69
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>
9 hoursaco: don't allow destination opsel for v_cvt_pknormRhys Perry1-2/+2
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>
9 hoursaco: fix combine_inverse_comparison()Rhys Perry1-10/+11
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>
9 hoursaco: fix printing of some sdwa selsRhys Perry1-1/+1
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>
9 hoursaco: assert a label only uses one of the members in ssa_info's unionRhys Perry1-0/+4
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>
12 hoursaco: create s_clause on GFX10+Rhys Perry4-0/+116
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>
12 hoursaco: refactor split_store_data() to always split into evenly sized elementsDaniel Schürmann1-87/+97
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>
14 hoursintel/genxml: don't generate identical code for different branchesMarcin Ślusarz1-0/+8
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>
14 hoursintel/tools: fix invalid type in argument to printfMarcin Ślusarz1-1/+1
$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: 70308a5a8a8 ("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>
15 hoursgallium/dri: fix dri2_from_planar for multiplanar imagesPhilipp Zabel1-2/+14
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>
15 hoursgallium/dri: fix dri2_query_image for multiplanar imagesPhilipp Zabel1-1/+5
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>
15 hoursgallium/dri: allow create image for formats that only support SV or RT bindingLucas Stach1-2/+11
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>
16 hoursnv50/ir/nir: don't use designated initializersKarol Herbst1-5/+4
This is a C++20 feature... Fixes: 8850a63161ab58d89c534a1069cda845bf69ecc8 ("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>
17 hoursv3dv/format: use XYZ1 swizzle for three-component formatsAlejandro Piñeiro2-23/+2
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>
20 hoursvirgl: Correctly align size of blobsTomeu Vizoso1-1/+1
Probably a copy-paste error. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Fixes: cd31f46f08a7 ("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>
24 hoursglsl: Update loop_terminator constructor to accept parameters.Vinson Lee2-6/+4
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>
30 hoursaco/ngg: Incorporate GS invocations into workgroup size calculation.Timur Kristóf1-3/+4
If the workgroup_size variable is lower than the actual workgroup size, that means it's possible that ACO won't emit some s_barrier instructions when in fact it should. This can possibly cause a GPU hang. This is just for the sake of general correctness, currently this can't cause a real problem because the maximum vertex count is always greater than (or equal to) the primitive count in GS, and already takes into account the number of GS invocations. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7232>
30 hoursaco/ngg: Export a zero-area triangle when primitive count is 0.Timur Kristóf1-0/+34
This is a workaround for a bug in Navi 1x NGG HW. Very rarely, the Navi 1x PA can hang when an NGG workgroup exports 0 total primitives. According to AMD, we always need this workaround when it is possible that the number of primitives is 0. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7232>
30 hoursaco: Add a few assertions about LDS usage.Timur Kristóf1-0/+5
This is to make sure we don't compile a shader which doesn't fit the available LDS space. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7232>
30 hoursaco: Make emitting reduction instructions a bit more convenient.Timur Kristóf1-14/+10
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7232>
30 hoursaco: Add some validation for PSEUDO_REDUCTION instructions.Timur Kristóf1-0/+13
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7232>
30 hoursaco/ngg: Put shader query reduction operand into a VGPR.Timur Kristóf1-0/+2
The p_reduce instruction only works if this operand is in a VGPR, and otherwise gets lowered to incorrect code. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7232>
30 hoursaco: Assert that workgroup barriers are not used inappropriately.Timur Kristóf1-0/+5
Example: It is possible for some NGG GS waves to have 0 ES and/or GS invocations, and in that case having an s_barrier inside divergent control flow can very possibly hang the GPU. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7232>
33 hoursci/bare-metal: suppress 'No such file or directory'Christian Gmeiner1-1/+1
It fills the serial log with unimportant messages. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7347>
33 hoursaco: switch aco_print_asm to a FILE *Rhys Perry4-47/+42
Streams are really stateful and (IMO) difficult to read for non-trivial usage. This is also more consistent with NIR and the rest of ACO. 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/7166>
33 hoursaco: refactor repeated instruction disassemblyRhys Perry1-12/+21
This seems simpler to me. It should also work correctly when repeated instructions cross blocks. 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/7166>
33 hoursaco: move individual instruction disassembly to its own helperRhys Perry1-41/+57
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/7166>
33 hoursdocs/features: Update extensions for swrAdam Jackson1-10/+10
The following are all supported: - GL_ARB_shader_atomic_counters - GL_ARB_shader_image_load_store - GL_ARB_shader_image_size - GL_ARB_texture_multisample - GL_KHR_texture_compression_astc_ldr - GL_KHR_texture_compression_astc_sliced_3d - GL_OES_texture_float - GL_OES_texture_float_linear - GL_OES_texture_half_float - GL_OES_texture_half_float_linear Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7281>
33 hoursdocs/features: Update extensions for softpipeAdam Jackson1-13/+13
GLES 3.1 is supported, as are: - GL_KHR_texture_compression_astc_ldr - GL_KHR_texture_compression_astc_sliced_3d - GL_EXT_render_snorm - GL_EXT_texture_norm16 Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7281>
36 hoursaco: use mubuf helper in select_gs_copy_shaderRhys Perry1-20/+9
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/6103>
36 hoursaco: use control flow creation helpers in select_gs_copy_shaderRhys Perry1-42/+8
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/6103>
40 hoursaco: round bytes_written to dwords if larger than 4 bytesRhys Perry1-0/+1
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/7276>
40 hoursaco: default to a definition size of 32Rhys Perry1-4/+4
For non-arithmetic opcodes such as buffer_load_dword and buffer_load_short, default to a definition size of 32. 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/7276>
40 hoursdocs: s3tc -> S3TCErik Faye-Lund1-3/+3
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: clang -> ClangErik Faye-Lund3-3/+3
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: gcc -> GCCErik Faye-Lund3-6/+6
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: fbo -> FBOErik Faye-Lund1-1/+1
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: hud -> HUDErik Faye-Lund1-5/+5
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: api -> APIErik Faye-Lund1-1/+1
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: anistropy -> anisotropyErik Faye-Lund1-2/+2
While one of these is referring to an identifier, the actual identifier is correctly spelled. Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: eg. -> e.g.Erik Faye-Lund3-3/+3
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursdocs: ie. -> i.e.Erik Faye-Lund4-11/+11
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7060>
40 hoursradv: remove call to nir_lower_pack()Daniel Schürmann1-1/+0
The pack_* instructions are now lowered via nir_lower_alu_to_scalar() and unpack_* are not lowered anymore. These bitcasts are no-ops, and lowering prevents some optimizations like vectorization. Note: There are still some *_split variations remaining from different other NIR passes. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6527>
40 hoursradv: lower pack_[64/32]_* via nir_lower_alu_to_scalar()Daniel Schürmann1-0/+3
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6527>
40 hoursnir: add options to lower nir_op_pack_[64/32]_* via nir_lower_alu_to_scalar()Daniel Schürmann2-0/+31
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6527>