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
Dave Airlie
b38879f8c5
vallium: initial import of the vulkan frontend
...
This is the initial import of the vallium frontend for gallium.
This is only good enough to run the triangle and the gears demo
(wrongly) from Sascha demos.
Improvements are mostly on the llvmpipe side after this.
It contains an implementation of the Vulkan API which is mapped
onto the gallium API, and is suitable only for SOFTWARE drivers.
Command buffers are recordred into malloced memory, then later
they are played back against the gallium API. The command buffers
are mostly just Vulkan API marshalling but in some places the information is
processed before being put into the command buffer (renderpass stuff).
Execution happens on a separate "graphics" thread, againt the gallium API.
There is only a single queue which wraps a single gallium context.
Resources are allocated via the new resource/memory APIs.
Shaders are created via the context and bound/unbound in the
second thread.
(No HW for reasons - memory management, sw paths for lots of paths,
pointless CPU side queue)
v2: drop mesa_icd, drop cpp_args, drop extra flags, change meson config (Eric)
v2.1: use meson-gallium job
meson pieces:
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
overall:
Acked-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082 >
2020-08-17 14:31:47 +10:00
Dave Airlie
8004fa9c95
vulkan/wsi: add sw support. (v2)
...
This adds an option to the WSI support for a software path to be
used with the vulkan sw drivers. There is probably some changes
that could be made to improve this and use present, for now
just use put image.
v2: roll out flag across all drivers (Eric)
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082 >
2020-08-17 14:30:50 +10:00
Dave Airlie
5a9eba4acd
util/format: add some ZS helpers for vallium
...
The vallium layer has a requirement to insert and extra the 24-bit
unorm value as a unorm value (not as a float etc). Add helpers
to facilitate that.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082 >
2020-08-17 14:30:50 +10:00
Dave Airlie
3abf548270
gallivm/nir: add load push constant support
...
This convets the push constant load to a ubo load against the 0 constant buffer,
which is where the vallium layer will bind things.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082 >
2020-08-17 14:30:49 +10:00