Erik Faye-Lund
b49cea2e9a
zink: destroy device and instance
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
bc1593a9cd
zink: destroy transfer-helper
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
81be8c7049
zink: free sets and hash-tables in context
...
Up until now, we've simply leaked all of these. Let's try to do better.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
07d5d911dd
zink: dot leak dummy_buffer
...
Fixes: 8736ffae2e
("zink: replace unset buffer with a dummy-buffer")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
a118da0371
zink: do not leak vertex element state
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
f70490bf42
zink: release batch memory
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
5d44a973b5
zink: destroy blitter before destroying batches
...
Destroying the blitter frees samplers, which pushes the sampler-handles
onto the batches' zombie-sampler lists. So if we want to properly clean
these zombie-samplers up, we need to first get them onto the list so
we'll know about them in time.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
820d272a21
zink: factor out zink_batch_release-helper
...
This will be useful for making sure everything has gotten cleaned up
properly.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Erik Faye-Lund
cd7d8eade2
zink: do not open-code CALLOC_STRUCT
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8099 >
2021-01-05 15:36:35 +00:00
Mike Blumenkrantz
5342dbe96d
features: mark off GL 4.1 for zink
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8329 >
2021-01-05 08:58:28 -05:00
Mike Blumenkrantz
c211f466cc
zink: GLSL 410
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8329 >
2021-01-05 08:58:27 -05:00
Mike Blumenkrantz
3f640e56c4
features: mark off GL 4.0 for zink
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8329 >
2021-01-05 08:58:25 -05:00
Mike Blumenkrantz
ae9d6c5620
zink: GLSL 4.00
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8329 >
2021-01-05 08:58:24 -05:00
Mike Blumenkrantz
22be7b9674
zink: handle arrays of ubos
...
with the nir pass removing all dynamic indexing, all that's needed here
is generating extra binding points for each array member, as everything else
is already handled
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8314 >
2021-01-05 08:37:03 -05:00
Mike Blumenkrantz
dbba989907
zink: run nir_lower_dynamic_bo_access
...
this fixes up most cases of dynamic bo loading
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8314 >
2021-01-05 08:37:03 -05:00
Mike Blumenkrantz
35e346f428
zink: handle vertex streams
...
we already support all this, it's just a matter of slapping on some Stream
decoration flex tape
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8204 >
2021-01-05 13:30:34 +00:00
Mike Blumenkrantz
68242767d2
zink: enable PIPE_CAP_START_INSTANCE
...
and add feature
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8313 >
2021-01-05 13:24:14 +00:00
Mike Blumenkrantz
351b6c667e
zink: always load (gl_InstanceID - gl_BaseInstance) when loading gl_InstanceID
...
gl's values here always begin at 0, while vk begins with the firstInstance param
used in the current draw command
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8313 >
2021-01-05 13:24:14 +00:00
Samuel Pitoiset
4bb92d9145
radv: enable TC-compat HTILE in GENERAL on GFX10+
...
GFX10+ supports compressed writes to HTILE, so it should just work
to skip decompressions when transitioning from/to GENERAL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8039 >
2021-01-05 12:10:11 +00:00
Samuel Pitoiset
326c7312bf
radv: only load the DS fast clear values for compressed rendering
...
Otherwise it's useless because we are unlikely to perform a
fast depth stencil clear.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8039 >
2021-01-05 12:10:11 +00:00
Samuel Pitoiset
76e33d528b
radv: clean up radv_layout_is_htile_compressed()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8039 >
2021-01-05 12:10:11 +00:00
Samuel Pitoiset
f4f096805b
radv: fix TC-compat HTILE images with DST_OPTIMAL on the compute queue
...
This is probably rare but can happen if someone performs a depth-stencil
copy on the compute queue. This might work (untested by CTS) but it
looks more conservative to decompress before perfoming the operation.
Found by inspection.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8039 >
2021-01-05 12:10:11 +00:00
Samuel Pitoiset
1c539b6484
radv: add radv_htile_get_initial_value() and document the HTILE dword
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8039 >
2021-01-05 12:10:11 +00:00
Samuel Pitoiset
3038c88661
radv: fix potential HTILE issues for TC-compat images on GFX8
...
We can only use the entire HTILE buffer if TILE_STENCIL_DISABLE is
TRUE. On GFX8+, this is only true if the depth image has no stencil
and if it's not TC-compatible because of the ZRANGE_PRECISION issue.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8039 >
2021-01-05 12:10:11 +00:00
Samuel Pitoiset
f7f6e9ad56
radv: always clear the SR0/SR1 bits of the HTILE buffer
...
To make sure the stencil compare state is properly initialized and
cleared when the driver performs a fast depth clear.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8039 >
2021-01-05 12:10:11 +00:00
Pierre-Eric Pelloux-Prayer
5c3b471c9f
mesa/st: fix redundant initialization
...
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3966
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846 >
2021-01-05 11:29:12 +00:00
Pierre-Eric Pelloux-Prayer
094ab8bc12
radeonsi: fix redundant initializations
...
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/3966
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846 >
2021-01-05 11:29:11 +00:00
Pierre-Eric Pelloux-Prayer
b1c7a65815
gallium/vl: merge identical h264/h265 enums
...
Use h2645 notations for shared enums to reduce duplication and
fix a clang warning.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846 >
2021-01-05 11:29:11 +00:00
Pierre-Eric Pelloux-Prayer
8d347742fe
tesselator: remove unused variable
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846 >
2021-01-05 11:29:11 +00:00
Pierre-Eric Pelloux-Prayer
d0767fc045
amd/addrlib: use cpp.has_argument() to filter compiler arguments
...
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846 >
2021-01-05 11:29:11 +00:00
Pierre-Eric Pelloux-Prayer
6679a34394
vdpau: fix invalid enum usage
...
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846 >
2021-01-05 11:29:11 +00:00
Pierre-Eric Pelloux-Prayer
cd1ac36ddd
vdpau: fix -Wabsolute-value warning
...
vdpau specifies that top-left is x0/y0, bottom-right is x1/y1 and that x0/y0 are
inclusive while x1/y1 are exclusive.
This commit remove the abs() usage and instead verifies that the VdpRects passed
by the user matche the documentation. When they don't they're treated as empty
rectangles.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846 >
2021-01-05 11:29:11 +00:00
Rhys Perry
c5973ede01
ac/nir: use llvm.readcyclecounter for LLVM9+
...
Unlike llvm.amdgcn.s.memtime, this works on GFX10.3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4033
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8306 >
2021-01-05 10:27:00 +00:00
Eric Anholt
c0bcde8b45
gallium/tgsi_exec: Remove unused MaxGeometryShaderOutputs.
...
Just an indirection from the value you should be grepping for (the one
that controls the allocation of the output buffer).
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8283 >
2021-01-05 09:54:49 +00:00
Eric Anholt
d31c30007b
gallium/tgsi_exec: Clean up storage of the pixel kill mask.
...
We need one dword per exec, rather than one per channel, since it's the
bitmask of channels killed. Removes the remainder of the
TGSI_EXEC_NUM_TEMP_EXTRAS!
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8283 >
2021-01-05 09:54:49 +00:00
Eric Anholt
6fb9365a07
gallium/tgsi_exec: Drop the unused scratch temp regs.
...
I suspect this was used back in the SSE2 backend days. Definitely dead
now.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8283 >
2021-01-05 09:54:49 +00:00
Eric Anholt
c27cbfd9ed
gallium/tgsi_exec: Stop doing the weird allocation of the Addrs array.
...
Saves an indirection on referencing the address regs, and also my sanity.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8283 >
2021-01-05 09:54:49 +00:00
Eric Anholt
af135bb8af
gallium/tgsi_exec: Simplify GS output vertex count tracking.
...
We had this strange 5-dword-per-stream storage for the single dword
current vertex count, due to copy and paste. We can make much cleaner
code by just having a 4-element array in the machine.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8283 >
2021-01-05 09:54:49 +00:00
Samuel Pitoiset
831d9d406a
radv: remove unused radv_image::aspects
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8324 >
2021-01-05 09:46:01 +00:00
Samuel Pitoiset
58c68bac39
radv: fix clearing images with vkCmdClear{Color,DepthStencil}Image()
...
The image aspects field is actually never set and we should use the
range aspect anyways.
Fixes: 1a7b7b17ad
("radv: avoid oob read during clear")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8324 >
2021-01-05 09:46:01 +00:00
Pierre-Eric Pelloux-Prayer
4c751ad67a
vbo/dlist: use a shared index buffer
...
Draws can be merged by u_threaded if they share the same IB.
This improves performance in SPECviewperf13 snx-03: tests fps
are improved by a 1.2x - 2.0x factor.
v2: reworked error handling
Reviewed-by: Marek Olšák <marek.olsak@amd.com > (v2)
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com > (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8111 >
2021-01-05 09:51:56 +01:00
Marek Olšák
a0314083be
mesa: fix a second bug in merging light state parameters with unpacked uniforms
...
The memcpy size should be packed even if the allocated parameter size
is padded to 4 components.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Marek Olšák
45acf9b49a
mesa: fix a bug in merging light state parameters with unpacked uniforms
...
This code is not enabled yet.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Marek Olšák
4db8b171a5
mesa: add STATIC_ASSERTs to the STATE_LIGHT_ATTRIBS case
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Marek Olšák
6549caf2c2
st/mesa: fix a defect when st_validate_state was invoked for unused states
...
This fixes a small performance issue. Discovered with piglit/drawoverhead.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Marek Olšák
1f17f8bb6d
st/mesa: simplify checking whether to pin threads to L3
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Marek Olšák
a0467b7fa1
util: replace UTIL_MAX_CPUS by util_cpu_caps.num_cpu_mask_bits
...
to reduce overhead when setting thread affinity.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Alexander von Gluck IV
c7486c996e
glsl/builtin_functions: Rename int64 function to int64_avail
...
* int64 is a core type on Haiku (and potentially other platforms)
* rename to int64_avail matching other similar calls
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2021-01-04 21:18:55 -06:00
Alexander von Gluck IV
cd2f3627a6
meson: Add _GNU_SOURCE for Haiku to activate non-posix functions
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
2021-01-04 21:18:54 -06:00
Marek Olšák
76eb3478cf
radeonsi: take color interpolation into account for shader variants
...
Fixes:
- Sample shading now uses per-sample interpolation for colors if colors
are the only inputs. (this is the only case that was broken)
Optimizations:
- BC_OPTIMIZE (barycentric optimization) is now enabled with MSAA if colors
are qualified with both center and centroid. (BC_OPTIMIZE means that
the hardware skips initializing centroid (i,j) if they are equal to
center (i,j))
- If MSAA is disabled and at least 2 out of (center, centroid, sample) are
used by all inputs now including colors, center is forced for all inputs.
- If INTERP_MODE_COLOR is not used and the legacy GL shade model is flat,
the shader variant for flat shading is not generated.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8225 >
2021-01-05 02:43:55 +00:00