Alyssa Rosenzweig
1b86e0927d
panfrost: Handle RGB16F colour clear
...
We don't handle this format yet, but we will soon, and the abort in
pan_pack_color is possible even without exposing the format... Handling
this gracefully might not be required by the spec but let's not crash.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2020-01-02 15:20:55 -05:00
Tomeu Vizoso
829f338a59
panfrost: Store internal format
...
It's needed by u_transfer_helper to know when the depth+stencil buffer
has been split.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2020-01-02 12:41:17 -05:00
Tomeu Vizoso
14bc4c7cce
panfrost: Map with size of first layer for 3D textures
...
As that's what Gallium expects in transfer.layer_stride.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2020-01-02 12:41:15 -05:00
Tomeu Vizoso
ed3eede296
panfrost: Dynamically allocate array of texture pointers
...
With 3D textures we can have lots of layers, so better allocate it
dynamically at runtime.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2020-01-02 12:41:02 -05:00
Bas Nieuwenhuizen
c1a1a86658
meson: Enable -Werror=int-conversion.
...
I think implicit conversions here are almost always wrong:
1) wrong argument position ptr vs. int
2) will often have issues with 32-bit platforms.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2570 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2570 >
2020-01-02 11:47:02 +00:00
Bas Nieuwenhuizen
b72182fcfa
turnip: Use VK_NULL_HANDLE instead of NULL.
...
Only occurrence of implicitly converting pointer->int.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2570 >
2020-01-02 11:47:02 +00:00
Bas Nieuwenhuizen
973181c06c
amd/common: Always initialize gfx9 mipmap offset/pitch.
...
The WSI expects pitch to be meaningful even for tiled
textures.
(It is used for the pitch in modesetting and X11)
Fixes: 824bd0830e "radv: return the correct pitch for linear mipmaps on GFX10"
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2301
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2304
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3245 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3245 >
2020-01-02 11:25:51 +00:00
Bas Nieuwenhuizen
59c4fb9d72
nir: print non-uniform tex fields.
...
To ease debugging in the future.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3246 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3246 >
2020-01-02 11:42:33 +01:00
Bas Nieuwenhuizen
69bdc1c5fc
nir: Add clone/hash/serialize support for non-uniform tex instructions.
...
These were missed when the fields got added. Added it everywhere where
texture_index got used and it made sense.
Found this in "The Surge 2", where the inliner does not copy the fields,
resulting in corruption and hangs.
Fixes: 3bd5457641 "nir: Add a lowering pass for non-uniform resource access"
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1203
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3246 >
2020-01-02 11:41:33 +01:00
Afonso Bordado
525cbe85ef
pan/midgard: Optimize branches with inverted arguments
...
Remove the invert on arguments to branches, and invert the branch
condition instead. This saves one instruction per inverted argument.
Closes #2088
Signed-off-by: Afonso Bordado <afonsobordado@az8.co >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2019-12-31 20:01:16 +00:00
Afonso Bordado
0e83688f47
pan/midgard: Move midgard_is_branch_unit to helpers
...
Signed-off-by: Afonso Bordado <afonsobordado@az8.co >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2019-12-31 20:01:12 +00:00
Marek Vasut
5e9106f7af
etnaviv: Do not filter out PIPE_FORMAT_S8_UINT_Z24_UNORM on pre-HALTI2
...
The format PIPE_FORMAT_S8_UINT_Z24_UNORM is supported even on pre-HALTI
hardware like GCnano. Do not report it as unsupported format.
This fixes the following dEQP on GCnano:
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.depth_stencil_unsigned_int_24_8
Fixes: 64c7cdcae5 ("etnaviv: add missing formats")
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3200 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3200 >
2019-12-31 15:12:49 +00:00
Marek Vasut
a812cb57e5
etnaviv: Report correct number of vertex buffers
...
The GCnano has only 4 vertex buffers instead of 16. This information
can be extracted from the GPU status registers and is already stored
in screen->specs.stream_count. Use PIPE_CAP_MAX_VERTEX_BUFFERS to
report this information and permit u_vbuf to reorganize the shaders
to fit.
This fixes the following dEQP on GCnano:
dEQP-GLES2.functional.shaders.conversions.vector_combine.float_float_float_float_to_vec4_vertex
This fixes all the other dEQP-GLES2.functional.shaders.conversions.*
which used to fail on GCnano.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3241 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3241 >
2019-12-31 14:55:04 +00:00
Timur Kristóf
11e62a9734
aco: Fix uniform i2i64.
...
Fixes 240 failing test cases in dEQP-VK.spirv_assembly which
were failing due to a bad s_ashr_i32 instruction. This commit
fixes the instruction format along with the definitions of the
instruction.
Fixes: 11f43caaec
Cc: 19.3 <mesa-stable@lists.freedesktop.org >
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
2019-12-31 14:22:31 +01:00
Robert Foss
182679e7c5
android: Fix u_format_table.c being generated twice
...
Two competing rules for defining u_format_table.c exists,
which is an error.
Additionally the more general rule lacks the inclusion of
format/u_format.csv.
Fixes: 882ca6dfb0 ("util: Move gallium's PIPE_FORMAT utils to /util/format/")
Signed-off-by: Robert Foss <robert.foss@collabora.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
2019-12-31 14:06:02 +01:00
Alyssa Rosenzweig
a0d65d860d
pan/midgard: Remove prepacked_branch
...
It's an ugly hack that's no longer used.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2019-12-31 03:26:24 +00:00
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