Commit Graph

130677 Commits

Author SHA1 Message Date
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
Timur Kristóf f74ef15879 aco/ngg: Incorporate GS invocations into workgroup size calculation.
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>
2020-10-28 21:55:54 +01:00
Timur Kristóf 09b9e52c0d aco/ngg: Export a zero-area triangle when primitive count is 0.
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>
2020-10-28 21:55:47 +01:00
Timur Kristóf 73449f9a62 aco: Add a few assertions about LDS usage.
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>
2020-10-28 21:47:22 +01:00
Timur Kristóf b6654adc0e aco: Make emitting reduction instructions a bit more convenient.
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>
2020-10-28 21:47:22 +01:00
Timur Kristóf 8d6246205a aco: Add some validation for PSEUDO_REDUCTION instructions.
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>
2020-10-28 21:47:22 +01:00
Timur Kristóf 260f9c503a aco/ngg: Put shader query reduction operand into a VGPR.
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>
2020-10-28 21:47:22 +01:00
Timur Kristóf 9757c3cb6b aco: Assert that workgroup barriers are not used inappropriately.
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>
2020-10-28 21:47:19 +01:00
Christian Gmeiner 915f2919f6 ci/bare-metal: suppress 'No such file or directory'
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>
2020-10-28 18:04:22 +00:00
Rhys Perry ecdcf22d5d aco: switch aco_print_asm to a FILE *
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>
2020-10-28 17:32:32 +00:00
Rhys Perry a293fad4ef aco: refactor repeated instruction disassembly
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>
2020-10-28 17:32:32 +00:00
Rhys Perry ed2449d55b aco: move individual instruction disassembly to its own helper
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>
2020-10-28 17:32:32 +00:00
Adam Jackson 7ded846ba9 docs/features: Update extensions for swr
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>
2020-10-28 13:11:57 -04:00
Adam Jackson 2088f359ff docs/features: Update extensions for softpipe
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>
2020-10-28 13:11:44 -04:00
Rhys Perry 483657de32 aco: use mubuf helper in select_gs_copy_shader
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>
2020-10-28 14:59:49 +00:00
Rhys Perry ec7ecfe9cb aco: use control flow creation helpers in select_gs_copy_shader
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>
2020-10-28 14:59:49 +00:00
Rhys Perry 57d977a23f aco: round bytes_written to dwords if larger than 4 bytes
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>
2020-10-28 10:56:27 +00:00
Rhys Perry 41839d38cf aco: default to a definition size of 32
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>
2020-10-28 10:56:27 +00:00
Erik Faye-Lund 768186e2af docs: s3tc -> S3TC
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund d30470e999 docs: clang -> Clang
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund f3095f9b40 docs: gcc -> GCC
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund 4aded09734 docs: fbo -> FBO
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund e8d0313df5 docs: hud -> HUD
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund f408343198 docs: api -> API
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund a22cedf4f0 docs: anistropy -> anisotropy
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund 689145eeb2 docs: eg. -> e.g.
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>
2020-10-28 10:27:51 +00:00
Erik Faye-Lund 580b9d11ff docs: ie. -> i.e.
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>
2020-10-28 10:27:51 +00:00
Daniel Schürmann fef8a4befd radv: remove call to nir_lower_pack()
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>
2020-10-28 10:14:26 +00:00
Daniel Schürmann 212be2a04e radv: lower pack_[64/32]_* via nir_lower_alu_to_scalar()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6527>
2020-10-28 10:14:26 +00:00
Daniel Schürmann bd0468ed33 nir: add options to lower nir_op_pack_[64/32]_* via nir_lower_alu_to_scalar()
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6527>
2020-10-28 10:14:26 +00:00
Daniel Schürmann 121fa017e1 ac/nir: implement nir_op_[un]pack_64_4x16
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6527>
2020-10-28 10:14:26 +00:00
Daniel Schürmann 543f50789a aco: implement nir_op_unpack_[64/32]_*
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6527>
2020-10-28 10:14:26 +00:00
Iago Toral Quiroga 79cd22b889 v3dv: enable alphaToOne feature
This is another case of a feature that is implemented in the compiler
and that only required that we set the shader key properly from the
pipeline state, which we were already doing.

I verified we pass the tests in dEQP-VK.pipeline.multisample.alpha_to_one.*
(we only support 4x multisampling, so we can only pass a single test there),
however, the tests seem to have a bug by which they always pass, even if
the driver doesn't actually implement alpha to one correctly. I submitted
a fix to Khronos and verified that we also pass the fixed tests (and that
we failed them if we don't actually set te shader key correctly).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7336>
2020-10-28 07:58:29 +01:00
Bas Nieuwenhuizen eb104e949e radv: Do not access set layout during vkCmdBindDescriptorSets.
The spec says:

"
VkDescriptorSetLayout objects may be accessed by commands that operate on descriptor sets allocated using that layout
"

So our behavior is valid here, but this is a temporary workaround for an issue with Baldur's Gate 3.

CC: mesa-stable
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3607
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7207>
2020-10-28 03:06:20 +00:00
Bas Nieuwenhuizen 29999e6b9d radv: Fix 1D compressed mipmaps on GFX9.
Partial rollback as GFX9 really requires height = 1 to work.

The two substantial parts of the fix remaining:

1) Deal with views with multiple levels.
2) Limit the expansion to the base mip pitch/height. On GFX9 this
   is exactly equal to the surf_pitch that was used before. I've
   done some investigation to make sure that on GFX10 this always
   results in the right physical layout.

Remaining stupid question is how the actual extents for bounds
checking never end up too low when the size gets clamped, but
this change and the previous change don't change that ...

Fixes: 1fb3e1fb70 "radv: Fix mipmap extent adjustment on GFX9+."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7245>
2020-10-28 00:31:04 +00:00
Jordan Justen 06cf838cbd intel/mi_builder: Support gen11 command-streamer based register offsets
Reworks:
 * Automatically apply to any register in the range 0x2000 - 0x4000

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5466>
2020-10-27 16:11:12 -07:00
Vinson Lee fdb1997ab5 Fix VMware capitalization.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7260>
2020-10-27 15:33:40 -07:00
Michel Zou 0e7d45c89a util: use dllexport for mingw too
Acked-by: Jose Fonseca <jfonsec@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7341>
2020-10-27 21:05:55 +00:00
Michel Zou e030ab5163 lavapipe: configure suffix in icd json
Acked-by: Jose Fonseca <jfonsec@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7341>
2020-10-27 21:05:55 +00:00
Michel Zou 3017d884bc gallium: use libpipe_loader_links
Acked-by: Jose Fonseca <jfonsec@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7341>
2020-10-27 21:05:55 +00:00
Michel Zou 0355d10c6b wsi: move drm code to wsi_common_drm.c
Acked-by: Jose Fonseca <jfonsec@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7341>
2020-10-27 21:05:55 +00:00
Michel Zou 72ce22f991 lavapipe: fix usleep usage in lvp_device
Acked-by: Jose Fonseca <jfonsec@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7341>
2020-10-27 21:05:55 +00:00
Jordan Justen d399c3e861 intel/dev: Add device info for ADL-S
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7322>
2020-10-27 20:42:38 +00:00
Rhys Perry 26e53e3afa aco: ignore the ACO-inserted continue in create_continue_phis()
Otherwise, for loops without continue_or_break, create_continue_phis()
always returns an undef operand.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 638cbc21a1 ("aco: handle when ACO adds new continue edges")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2848
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7148>
2020-10-27 19:53:38 +00:00
Dave Airlie fa5acbbcde CI: remove llvmpipe cl flake test
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7328>
2020-10-28 05:18:54 +10:00
Jordan Justen 8d03cfae7c anv: Drop warning about gen12 not being supported
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7333>
2020-10-27 11:04:25 -07:00
Icecream95 a1885332d7 panfrost: AFBC compress Z16 depth buffers
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7201>
2020-10-27 17:11:47 +00:00
Icecream95 388c99b029 panfrost: Z16 depth buffer support
Only for MFBD GPUs as on t720 it causes some dEQP tests to fail.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7201>
2020-10-27 17:11:47 +00:00
Icecream95 4a20ed6b45 panfrost: Move zs format handling code out of the !afbc case
This will allow supporting more AFBC depth/stencil formats without
duplicating the format handling.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7201>
2020-10-27 17:11:47 +00:00
Jason Ekstrand 06d1f7c64b docs: Specify when branch points happen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7149>
2020-10-27 16:32:56 +00:00