Dave Airlie
690238ff56
gallivm/nir: don't access stream var outside bounds
...
Since we allocate only enough for streams we see, don't access
out of bounds when streams are given
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555 >
2020-07-08 06:06:05 +10:00
Dave Airlie
21b903dd7d
gallivm/gs_iface: pass stream into end primitive interface.
...
This is just an API change for now
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555 >
2020-07-08 06:06:05 +10:00
Dave Airlie
87a388fb29
draw/gs: only allocate memory for streams needed.
...
This just allocates the sizeing for streams that are needed.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555 >
2020-07-08 06:06:05 +10:00
Dave Airlie
903b5814b5
gallivm/draw/gs: pass vertex stream count into shader build
...
The shader builder can avoid iterations using this info.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555 >
2020-07-08 06:06:05 +10:00
Dave Airlie
99ae39f76c
draw/gs: fix up current verts in output fetching.
...
This was wrong since I added multi-stream support in
draw/gs: track emitted prims + verts per stream
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555 >
2020-07-08 06:06:05 +10:00
Dave Airlie
7d82bb0e41
draw: emit so primitives before ending empty pipeline.
...
There may be non-stream 0 emitted primitives that have to be processed.
Fixes:
KHR-GL42.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream
KHR-GL42.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555 >
2020-07-08 06:06:04 +10:00
Dave Airlie
59c8fff7e4
gallivm/nir: call end prim at end on all GS streams.
...
Fixes: KHR-GL45.transform_feedback.draw_xfb_stream_test
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555 >
2020-07-08 06:06:04 +10:00
Neil Roberts
b921d17aa6
broadcom/qpu: set VC5_QPU_RADDR_A out of the switch at _pack_branch
...
Detected after mesa added Wimplicit-fallthrough project wide.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5769 >
2020-07-07 21:40:16 +02:00
Rhys Perry
ec4d3def16
aco: use VOP2 version of v_mbcnt_hi_u32_b32 on GFX6/7
...
fossil-db (Pitcairn):
Totals from 2172 (1.58% of 137414) affected shaders:
CodeSize: 7109080 -> 7100100 (-0.13%)
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/5623 >
2020-07-07 18:48:15 +00:00
Eric Anholt
b7418270c3
util: Share a single function pointer for the 4-byte rgba unpack function.
...
Everyone wants the same behavior, and this helps shrink the size of our
format description tables.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
a8e7004dc5
util: Remove the stub pack/unpack functions for YUV formats.
...
If we can't pack/unpack them, the field is supposed to be NULL.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
abd9aa2c77
llvmpipe: Generalize "could llvmpipe fetch this format" check in unit testing.
...
This set of checks matched the "access" list in u_format_table.py that
controls initializing this this function pointer, so just use the function
pointer.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
2da4badfe3
util: Use designated initializers to clean up the format tables' pack/unpack.
...
The generated .c had a bunch of NULLs and notes for what kind of function
was being skipped, when we can just skip them by filling in the fields
with names.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
e7010eeff0
util: Merge util_format_read_4* functions.
...
Everyone wants the same thing: unpack 4-bytes-per-channel data based on the
base type of the format.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
2f4d557a56
util: Merge util_format_write_4* functions.
...
Everyone wants the same thing: pack 4-bytes-per-channel data based on the
base type of the format.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
c3d0500389
svga: Reuse util_format_unpack_rgba().
...
This assumes that pipe_color_union is a vec4, but that seems safe.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
725b27135b
gallium/util: Move the Z/S handling to the outside of get_tile().
...
This lets us drop the special case for S8_UINT, and makes our read_4 path
just like other callers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
a2b74a5d8a
gallium/util: Clean up the Z/S tile write path.
...
The switch statement is silly, we have a helper to detect all of Z/S.
And, take the time explain why all of Z/S tile writing is unimplemented.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
019a030907
gallium/util: Fix location of the comment about S8_UINT handling.
...
I clearly wrote it in the wrong place in "softpipe: Refactor
pipe_get/put_tile_rgba_* paths."
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
377026e3ad
etnaviv: Use the util_pack_color_union() helper.
...
This snuck in since I cleaned up the other instances of it.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
32bf7229e5
util: Remove unused util_format_planar_is_supported().
...
Nothing calls it, and it should have been left in gallium, anyway.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
f6f1f8e3f6
softpipe: Clean up softpipe's SSBO load/store interpreting instructions.
...
There's no need to go to all this trouble of setting up 16-byte vectors to
pack/unpack our 32-bit values, memcpy is really good at moving 4 bytes
around.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
18cb8f2322
util: Mark util_format_description() as a const function.
...
It will return the same table every time with no other side effects, so we
want it to be CSEed. Saves 3.5k on my aarch64 GL drivers, almost 9k on
turnip, but weirdly increases my x86 GL driver collection by ~3k.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Daniel Schürmann
9300a14ffb
nir: refactor nir_can_move_instr
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5622 >
2020-07-07 19:24:28 +02:00
Daniel Schürmann
09d0e06c5c
nir: also move vecN in case of nir_move_copies
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5622 >
2020-07-07 19:24:28 +02:00
Jonathan Marek
14c554a391
turnip: use global bo for clear blit shaders
...
Fill the global bo will all possible shaders for 3D clear/blit. Note the
global bo size is still <4k (so this doesn't cost any extra memory), this
saves having to allocate shaders in sub_cs everytime the 3D path is used.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5776 >
2020-07-07 16:40:45 +00:00
Daniel Schürmann
10020b8d17
aco: remove superflous (bool & exec) if the result comes from VOPC
...
This works in cases where the VOPC instruction was executed with
the same exec mask.
Totals from affected shaders: (VEGA)
SGPRS: 1342204 -> 1342164 (-0.00 %)
VGPRS: 877220 -> 877220 (0.00 %)
Spilled SGPRs: 157800 -> 157800 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 118083212 -> 118021748 (-0.05 %) bytes
LDS: 26 -> 26 (0.00 %) blocks
Max Waves: 144024 -> 144024 (0.00 %)
Reviewed-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/5563 >
2020-07-07 17:35:01 +02:00
Rhys Perry
e4654a35b0
radv: enable zerovram for Quantic Dream games
...
Fixes various artifacts with Detroit: Become Human. This assumes other
Vulkan games using the same engine could have the same issues.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Cc: <mesa-stable@lists.freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5710 >
2020-07-07 14:44:35 +00:00
Tomeu Vizoso
dcd171f5e9
gitlab-ci: More stable URL for kernel and ramdisk artifacts, for LAVA
...
Place the kernel and ramdisk into a place in the file server so the URL
will only change when the contents also change.
Also put the Mesa build into a separate tarball so the ramdisk's
contents don't change every build.
With proper caching in place, all devices in the same farm need only to
download the mesa tarball once, saving time.
As we switch to MinIO for making kernels and rootfs available to LAVA
devices, we can stop using Docker to distribute them.
Instead, build when needed in separate jobs that push directly to MinIO,
from where LAVA devices can download them.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5515 >
2020-07-07 11:52:30 +00:00
Tomeu Vizoso
bf3d4b1add
gitlab-ci: Build kernel drivers for a few ethernet USB dongles
...
So LAVA devices can download traces and upload test results.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5515 >
2020-07-07 11:52:30 +00:00
Karol Herbst
bbf2db20fe
nv50/ir/nir: fix cache mode conversion
...
The nir access qualifier is actually a bitfield, so we need to read out
like one.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747 >
2020-07-07 11:32:15 +00:00
Karol Herbst
31e344799a
gv100/ir: fix coherent and volatile memory access
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747 >
2020-07-07 11:32:14 +00:00
Karol Herbst
a43eb650de
gv100/ir: implement sample shading
...
Fixes sample shading tests in the Khronos OpenGL(ES) CTS
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747 >
2020-07-07 11:32:14 +00:00
Karol Herbst
5786c63be3
nv50/ir/nir: fix interpolation on explicit operations
...
Fixes a bunch of interpolate tests in the aosp GLES CTS
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747 >
2020-07-07 11:32:14 +00:00
Danylo Piliaiev
77844690be
iris: Fix fast-clearing of depth via glClearTex(Sub)Image
...
If we clear depth only texture via glClearTex(Sub)Image it may cause:
../src/intel/blorp/blorp_genX_exec.h:1554: blorp_emit_surface_states: Assertion `params->depth.enabled || params->stencil.enabled' failed.
due to clear_depth_stencil calling blorp_clear_depth_stencil when
depth is already fast-cleared and there is no stencil.
Fixes piglit test: arb_clear_texture-depth
Fixes: 51638cf18a
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5770 >
2020-07-07 11:05:03 +00:00
Erik Faye-Lund
026615c0f9
docs: fixup envvar output
...
Sphinx 2.x has changed how this works, and some of this whitespace now
gets stripped as a result. So let's instead actual whitespace as separate
text-nodes instead.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706 >
2020-07-07 10:22:08 +00:00
Erik Faye-Lund
c8537744bb
docs: use svg for graphviz output
...
This works a lot better on hidpi screens.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706 >
2020-07-07 10:22:08 +00:00
Erik Faye-Lund
892fdde23f
docs: move gallium specific docs into gallium folder
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706 >
2020-07-07 10:22:08 +00:00
Erik Faye-Lund
64a4ba9e1c
docs: add an extension to generate redirects
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706 >
2020-07-07 10:22:08 +00:00
Erik Faye-Lund
ce5a3524fa
docs: clean up gallium index-file
...
This makes the TOC make much more sense.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706 >
2020-07-07 10:22:08 +00:00
Erik Faye-Lund
2f81398187
merge gallium docs into main docs
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706 >
2020-07-07 10:22:08 +00:00
Erik Faye-Lund
cb11900cb6
ci: add graphviz to the .docs-base template
...
The Gallium docs uses graphviz, so let's make sure it's installed first.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5706 >
2020-07-07 10:22:08 +00:00
Connor Abbott
6ff66942d2
freedreno: Sync registers with envytools
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5557 >
2020-07-07 09:51:40 +00:00
Connor Abbott
c1ba7612fb
freedreno: Include adreno_pm4.xml.h before adreno_a6xx.xml.h
...
This matches the XML, and soon adreno_a6xx.xml will start including
types from adreno_pm4.xml.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5557 >
2020-07-07 09:51:40 +00:00
jzielins
53e204dc26
gallium/swr: Fix compilation warnings
...
In some places in SWR cod objects are initialized using
memset/memcpy. This is usually done to enable
allocating those objects in aligned memory.
It generates compilation warnings though,
which are worked around by casting the pointers to void*
before calling memset/memcpy.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5777 >
2020-07-07 09:24:47 +00:00
Connor Abbott
846f4f95dd
freedreno/a6xx: Force gl_Layer to 0 when necessary
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5732 >
2020-07-07 08:10:47 +00:00
Connor Abbott
f69c3849b8
tu: Force gl_Layer to 0 when necessary
...
In particular this will help us implement input attachments correctly
with layered rendering.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5732 >
2020-07-07 08:10:47 +00:00
Connor Abbott
4f91345f49
ir3: Add layer_zero variant bit
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5732 >
2020-07-07 08:10:47 +00:00
Icecream95
ef67218325
pan/decode: Make mapped memory read-only while decoding
...
This will help catch any bugs where descriptors are accidentally
modified.
v2: Use a dynarray of ro memory mappings rather than iterating through
the mmap hash table.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5590 >
2020-07-07 02:29:52 +00:00
Alyssa Rosenzweig
cb5edcd215
panfrost: Expose MSAA 4x
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782 >
2020-07-07 01:13:39 +00:00