Commit Graph

118969 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 02f503ef00 pan/midgard: Convert fragment writeout to proper branches
This eliminates the only use of prepacked_branch, which is a such a
hack anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-31 03:26:24 +00:00
Marek Olšák 84b82f8cd1 winsys/radeon: initialize pte_fragment_size
Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>

Closes: #2179

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-12-30 20:20:59 -05:00
Marek Olšák 5c9dcbea77 Revert "u_vbuf: Regard non-constant vbufs with non-instance elements as free"
This reverts commit c6ef79c488.

It broke torcs.
2019-12-30 18:41:24 -05:00
Alyssa Rosenzweig 3909b16000 panfrost: Respect glPointSize()
We have native support for this somehow. Fixes the mesa demo `points`

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig 8f4b15636b panfrost: Remove MRT indirection in blend shaders
Since we have a separate blend shader for each render target, let's
simplify this structure and reduce the options memory footprint by 88%
or something goofy like that.

Should also enable separate blending per render target.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig 67fe2afa51 panfrost: Implement integer varyings
We need to actually work out the varying format on demand, rather than
assuming rgba32f.

Fixes dEQP-GLES3.functional.fragment_out.basic.int.*

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig 62d056d8e3 panfrost: Disable some CAPs we want lowered
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig 71df7c69bc panfrost: Identify glProvokingVertex flag
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig c17a441666 pan/midgard: Implement flat shading
We need to shuffle around some lowerings but it's just a flag.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig 66c2696fda pan/midgard: Use type-appropriate st_vary
We would like to store (u)ints as well.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig 3996fd7b90 pan/midgard: Promote tilebuffer reads to 32-bit
Fixes (among others)
dEQP-GLES3.functional.fbo.render.shared_colorbuffer_clear.tex2d_rgba16f

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-30 17:11:08 -05:00
Alyssa Rosenzweig ddc5a371b3 glsl: Set .flat for gl_FrontFacing
It is a boolean.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3237>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3237>
2019-12-30 19:54:50 +00:00
Samuel Pitoiset 824bd0830e radv: return the correct pitch for linear mipmaps on GFX10
On GFX9, the pitch of a level is always the pitch of the entire image
but not on GFX10.

This fixes graphics glithes with Halo - The Master Chief Collection.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2188
CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-12-30 14:17:45 +01:00
Yevhenii Kolesnikov b318bc2072 meta: Cleanup function for DrawTex
Buffer object was never freed, causing memory leaks.

Fixes: 76cfe2bc44 ("meta: Don't pollute the buffer object namespace in _mesa_meta_DrawTex")
CC: Ian Romanick <ian.d.romanick@intel.com>

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1390>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1390>
2019-12-30 12:41:52 +02:00
Jan Zielinski 7040d6c197 gallium/gallivm/tgsi: enable tessellation shaders
Tessellation Control and Evaluation shaders are implementing
tessellation and require special handling of their inputs
and outputs.

TCS can write out not only per-vertex, but also per-patch
(per-primitive) attributes and tessellation factor values
that control the tessellator.

TES can read TCS outputs, plus must be feeded with new
system values (tessellation coordinates) that are
outputs of the tessellator fixed function.

TCS can also contain calls to barrier() function (similar
to compute shaders).

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Alok Hota <alok.hota@intel.com>
2019-12-30 11:32:47 +01:00
Dave Airlie 26c5ae80f0 llvmpipe: enable ARB_shader_group_vote.
This just adds the NIR paths for shader group vote.

v2: drop feq for now. (Roland)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3213>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3213>
2019-12-30 05:30:30 +00:00
Bas Nieuwenhuizen 88f567b5ce amd/common: Handle alignment of 96-bit formats.
addrlib doesn't quite do it right, so do it ourselves.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2162
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-12-30 00:02:46 +01:00
Caio Marcelo de Oliveira Filho b0203b561c panfrost: Fix Makefile.sources
Add missing `\`.  Fixes Android build.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Fixes: de077c2078 ("panfrost: Remove mali_alt_func")
2019-12-28 12:31:41 -08:00
Eric Engestrom a6873a8df2 mesa: avoid returning a value in a void function
Fixes: 1d1722e910 ("mesa: add EXT_dsa NamedProgram functions")
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-12-28 11:58:37 +00:00
Eric Engestrom dcba7731e6 meson: simplify install_megadrivers.py invocation
Note: `find_program()` needs a shebang on scripts.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-12-27 22:43:34 +00:00
Eric Engestrom ff3a2576a4 nine: fix empty-body-issues
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Fixes: 8d43e2b2de ("meson: add -Werror=empty-body to disallow `if(x);`")
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
2019-12-27 22:09:16 +00:00
Eric Engestrom 51569e525a amd: fix empty-body issues
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Fixes: 8d43e2b2de ("meson: add -Werror=empty-body to disallow `if(x);`")
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
2019-12-27 22:09:00 +00:00
Eric Engestrom 7a4a75a185 u_format: move format tests to util/tests/
Suggested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-12-27 21:04:44 +00:00
Eric Engestrom da9937d09b util/format: add trivial srgb<->linear conversion test
This would've caught 8829f9ccb0 ("u_format: add ETC2 to
util_format_srgb/util_format_linear").

Suggested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-12-27 21:04:43 +00:00
Eric Engestrom 8f4d4c808b util/format: add PIPE_FORMAT_ASTC_*x*x*_SRGB to util_format_{srgb,linear}()
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-12-27 21:04:43 +00:00
Eric Engestrom cc7a64f101 util/format: remove left-over util_format_description_table declaration
Fixes: 3c45c4bc44 ("util: Cope with the fact that formats in u_format.csv are not ordered.")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-12-27 21:04:43 +00:00
Dave Airlie baa064f0f5 gallivm: fixup const int64 builder.
Pointed out by Ilia.

Fixes: 84ba008774 (gallivm: add 64-bit const int creator.)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-28 05:44:31 +10:00
Marek Olšák e79f55ff86 radeonsi/gfx10: improve performance for TES using PrimID but not exporting it
This field is really for the primitive export to the pixel shader.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
2019-12-27 13:50:57 -05:00
Marek Olšák aa3df12fc2 radeonsi/gfx10: enable NGG passthrough for eligible shaders
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
2019-12-27 13:50:57 -05:00
Marek Olšák 17164d4e27 radeonsi/gfx10: don't declare any LDS for NGG if it's not used
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
2019-12-27 13:50:57 -05:00
Alyssa Rosenzweig 65e5c1942a panfrost: Remove 32-bit next_job path
It has been unused for a while; let's just remove the abstraction.
Technically the hardware does support 32-bit job descriptors, but we
don't and we can't keep them from breaking so let's not pretend they
work.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
2019-12-27 13:03:22 -05:00
Alyssa Rosenzweig 95ba661b49 panfrost; Update comment about work/uniform_count
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 13:01:17 -05:00
Alyssa Rosenzweig de077c2078 panfrost: Remove mali_alt_func
There's only one way to encode comparison functions in the command
stream, not two. It's just that the semantics for texture comparisons
are flipped from the semantics of stencil comparison. We can factor out
that flip to common Panfrost code, rather than tying it to a second
Gallium routine.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 12:58:00 -05:00
Alyssa Rosenzweig bc1fc29e21 panfrost: Add missing #include in common header
Fixes way back when...

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 12:58:00 -05:00
Alyssa Rosenzweig 330e9b154e panfrost: Add pan_attributes.c to Android.mk
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 31305e1b28 ("panfrost: Move instancing routines to encoder/")
2019-12-27 12:58:00 -05:00
Alyssa Rosenzweig 5fe58271b2 panfrost: Implement remaining texture wrap modes
Somehow we have native hardware for all of these. Suspected by staring
at the bit pattern; confirmed by poking in various texture wrap modes
into the textures mesa demo and seeing what happens.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 12:58:00 -05:00
Alyssa Rosenzweig 4ccd42e0bc panfrost: Inline away MALI_NEGATIVE
It's an awfully fancy way to add one...

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 12:16:09 -05:00
Alyssa Rosenzweig 76519b216b panfrost: Remove MALI_ATTR_INTERNAL
It's a relic from before we understood the varying builtins. It should
never actually come up if the builtins are decoded correctly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 12:11:37 -05:00
Alyssa Rosenzweig 5f8376101d panfrost: Update information on fixed attributes/varyings
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 12:10:24 -05:00
Alyssa Rosenzweig 9bde6e551d panfrost: Remove MALI_SPECIAL_ATTRIBUTE_BASE defines
These are conventions by the blob (a convention we happent to follow).
They are not at all intrinsic to the hardware, so now that the
convention is implemented within the Midgard stack, these defines are
wholly unused. Remove them.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-12-27 12:08:45 -05:00
Alyssa Rosenzweig 8c188722d9 pan/midgard: Fix minor typo
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
2019-12-27 12:07:45 -05:00
Mauro Rossi 563bd61fee android: radv: build radv_shader_args.c
Updates radv Makefile.sources and fixes the following building error:

external/mesa/src/amd/vulkan/radv_shader.c:1122:
error: undefined reference to 'radv_declare_shader_args'

Fixes: 3b14336 ("ac/nir, radv, radeonsi: Switch to using ac_shader_args")
Fixes: 66c703b ("radv: Move argument declaration out of nir_to_llvm")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-12-27 09:20:54 +01:00
Mauro Rossi 962b70c259 android: radeonsi,ac: fix building error due to ac changes
Updates amd Makefile.sources and fixes the following building errors:

external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:338: error: undefined reference to 'ac_add_arg'
external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:340: error: undefined reference to 'ac_add_arg'
external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:341: error: undefined reference to 'ac_add_arg'
external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:342: error: undefined reference to 'ac_add_arg'

Fixes: 9885af3 ("ac: Add a shared interface between radv, radeonsi, LLVM and ACO")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-12-27 09:20:49 +01:00
Mauro Rossi ad1c65e322 android: radv: fix vk_format_table.c generated source build
RADV Android build rules are now getting the wrong vk_format.h
from src/vulkan/util include, the simplest way to fix is to add
src/amd/vulkan include prior to src/vulkan/util include

Fixes the following building errors:

out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_radv_common_intermediates/vk_format_table.c:39:4:
 error: use of undeclared identifier 'VK_FORMAT_LAYOUT_PLAIN'
...
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_radv_common_intermediates/vk_format_table.c:131:8:
error: use of undeclared identifier 'VK_FORMAT_TYPE_UNSIGNED'; did you mean 'UTIL_FORMAT_TYPE_UNSIGNED'?
      {VK_FORMAT_TYPE_UNSIGNED, true, false, false, 4, 0},      /* x = a */
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Fixes: 3a28281 ("util: Add a mapping from VkFormat to PIPE_FORMAT.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-12-27 09:20:44 +01:00
Mauro Rossi 13ef793770 android: util: Add a mapping from VkFormat to PIPE_FORMAT.
Updates Makefile.sources and fixes the following building error:

In file included from external/mesa/src/vulkan/util/vk_format.c:24:
In file included from external/mesa/src/vulkan/util/vk_format.h:28:
external/mesa/src/util/format/u_format.h:33:10: fatal error: 'pipe/p_format.h' file not found
#include "pipe/p_format.h"
         ^~~~~~~~~~~~~~~~~
1 error generated.

Fixes: 3a28281 ("util: Add a mapping from VkFormat to PIPE_FORMAT.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-12-27 09:20:40 +01:00
Mauro Rossi 200be80858 android: nir: add a load/store vectorization pass
Fixes the following aco building error:

external/mesa/src/amd/compiler/aco_instruction_selection_setup.cpp:846:
error: undefined reference to 'nir_opt_load_store_vectorize'

Fixes: ce9205c ("nir: add a load/store vectorization pass")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-12-27 09:20:35 +01:00
Dave Airlie c8042c289e llvmpipe: add debug option to enable OpenCL support.
LP_DEBUG=cl will enable CL support for now.

Acked-by: Roland Scheidegger <sroland@vmware.com>
2019-12-27 13:26:33 +10:00
Dave Airlie 29784bb49c gallivm/nir: add vec8/16 support
Acked-by: Roland Scheidegger <sroland@vmware.com>
2019-12-27 13:26:33 +10:00
Dave Airlie 5be1ea7d79 gallivm/nir: lower packing
This fixes some CL upsample tests, which lower into packing that needs
lowering.

Acked-by: Roland Scheidegger <sroland@vmware.com>
2019-12-27 13:26:33 +10:00
Dave Airlie 31e0e8a51b llvmpipe: lower hadd/add_sat
Fixes some CL piglits.

Acked-by: Roland Scheidegger <sroland@vmware.com>
2019-12-27 13:26:33 +10:00