Commit Graph

127258 Commits

Author SHA1 Message Date
Jesse Natalie 9e9d28007a mesa: Move ATTRIBUTE_NOINLINE for glsl_to_tgsi_visitor::visit_expression for MSVC
Fixes 65d7172d ("util/macros: Add ATTRIBUTE_NOINLINE definition for MSVC")

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6351>
2020-08-17 11:30:28 -07:00
Daniel Stone c60cea0daa glsl/test: Don't run whitespace tests in parallel
For some unfathomable reason, three out of these four tests often time
out when running within CI. On the assumption that there is some
parallelisation badness happening rather than the non-UNIX tests
entering infinite loops, try just marking them as serial-only.

This should have a negligible impact on runtime since they are quick to
execute.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6301>
2020-08-17 17:44:26 +00:00
Adam Jackson aeba69deaa drisw: Port the MIT-SHM check to XCB
The old version isn't thread-safe, and xlib makes it unreasonably
difficult to write thread-safely.

Fixes: mesa/mesa#3398
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6294>
2020-08-17 16:17:50 +00:00
Jesse Natalie ee905aa3a0 nir/vtn: CL SPIR-V callers should specify address modes
Instead of inferring the address mode from the environment, allows
callers to override to suit their needs.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6330>
2020-08-17 14:36:18 +00:00
Jason Ekstrand a097bf160a nir/builder: Make nir_get_ptr_bitsize take a nir_shader
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6330>
2020-08-17 14:36:18 +00:00
Jesse Natalie 627c8e1640 nir: Add nir_address_format_32bit_index_offset_pack64
This new address mode is supported by nir_lower_explicit_io

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6330>
2020-08-17 14:36:18 +00:00
Jesse Natalie 113458d372 nir: Add nir_address_format_32bit_offset_as_64bit
This new address mode is supported by nir_lower_explicit_io

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6330>
2020-08-17 14:36:18 +00:00
Jesse Natalie a1ed83fddd nir: Optimize mask+downcast to just downcast
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6330>
2020-08-17 14:36:18 +00:00
Jesse Natalie fd9b33d516 nir: Fix serialize/deserialize of void samplers/images
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6222>
2020-08-17 13:10:19 +00:00
Jesse Natalie c17b58a9e6 glsl: Add 'bare' shadow sampler type
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6222>
2020-08-17 13:10:19 +00:00
Gert Wollny 418c4c0d7d compiler/nir: extend lower_fragcoord_wtrans to support VARYING_SLOT_POS
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6220>
2020-08-17 12:38:05 +00:00
Gert Wollny 7aaddf1a34 compiler/nir: rewrite lower_fragcoord_wtrans to use nir_lower_instructions
This compacts the code and makes it easier to extend.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6220>
2020-08-17 12:38:05 +00:00
Tomeu Vizoso c9f4b14ac6 Revert "CI: temp disable t720/t760 jobs."
There was an unresponsive server in Collabora's LAVA lab that has been
rebooted. Everything seems to be fine now.

This reverts commit f1001a3827.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6342>
2020-08-17 12:18:23 +00:00
Karol Herbst d79c946fb3 nv50/ir/nir: rework indirect function_temp handling
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6338>
2020-08-17 12:05:45 +00:00
Alyssa Rosenzweig fd265bb4f1 panfrost: Update CI expectations
The GenXML approach is more stable, so somehow some failing tests
disappeared.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 7a13351234 panfrost: Drop union mali_attr
Now replaced by the XML translation. I left the comment explaining
instancing since this is still very good information about how to
calculate these fields.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 4e3fe54e2e panfrost: Drop hand-rolled pandecode for attribute buffers
Sadly, we lose some of the validation, but indeed, much of the
validation has turend out to be wrong after enough development so... meh

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig ec58cda5da panfrost: Use packs for varying buffers
In addition to better aesthetics, this automatically fixed multiple
instances of accidental CPU readback of GPU buffers -- in a hot path,
too!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 9732b64862 panfrost: Remove mali_attr_meta
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig eb2762a837 pan/bit: Use packs for Bifrost unit tests
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 7ef205dabd panfrost: Use MALI_ATTRIBUTE_LENGTH
Removes an unwanted reference to mali_attr_meta.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 59fa26902d panfrost: Use pack for general varying
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 6c850637f5 panfrost: Use pack for XFB varying
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 40b4ee9426 panfrost: Factor out general varying case
To avoid hard-to-follow control flow now that we return void.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig b805cf9b1f panfrost: Pass varying descriptors by reference
Instead of returning by value, as a stepping stone to packing directly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig d5a264facf panfrost: Reword comment
Avoid referencing data structures that no longer exist.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 44397c580c panfrost: Use packs for vertex built-ins
These probably need a bigger cleanup at some point but let's handle one
thing at a time.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig e646c861fc panfrost: Use packs for vertex attribute buffers
Eliminates messy staging, I think.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig c9bb5dc911 panfrost: Inline panfrost_vertex_instanced
We'd like to have attribute code in one place together so we can
refactor effectively; this routine as-is wouldn't fit perfectly outside
Gallium anyway so let's do the simple thing.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig e9dc225122 panfrost: Hoist instance_shift/instance_odd fetch
We'll want to pass it as an argument shortly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 27f8b879cc panfrost: Use packs for attributes
Now that state is grouped, this is natural.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 6caf789c07 panfrost: Move attr_meta emission to the draw routine
It's unfortunate that we can't do more at CSO time, but actually all we
really need is the format after all, and this lets us group the state.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 8236fa3ff1 panfrost: Make attribute-buffer map explicit
This helps decouple the attribute and attribute buffer emission.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 9cc81ea0c2 panfrost: Simplify offset fixup proof
No need to put strides and such into it at all.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 4fc90f7c3c panfrost: Use better packs for blits
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 3e7fd2a034 panfrost: Add XML for attribute buffers
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 76de3e691c panfrost: Merge attribute packing routines
In preparation for streamlining the packing, we need related code in one
place.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 2c8a722b85 panfrost: XMLify attributes
To keep review manageable, this only ports over pandecode and blitting.
The main uses for vertex data and varying linkage will come next, as
they touch considerably more code.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig cdc3276317 panfrost: XMLify mali_channel
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig 668ec24bfd panfrost: Squash 22-bit format field in attr_meta
This is an intermediate step to support v7 style formats. Now we don't
see the mali_format alone, instead together with the swizzle (and sRGB
flag, unused for attributes of course).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig c5f18ce144 panfrost: Drop NXR format
It's not clear this was ever exposed under any GL/DX/CL/VK/... extension
whatsoever...

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Alyssa Rosenzweig e03622e50f panfrost: Set STRIDE_4BYTE_ALIGNED_ONLY
It isn't clear to me why, but this breaks in some cases (such as some
dEQP cases where the blob does a translate too).

This reverts commit 9f2997dad0.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
2020-08-17 11:43:52 +00:00
Louis-Francis Ratté-Boulianne 350dd2a36d pipebuffer: Remove unused buffer event in slab bufmgr
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6225>
2020-08-17 11:24:49 +00:00
Marek Olšák 8a012f429d nir: handle load_input_vertex in nir_get_io_offset_src
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6328>
2020-08-17 11:06:49 +00:00
Marek Olšák 83953f9d4d nir: remove nir_strip stub declaration
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6328>
2020-08-17 11:06:49 +00:00
Marek Olšák f3a9781ee1 compiler: add glsl_print_type
Move it from the glsl compiler. For debugging.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6328>
2020-08-17 11:06:49 +00:00
Pierre-Eric Pelloux-Prayer b7c04b1790 ac/llvm: handle static/shared llvm init separately
Having a single init function works as expected for shared llvm, but
when using a static llvm only one llvm will get initialized.

This commit introduces 2 separate init function:
- shared llvm = single public init function
- static llvm = one init function for each module using llvm

Fixes: 50d20dc055 ("ac/llvm: export ac_init_llvm_once in targets")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3376
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6253>
2020-08-17 10:47:41 +00:00
Louis-Francis Ratté-Boulianne 916110e17f st/mesa: Enable clip planes lowering for geometry shaders
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6218>
2020-08-17 10:10:07 +00:00
Louis-Francis Ratté-Boulianne 584f27326c st/mesa: factor ucp-lowering logic into helper
This makes the next step easier to follow.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6218>
2020-08-17 10:10:07 +00:00
BillKristiansen ff4c991fd1 compiler/glsl: Initialize local variable to zero to fix MSVC RTC error
Without this, we get a run-time error about using an uninitialized
variable.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6221>
2020-08-17 09:31:37 +00:00