Daniel Schürmann
73905c4d01
nir/opt_shrink_vectors: don't shrink vectors used by intrinsics
...
Store intrinsics shrink the sources by creating a new vecN.
Other intrinsics cannot shrink their sources.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Daniel Schürmann
ece99eb69f
nir/lower_alu_to_scalar: don't skip gaps in write_mask
...
Otherwise, this may lead to segmentation faults.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411 >
2021-07-26 09:24:37 +00:00
Juan A. Suarez Romero
4eb0475b5a
v3dv: assert job->cmd_buffer is valid
...
In v3dv_write_uniforms_wg_offsets() function, the job's cmd_buffer is a
valid command buffer, so there is no reason to check if its NULL or not.
This fixes CID#1487441 ("Dereference after null check") error.
v1:
- `job->cmd_buffer` is the same as `cmd_buffer` (Alejandro)
v2:
- Use `cmd_buffer` instead of `job->cmd_buffer` (Iago)
Fixes: 31a786c80a
("v3dv: handle QUNIFORM_FB_LAYERS")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11999 >
2021-07-26 07:28:37 +00:00
Lionel Landwerlin
8a99873712
isl: fix mapping of format->stringname
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ed6e586562
("intel: properly constify isl_format_layouts")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5110
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12051 >
2021-07-26 07:16:28 +00:00
Shmerl
8aa6002943
vulkan/overlay: don't display histogram and range for device and format
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4320
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12056 >
2021-07-25 21:29:31 +00:00
Dave Airlie
2138d1b9e6
teximage: return correct desktop GL error for compressedteximage
...
For GL4.6 the spec says to return GL_INVALID_OPERATION for this.
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12032 >
2021-07-26 05:59:18 +10:00
Alyssa Rosenzweig
9cc0834ca6
asahi: Generalize src_offset for non-4byte formats
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 18:00:39 -04:00
Alyssa Rosenzweig
a3e0b3b912
asahi: Add integers to agx_vertex_formats
...
Handles all the easy cases.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 18:00:07 -04:00
Alyssa Rosenzweig
3cd6f62388
agx: Shift vertex buffer stride in the compiler
...
Required to support non-32-bit vertex formats efficiently.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:57:19 -04:00
Alyssa Rosenzweig
c7ba0fb04d
agx: Add agx_format_shift routine
...
Required to calculate alignments for vertex buffers correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:45:38 -04:00
Alyssa Rosenzweig
b329fe8264
asahi: Pass instance_divisor to the compiler
...
Passes dEQP-GLES3.functional.instanced.*
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:26:02 -04:00
Alyssa Rosenzweig
96c98e0d25
agx: Define p_extract for type converts
...
Useful for grabbing the high 32-bit word of a 64-bit value.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:25:40 -04:00
Alyssa Rosenzweig
3417ecb4d7
agx: Implement instanced arrays
...
Divide by instance divisor if needed. Same strategy as ACO.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:25:11 -04:00
Alyssa Rosenzweig
538e3a3100
agx: Include divisors in the vertex shader key
...
Needed to lower the divisions.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:24:47 -04:00
Alyssa Rosenzweig
0c353d47be
agx: Add udiv-by-constant routine
...
Uses the ridiculousfish algorithm, will be used to lower instanced
arrays into something efficient.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:24:02 -04:00
Alyssa Rosenzweig
50a4c993fd
agx: Add agx_ushr helper
...
Syntax sugar for the underlying bitfield manipulation instruction.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 17:23:42 -04:00
Alyssa Rosenzweig
3c1f754a71
agx: Handle load_instance_id
...
Preloaded into r6, as predicted.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:12:18 -04:00
Alyssa Rosenzweig
3f5eebe5e6
agx: Drop dated /* TODO: RA */
...
We skip over vertex ID in RA now, it's fine.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:12:03 -04:00
Alyssa Rosenzweig
1b1dd2e522
asahi: Enable instancing
...
Passes dEQP-GLES3.functional.draw.draw_arrays_instanced.lines.single_attribute
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:04:25 -04:00
Alyssa Rosenzweig
465224379c
agx: Plug memory leak in register allocator
...
Fixes: 85e18deb18
("agx: Assign registers locally")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reported-by: Coverity
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 15:00:22 -04:00
Alyssa Rosenzweig
7848100f27
agx: Use consistent ncomps
...
Fixes register allocation failure in:
dEQP-GLES3.functional.ubo.single_basic_array.shared.row_major_mat4_fragment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:55:16 -04:00
Alyssa Rosenzweig
cce1a2fc19
agx: Dump register file when failing to allocate
...
Usually shows a bug.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:54:34 -04:00
Alyssa Rosenzweig
5fb9159eb9
agx: Fix mismatched units in load_ubo
...
Fixes assertion failure in
dEQP-GLES3.functional.ubo.single_basic_type.shared.highp_float_fragment
Assertion failed: ((value & 1) == 0), function agx_print_sized, file
../src/asahi/compiler/agx_print.c, line 39.
Fixes: 033d4d09fc
("agx: Implement load_ubo/kernel_input")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:39:44 -04:00
Alyssa Rosenzweig
5deb7c26d6
agx: Don't set helper invocation kill bit
...
In the future we'll need data flow analysis similar to what we do in
panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 14:27:35 -04:00
Alyssa Rosenzweig
8aa5ba4012
asahi: Assert texture layer is nonzero
...
The app shouldn't do funny things with layers... currently unsupported,
one issue at a time...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
41417a9949
asahi: Require tiling for cube maps
...
Makes my dEQP happy.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
3ecc14a747
asahi: Simplify can_tile type signature
...
dev parameter inherited from panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
904ce66433
asahi: Allow tiled cube maps
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
7b4eb731f1
asahi: Use agx_rsrc_offset for linear transfer_map
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
695fe3897d
asahi: Implement cube map tiling transfers
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
143783538a
asahi: Calculate resource offsets for cube maps
...
Needed to transfer.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
be3d4ce8c4
asahi: Calculate cube map stride
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
db6d5a0860
asahi: Set texture dimension field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
1671022bf2
asahi: Identify texture dimension field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
23f5ad668f
asahi: Fix sampler filtering flag
...
Typo in the XML. Fixes broken filtering. Still chasing an off-by-one.
Fixes: cad54e2721
("asahi: Add command buffer XML definitions")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Alyssa Rosenzweig
f376a90d21
asahi: Identify texture address field
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12053 >
2021-07-24 13:56:04 -04:00
Enrico Galli
73262d4bd4
microsoft/spirv_to_dxil: Adding continue opt pass to fix DXIL loop gen
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12048 >
2021-07-24 14:47:41 +00:00
Chia-I Wu
bd9550b026
vulkan/wsi: replace prime_blit_buffer by a bool
...
venus only needs to know if a WSI image is a prime blit source. In an
upcoming swapchain image rework, the prime blit destination is unknown
when the WSI image is created. Replace prime_blit_buffer by a bool.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12046 >
2021-07-23 15:31:20 -07:00
Georg Lehmann
890b1c0f2a
aco: Use cpp_msvc_compat_args.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11610 >
2021-07-23 20:28:58 +00:00
Georg Lehmann
c6bcafcc07
radv: Use c_msvc_compat_args.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11610 >
2021-07-23 20:28:58 +00:00
Alyssa Rosenzweig
b17f90ab4a
panvk: Fix sampler filter modes on Bifrost
...
The logic was incorrectly inverted, although it is correct for Midgard
and in OpenGL.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
058d4d3b3e
panfrost: Make panfrost_batch_get_bifrost_tiler per-gen
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
6f0c235da1
panfrost: Move init_batch to GenXML vtbl
...
Secretly depends on GenXML.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
3d0f6592b2
panfrost: Use PAN_ARCH for the rest of pan_cmdstream
...
Mostly trivial substitutions to get rid of dev->arch, dev->quirks, and
pan_is_bifrost()
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
d7a0720ef1
panfrost: Add a concatenation macro for genxml
...
This is safer, since it allows the thing being concatenated to itself be
an expande macro, which we'll use as a stopgap to construct tiler jobs
with unified code. It's also a bit more readable, I think.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
f4b0d17395
panfrost: #ifdef fragment RSD packing
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
a222ead4de
panfrost: #ifdef pan_merge_empty_fs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
433ca313ad
panfrost: Share blend code across architectures
...
Midgard code is basically a subset of the Bifrost/Valhall code.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
84c33f188f
panfrost: Share sampler code across archs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00
Alyssa Rosenzweig
c80732eab3
panfrost: Match sampler "nearest" names
...
Midgard calls this nearest but Bifrost calls it point sample. Of the
two, nearest is the standard term, so change the Bifrost XML to use that
name. That way we can share more code constructing samplers.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851 >
2021-07-23 20:12:18 +00:00