Commit Graph

140355 Commits

Author SHA1 Message Date
Erik Faye-Lund 1dfad514ea zink: add support for string-markers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11004>
2021-05-29 09:02:13 +00:00
Erik Faye-Lund 6c03a85094 zink: untangle have_EXT_debug_utils and ZINK_DEBUG_VALIDATION
EXT_debug_utils is useful for more than just validation, so let's
untangle these a bit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11004>
2021-05-29 09:02:13 +00:00
Erik Faye-Lund ba392e9511 zink: implement half-float packing
This cap isn't really optional for drivers that implement GL SPIR-V
support, so let's just implement it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4846
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11057>
2021-05-29 08:16:40 +00:00
Erik Faye-Lund 1887ff2ebb zink: mark 2d-arrays as cube-compatible
OpenGL allows reinterpreting 2D array textures as cubemaps,
so we need to always set the cube-compatible flag for them.

This fixes a piglit test on Lavapipe.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Erik Faye-Lund 71494c4874 zink: only mark resources as cube-compatible if supported
We need to check if the number of samples are valid for the image
first if we've going to set the cube-compatible bit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Erik Faye-Lund b92c1a043a lavapipe: do not interpret cube-compatible as cubemap
Now that we handle the cubemap-array views properly, we no longer need
to do this. It's allowed in Gallium to create cubemap views of 2d
arrays, so this should work fine.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Erik Faye-Lund a5f41925a6 lavapipe: handle cube-array image-views
It seems this was missed in the past.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Yiwei Zhang 60f513279c venus: fix mismatched bo mmap_size for export and multiple imports
Spec requires apps to use the size returned from
vkGetAndroidHardwareBufferPropertiesANDROID for AHB import, which
includes dedicated image/buffer import and non-dedicated buffer import.

Spec requires venus to use the size from image and buffer memory
requirement for dma_buf fd import if it's dedicated. If not dedicated,
the actual payload size should be used.

For AHB export allocation of VkImage, the app provided size will be 0,
and internally we must use the size from image memory requirement.

For AHB export allocation of VkBuffer, the app provided size comes from
buffer memory requirements and it can be smaller than the actual AHB
size due to page alignment. Internally that's the size we must use.

For AHB import, app must use the size from AHB prop query. Internally,
we have to override that with the size from memory requirement if the
import operation is dedicated to a VkImage or a VkBuffer. If not
dedicated, the actual payload size should be used.

The not working scenario is:
1. App creates an AHB backed VkBuffer, and the exported AHB size is
   larger than the buffer memory requirement (very common).
2. App imports the AHB without a dedicated VkBuffer. Then the entire
   AHB payload will be imported and the mmap_size might increase.

Test: dEQP-VK.api.external.memory.android_hardware_buffer.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11055>
2021-05-29 04:48:50 +00:00
Yiwei Zhang beb80858d8 venus: refactor for property query of dma_buf fd
With a TODO to route host storage size instead of that from the guest.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11055>
2021-05-29 04:48:50 +00:00
Yiwei Zhang ccefcb0baf venus: fix misaligned bo_flags between import and query
For importing an dma_buf fd, export info is not required. Leaving the
bo_flags missing VIRTGPU_BLOB_FLAG_USE_SHAREABLE bit as well as the
VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE bit. Upon querying fd properties,
DMA_BUF handle type will be specified which generates a new bo_flags
not matching the prior one.

This patch aligns the above 2 bits for the dma_buf import path.

Test: vkGetAndroidHardwareBufferPropertiesANDROID should succeed with
      a valid AHB with AHARDWAREBUFFER_FORMAT_BLOB format.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11055>
2021-05-29 04:48:50 +00:00
Yiwei Zhang 1df4c960c6 venus: rename dmabuf to dma_buf when it represents a type
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11055>
2021-05-29 04:48:50 +00:00
Charmaine Lee fda4eaf5c4 svga: fix texture rectangle sampling when no sampler view declaration is defined
It is valid to not have a sampler view declaration for the corresponding
 sampler in a TGSI shader, and hence we should not rely on the sampler view
 declaration to determine if we need to adjust the unnormalized coordinates
 for texture rectangle sampling.

 This patch is to prep for tgsi shaders that are translated from nir which
 in many cases do not issue sampler view declarations.

 Fixes: 584b107037 ("st/mesa: Drop the TGSI paths for drawpixels and use nir-to-tgsi")

 Reviewed-by: Neha Bhende <bhenden@vmware.com

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11011>
2021-05-29 00:10:34 +00:00
Neha Bhende fd98649091 svga: Use shader_key info to declare resources if TGSI shader is missing it
Sometimes, TGSI shader doesn't have SVIEW declaration if it is not
utilize in shader. In such cases, declare those resources with the
help of information stored in shader key.

Fixes: 584b107037 ("st/mesa: Drop the TGSI paths for drawpixels and use nir-to-tgsi")

Tested with piglit, gleretrace

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11011>
2021-05-29 00:10:34 +00:00
Neha Bhende 4b958ac720 svga: Add target and sampler_return_type info into shader key
Fixes: 584b107037 ("st/mesa: Drop the TGSI paths for drawpixels and use nir-to-tgsi")

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11011>
2021-05-29 00:10:34 +00:00
Roman Stratiienko e91445464f anv_android: Add missing type
Fixes: 2797c75426 ("anv: fix AHB leak upon exportable allocation")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11068>
2021-05-28 23:20:24 +00:00
Chia-I Wu 1d2a33c705 venus: ignore pInheritanceInfo when we should
pInheritanceInfo should be ignored when the command buffer is primary.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4850
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
2021-05-28 23:09:22 +00:00
Chia-I Wu f7001f7a2d venus: remember cmd buffer level and queue family
We need them for wsi queue ownership transfer and others.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
2021-05-28 23:09:22 +00:00
Chia-I Wu fb549d21d8 venus: add struct vn_command_buffer_builder
We are going to remember more states.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
2021-05-28 23:09:22 +00:00
Mike Blumenkrantz 67d2939e4a lavapipe: add more format mappings for vertex buffer formats
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10957>
2021-05-28 22:42:42 +00:00
Marek Olšák 264aaf99df mesa: don't save/restore VAO NumUpdates and IsDynamic to fix update tracking
NumUpdates is used to indicate whether a VAO is static or dynamic, but if
we restored an older value, it could incorrectly indicate that it's not
dynamic.

This fixes a small performance issue with torcs.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák d415df207a mesa: don't call FLUSH_VERTICES in glPopClientAttrib
These states don't affect draws, so any enqueued Begin/End vertices don't
need flushing.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák 11f41ba2f9 mesa: optimize unreferencing VBOs in glPopClientAttrib
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák 67ab6e8eb1 mesa: optimize glPush/PopClientAttrib for GL_CLIENT_VERTEX_ARRAY_BIT
This improves performance in torcs by 6%.

The idea is to skip saving and restoring vertex attribs and bindings that
have never been changed.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák c1205a6b0f mesa: don't call _mesa_set_draw_vao in glPushClientAttrib
Pushing states doesn't affect draws.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák 5195d848a0 mesa: move _mesa_copy_vertex_attrib/buffer functions to their only use
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Mike Blumenkrantz 076a352f81 aux/indices: employ Delete The Code methodology
the util functions will assert for unknown prim types, so the switches
are redundant now

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz 0987c87445 aux/indices: break out index count conversion into separate function
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz 4ece3931bc aux/indices: break out index size conversion to separate function
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz cad2026b72 aux/indices: break out primitive type conversion to separate function
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz 9d13d3e9ad llvmpipe: ci updates
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11049>
2021-05-28 20:46:14 +00:00
Mike Blumenkrantz 5275ab1bf3 gallivm: fix oob imageLoad with formats that have <4 components
it's expected that these loads will have full alpha

fixes spec@arb_shader_image_load_store@invalid

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11049>
2021-05-28 20:46:14 +00:00
Mike Blumenkrantz 35691edea0 aux/trace: avoid deadlock in screen::flush_frontbuffer hook
this hook usually requires mapping a resource, which will trigger a
trace dump internally, which requires locking the output mutex, so
finish the trace dump before calling it

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11052>
2021-05-28 19:43:31 +00:00
Timur Kristóf aabe9d2f6e aco: Eliminate SALU comparison when SCC can be used instead.
For example:

s0, scc = s_and_u32 ...
scc = s_cmp_eq_u32 s0, 0
p_cbranch_sccz

is turned into:

s0, scc = s_and_u32 ...
p_cbranch_sccnz

Fossil DB results on Sienna Cichlid:

Totals from 85267 (56.91% of 149839) affected shaders:
CodeSize: 202539256 -> 202237268 (-0.15%)
Instrs: 38964493 -> 38888996 (-0.19%)
Latency: 750062328 -> 749913450 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 167408952 -> 167405157 (-0.00%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>
2021-05-28 12:14:53 +00:00
Timur Kristóf a93092d0ed aco: Use s_cbranch_vccz/nz in post-RA optimization.
A simple post-RA optimization which takes advantage of the
s_cbranch_vccz and s_cbranch_vccnz instructions.

It works on the following pattern:

vcc = v_cmp ...
scc = s_and vcc, exec
p_cbranch scc

The result looks like this:

vcc = v_cmp ...
p_cbranch vcc

Fossil DB results on Sienna Cichlid:

Totals from 4814 (3.21% of 149839) affected shaders:
CodeSize: 15371176 -> 15345964 (-0.16%)
Instrs: 3028557 -> 3022254 (-0.21%)
Latency: 21872753 -> 21823476 (-0.23%); split: -0.23%, +0.00%
InvThroughput: 4470282 -> 4468691 (-0.04%); split: -0.04%, +0.00%

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>
2021-05-28 12:14:53 +00:00
Timur Kristóf 0e4747d3fb aco: Introduce a new, post-RA optimizer.
This commit adds the skeleton of a new ACO post-RA optimizer,
which is intended to be a simple pass called after RA, and
is meant to do code changes which can only be done
after RA.

It is currently empty, the actual optimizations will be added
in their own commits. It only has a DCE pass, which deletes
some dead code generated by the spiller.

Fossil DB results on Sienna Cichlid:

Totals from 375 (0.25% of 149839) affected shaders:
CodeSize: 2933056 -> 2907192 (-0.88%)
Instrs: 534154 -> 530706 (-0.65%)
Latency: 12088064 -> 12084907 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 4433454 -> 4432421 (-0.02%); split: -0.02%, +0.00%
Copies: 81649 -> 78203 (-4.22%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>
2021-05-28 12:14:53 +00:00
Timur Kristóf 6f3c472f2e aco: New writeout overloads for the test framework.
These will be used by future tests.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>
2021-05-28 12:14:53 +00:00
Timur Kristóf 8d37aa91d6 aco: Add Operand(Temp, PhysReg) constructor.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>
2021-05-28 12:14:53 +00:00
Timur Kristóf 4491b94d58 aco: Don't DCE instructions that write non-temps, eg. exec.
No Fossil DB changes.
This commit makes DCE usable after RA.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>
2021-05-28 12:14:53 +00:00
Emma Anholt 3542afbdd0 Revert "ci: Configure DUTs for max performance"
This reverts commit eef5409df4.

I suspect this has caused a lot of the CI instability today -- some flakes
were already added, but the a630-traces job is still flaking.  Revert
until a fix makes it stable.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11024>
2021-05-28 11:39:43 +00:00
Samuel Pitoiset ea5f1fa279 radv: fix generating hang reports if mutable descriptors are used
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/11031>
2021-05-28 10:53:02 +00:00
Alejandro Piñeiro 0d2d26a68c v3dv: remove unused v3dv_zs_buffer_from_vk_format
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11050>
2021-05-28 09:00:35 +00:00
Tapani Pälli 586f84ce01 mesa: fix error set for glCompressedTexSubImage calls
Desktop and ES expect a different error code here when dealing with
generic compressed format tokens. This fixes failures with upcoming
new tests for compressed texture related API calls.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11009>
2021-05-28 08:56:41 +03:00
Ian Romanick a4e1501770 mesa/st: Don't assert !unify_interfaces in the passthrough edge flags case
Technically, this is correct, and I think it's the right long-term
solution.  However, Iris has code that undoes the damage caused by
nir_lower_passthrough_edgeflags (see iris_fix_edge_flags in
iris_program.c), so it should be safe to do the lowering here.

I'm not marking this as closing mesa#4838 because I think we should move
the Iris code up to here, make a different version of the NIR pass, or
something different... to properly fix this problem.  In the mean time,
this gets a bunch of tests to stop crashing. :)

Fixes: a76ec17f12 ("mesa/st: Fix iris regression with clip distances.")
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11013>
2021-05-27 14:22:36 -07:00
Emma Anholt 9d28bac9d0 turnip: Make sure that SNORM blits don't clamp ambiguous -1.0 values.
The CTS expects that some paths transfer SNORM data exactly, but the HW
will clamp 0x80 values to 0x81 in the process.  We can treat snorm as
unorm, though, and get working compression without the clamping happening.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10735>
2021-05-27 19:27:40 +00:00
Emma Anholt 69df1e8650 turnip: Reorganize copy_format()'s switch statement.
Now that we need FALLTHROUGH macros we weren't saving much by falling
through, and things were weirdly ordered anyway with depth intermixed with
color formats and the default case tucked in the middle of the switch
statement.  Replace with pretty obvious ordering of normal color, planar
color, depth, then default.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10735>
2021-05-27 19:27:40 +00:00
Karol Herbst 8169d709c4 nv50/ir: don't optimize shl(mul_hi, a) to mul_hi
Fixes shader_storage_buffer_object.advanced-unsizedArrayLength* CTS tests

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11021>
2021-05-27 13:32:04 +00:00
Karol Herbst e7485f1294 nv50/ir: when constant folding shl(mul, a) we need to copy muls type
Also clear subop while at it as we might convert a shl.wrap to mul.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11021>
2021-05-27 13:32:04 +00:00
Antonio Caggiano 5e88a1caca panfrost: Performance configuration
Configure a panfrost performance structure with tables of categories and
counters for the current product id. An array for storing counter values
read from the GPU is also managed by this structure. A generic read
function can be used to retrieve the value of a counter from the conter
values array.

v2: Generate tables instead of calling register functions.
v3: Simplify counter read function and `pan_gen_perf.py` write method.
v4: Accumulate counter values from all cores.
v5: Wrap `STATIC_ASSERT`s within unused functions.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10844>
2021-05-27 13:24:54 +00:00
Antonio Caggiano fece367e9e panfrost: Counter definitions
Add Mali events XML files generated with Panfrost HWC helper.
https://gitlab.freedesktop.org/fahien/panfrost-hwc-helper/

v2: Restore license headers.
v3: Fix shader core and memory system counter offsets.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10844>
2021-05-27 13:24:54 +00:00
Pierre-Eric Pelloux-Prayer ee669227ad st/mesa: fix clearing of 1D array textures
st_gl_texture_dims_to_pipe_dims isn't usable in this case since its
API doesn't match the usage so fix up the dimensions manually.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3646

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10523>
2021-05-27 14:32:01 +02:00