Lionel Landwerlin
23c4b59b46
anv: bump internal descriptor index fields to 32bits
...
Prior to supporting VK_EXT_descriptor_indexing all of our descriptor
limits where below 64k which fitted a uint16_t. Now all of those can
go up to 2^20 entries so we need 32bits indexes to keep track of them.
This change leaves the dynamic indexes at 16bits. We could arguably
bump them too, up to the reviewer's taste.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 6e230d7607 ("anv: Implement VK_EXT_descriptor_indexing")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4636
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10228 >
2021-04-14 18:52:48 +00:00
Samuel Pitoiset
97e7b21c42
ac: add missing BUF_DATA_FORMAT_10_11_11 vertex format on GFX10+
...
This format is supported by the driver.
Fixes vertex explosion in Dirt 5.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4635
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10226 >
2021-04-14 18:07:41 +00:00
Connor Abbott
2deead184c
ir3/sched: Don't schedule too many tex/SFU instructions
...
Consider a simple loop that does a series of texture instructions and
then reduces the results:
vec4 sum = vec4(0);
for (int i = 0; i < N; i++) {
sum += texture(...);
}
Assume that the loop is unrolled and we schedule the resulting basic
block. Right now, after we schedule the first texture instruction, the
only instructions available to schedule that don't incur a sync are the
instructions to setup the second texture instruction. So we keep picking
the texture instructions, no matter how large N is, resulting in a
pathological schedule for register pressure when N is very large:
sum1 = texture(...);
sum2 = texture(...);
sum3 = texture(...);
...
sum = sum1 + sum2 + sum3 + ...;
In particular this happens with some CTS tests for VK_EXT_robustness2,
where a loop like that with many iterations is marked as [[unroll]],
forcing NIR to unroll it.
This solution is a balance between the current approach and always
scheduling for register pressure (and ignoring sync's). We only allow a
certain number of texture fetches to be in flight before considering
textures to "sync", even though they don't really, both because they
likely *will* sync in reality (overflowing the internal queue of waiting
texture instructions) and because at some point we need the normal
algorithm to kick in and start lowering register pressure.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7571 >
2021-04-14 17:33:58 +00:00
Connor Abbott
7821e5a3f8
ir3/sched: Don't penalize uses of already-waited tex/SFU
...
Once we insert a use of a given tex or SFU instruction, then we must
wait for that tex/SFU instruction (as well as all earlier ones) to
complete, so we shouldn't penalize further uses, even if a subsequent
tex/SFU instruction gets scheduled after the first use. This especially
matters after the next commit when we start forcibly breaking up long
sequences of texture instructions, since if we schedule a group of 8
texture instructions then we want to schedule the uses of those
instructions in parallel with the next 8 texture instructions to reduce
register pressure.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7571 >
2021-04-14 17:33:58 +00:00
Erik Faye-Lund
5362adf68d
zink: verify that source-format support linear-filter
...
Similar to the previous commit, we should also verify that the
source-format support linear-filter if we try to blit with it.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10234 >
2021-04-14 15:48:03 +00:00
Erik Faye-Lund
0ba3cf1f95
zink: verify that src/dst support blitting
...
Some Vulkan-drivers don't support blitting between all formats and
layouts. So let's verify this while blitting, and fall back to the
normal rendering code-path instead.
This fixes a crash on start-up in OpenArena on V3DV.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10234 >
2021-04-14 15:48:03 +00:00
Bas Nieuwenhuizen
8ddbac0377
radv/winsys: Remove use_local_bos
...
Now that perftest is stored in the winsys.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10198 >
2021-04-14 15:16:17 +00:00
Bas Nieuwenhuizen
284bc57a49
radv: Use VRAM cmdbuffers in more situations.
...
In most games I tested we use 32 MiB of cmdbuffers+cmd upload buffers
at most. Especially since we have mutable descriptors it seems
somewhat unlikely anything else will eat it up so be a bit more
aggressive allocating them in VRAM.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10198 >
2021-04-14 15:16:17 +00:00
Bas Nieuwenhuizen
057ec395a4
radv: Refactor cs_domain to be a winsys function.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10198 >
2021-04-14 15:16:17 +00:00
Erik Faye-Lund
9de05fd36b
zink: do not dereference NULL pointer
...
If first_frame_done isn't set, but fence is NULL, we end up dereferncing
that NULL-pointer.
This can happen in the case where the first submitted batch has no work,
and pfence was passed as a NULL-pointer.
While we're at it, simplify the check with the surrounding code, which
also checks for a NULL-pointer here.
Fixes: e93ca92d4a ("zink: force explicit fence only on first frame flush")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10235 >
2021-04-14 15:04:35 +00:00
Timur Kristóf
f3e004cb56
aco: Add a simple heuristic to decide early or late primitive export.
...
Late export is theoretically better if used with LATE_ALLOC,
but in practice, the early export has an advantage of
lower register usage, therefore more concurrent waves.
The idea of this commit is that "small" shaders benefit from early
primitive export more, due to being able to launch much more waves.
Let's consider a NIR shader "small" when it has only 1 block.
This yields both better performance, and better stats, than always
using late export.
Fossil DB on Sienna:
Totals from 12807 (8.76% of 146265) affected shaders:
VGPRs: 609128 -> 620216 (+1.82%); split: -0.01%, +1.83%
SpillSGPRs: 1458 -> 1538 (+5.49%)
CodeSize: 37028204 -> 37019320 (-0.02%); split: -0.17%, +0.14%
MaxWaves: 282902 -> 278516 (-1.55%)
Instrs: 7163142 -> 7162925 (-0.00%); split: -0.18%, +0.18%
VClause: 169285 -> 169547 (+0.15%); split: -1.15%, +1.30%
SClause: 267373 -> 267151 (-0.08%); split: -0.24%, +0.16%
Copies: 446442 -> 444567 (-0.42%); split: -2.68%, +2.26%
Branches: 156245 -> 156195 (-0.03%); split: -0.30%, +0.26%
PreSGPRs: 434701 -> 447396 (+2.92%)
PreVGPRs: 527783 -> 540527 (+2.41%)
Signed-off-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/10106 >
2021-04-14 14:25:10 +00:00
Timur Kristóf
5dbab03a80
aco: Emit fewer branches for NGG VS/TES with late primitive export.
...
Signed-off-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/10106 >
2021-04-14 14:25:10 +00:00
Timur Kristóf
af7d5f5b86
aco: Set block_kind_export_end in create_vs/fs_exports.
...
Signed-off-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/10106 >
2021-04-14 14:25:10 +00:00
Timur Kristóf
2b312a4fd7
aco: Extract ngg_nogs_export_prim_id to a separate function.
...
Signed-off-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/10106 >
2021-04-14 14:25:10 +00:00
Timur Kristóf
231ef14b3d
aco: Use s_setprio 3 at the beginning of every VS and TES.
...
The user-set priority of shaders matters very little, but we hope
this might still help speed up VS input loads especially.
Signed-off-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/10106 >
2021-04-14 14:25:10 +00:00
Timur Kristóf
4c86c7aa15
aco: Remove useless s_setprio near gs_alloc_req.
...
We learned that the gs_alloc_req is not actually when the export
space allocation happens. So it makes no sense to prioritize it.
Signed-off-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/10106 >
2021-04-14 14:25:10 +00:00
Erik Faye-Lund
1cf6b8d461
zink: fall back from cached to non-cached memory
...
This fixes basic rendering on top of V3DV, which doesn't seem to expose
the cached memory we expect and love.
Fixes: 598dc3dca4 ("zink: use cached memory for all resources when possible")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10230 >
2021-04-14 14:16:16 +00:00
Timur Kristóf
75cd43741a
aco: Align NGG scratch size to 16 so a single ds_read can always read it.
...
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/10155 >
2021-04-14 14:05:24 +00:00
Timur Kristóf
c1346e5c22
aco: Optimize workgroup exclusive scan to better avoid bank conflicts.
...
Previously, every wave had multiple active lanes read the LDS, and
the data was processed by VALU DPP instructions.
Now, only the first lane reads the LDS in order to avoid bank
conflicts, and the results are processed by SALU.
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/10155 >
2021-04-14 14:05:24 +00:00
Boris Brezillon
c8c6e0ff6f
panfrost: Fix pan_blitter_get_blit_shader()
...
The key passed to _mesa_hash_table_search() is wrong, fix it.
Fixes: 8ba2f9f698 ("panfrost: Create a blitter library to replace the existing preload helpers")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10232 >
2021-04-14 13:53:20 +00:00
Erik Faye-Lund
1c51c533bd
zink: do not clear on cpu
...
This seems to simply be a mixup of what utility function to use.
util_clear_render_target clears on the CPU, whereas
util_blitter_clear_render_target clears on the GPU. Because we do the
zink_blit_begin dance, it seems reasonable to assume the latter was
intended.
Fixes: 622f8f6ed5 ("zink: add a pipe_context::clear_texture hook")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10211 >
2021-04-14 13:35:26 +00:00
Michel Dänzer
3c15dba46d
ci: Update to latest ci-templates
...
This is possible again thanks to
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9955 , and
this MR requires rebuilding all templates based docker images anyway,
so we can pull in the latest templates for free.
We need to exclude /dev/* when unpacking rootfs tarballs for the
arm_test image, since x86 container build jobs do not allow mknod
anymore with current templates. The baremetal test jobs have another
filesystem mounted on /dev anyway.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
a436b276f7
ci: Do not append ci-templates commit hash to Windows docker image tag
...
We're not using the templates for the Windows image.
Fixes needless rebuild of the Windows image when the ci-templates
commit is changed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
db4ddced5f
ci: Install Rust & cargo from Debian for x86_test* images
...
Also build deqp-runner once in x86_test-base instead of separately in
x86_test-{gl,vk}.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
b0ab534c2d
ci: Install GLVND from Debian bullseye
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
0155881d82
ci: Install llvm-spirv from Debian bullseye
...
While we're at it, use a tag instead of whatever happens to be the
current main branch for building libclc.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
711b89454b
ci: Install spirv-tools from Debian bullseye
...
v2:
* Drop local build from x86_test-gl image as well (Eric Anholt)
Reviewed-by: Eric Anholt <eric@anholt.net > # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
c743421f4e
ci: Install librenderdoc from Debian bullseye
...
Debian bullseye has a separate command-line-only renderdoc package, so
no need to install Qt packages and build renderdoc anymore.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3125
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
af0fde955c
ci: Move docker images from Debian buster to bullseye
...
Among other things, this gets us GCC 10 (was 6).
Requires some changes to third party components we use:
* Install apitrace (& waffle) from Debian; was hitting issues with the
local build, and it's the same version 9.0 anyway.
* Update Fossilize to a newer commit which builds with GCC 10.
* apt.llvm.org repositories are no longer needed.
* Use an SPIRV-LLVM-Translator commit which builds with LLVM 11.0.1.
* Install XCB packages from Debian, 1.13 fails to build with Python 3.9.
* Install wayland-protocols from Debian, 1.12 is too old for
libgtk-3-dev in bullseye.
LLVM 7/8 packages are no longer available.
Also adapt expected test results to Xvfb now exposing multi-samle
GLXFBConfigs.
v2:
* Install clang instead of clang-11.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3124
Reviewed-by: Eric Anholt <eric@anholt.net > # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
a3e38e0bf8
ci: Bump LLVM/clang from 10 to 11
...
Preparation for moving to Debian bullseye, which has packages for LLVM
9 & 11, but not 10.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
bc8e866b1d
ci: Do not install armhf LLVM packages
...
LLVM support has been disabled in the meson-armhf job for some time, so
they were unused.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
efcdc7f7d8
intel/blorp: Initialize texture_data[0]
...
Avoids warning with GCC 10:
../src/intel/blorp/blorp_blit.c: In function 'blorp_nir_combine_samples':
../src/intel/blorp/blorp_blit.c:702:25: error: 'texture_data[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
702 | texture_data[0] = nir_fmul(b, texture_data[0],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
703 | nir_imm_float(b, 1.0 / tex_samples));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Pierre-Eric Pelloux-Prayer
8ad26e6715
r600/sb: Use assignments for resetting struct r600_sb::literal
...
Avoids warning with newer GCC:
../src/gallium/drivers/r600/sb/sb_sched.cpp: In member function 'void r600_sb::literal_tracker::reset()':
../src/gallium/drivers/r600/sb/sb_sched.cpp:1953:26: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct r600_sb::literal'; use assignment or value-initialization instead [-Werror=class-memaccess]
1953 | memset(lt, 0, sizeof(lt));
| ^
In file included from ../src/gallium/drivers/r600/sb/sb_sched.cpp:35:
../src/gallium/drivers/r600/sb/sb_bc.h:409:8: note: 'struct r600_sb::literal' declared here
409 | struct literal {
| ^~~~~~~
[ Michel Dänzer:
* Expanded commit log
v2:
* Clear all 4 members of lt[4] (Eric Anholt)
]
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Michel Dänzer
cf3d4ea5ff
ci: Fix HTML summary path for piglit OpenCL job artifacts
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9833 >
2021-04-14 13:05:08 +00:00
Juan A. Suarez Romero
7c6bcc8eb3
ci/v3dv: skip Vulkan waiver tests
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10231 >
2021-04-14 12:43:40 +00:00
Rhys Perry
e3ebc1ca4b
radv: fix conditions for running nir_opt_vectorize
...
No fossil-db changes, probably because all fp16 shaders have at least one
16-bit mov or vec2 somehwere.
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/10227 >
2021-04-14 12:27:06 +00:00
Connor Abbott
271c18f48e
tu: Expose VK_KHR_relaxed_block_layout
...
This was absorbed into Vulkan 1.1, but we forgot to expose it
separately. It's a subset of what's allowed by
VK_EXT_scalar_block_layout.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8695 >
2021-04-14 11:48:38 +00:00
Connor Abbott
765c3b85a5
tu: Expose VK_KHR_spirv_1_4 and VK_EXT_scalar_block_layout
...
VK_KHR_spirv_1_4 is trivial because vtn already supports all the added
SPIR-V features that aren't gated behind Vulkan extensions. I've
observed some robustness2 CTS tests requiring this. However there are
a few tests currently failing due to lacking spilling.
VK_EXT_scalar_block_layout should also be trivial, since support for
"straddling" UBO loads was added recently for other reasons. This is
used by every robustness2 CTS test.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8695 >
2021-04-14 11:48:38 +00:00
Juan A. Suarez Romero
45ae0e9fb7
v3d: do not emit attribute if has no resource
...
When emitting the GL shader state, verify the attribute has a resource
bound; otherwise just skip it
v2 (chema):
- Move comment
- Set num_elements_to_emit = 1 if it is 0
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4205
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8826 >
2021-04-14 11:34:14 +00:00
Alejandro Piñeiro
fc17231b2b
v3dv/pipeline: reduce descriptor_map size
...
64 was a temporary and conservative "big enough" value, but we can do
better.
Note that as mentioned on the FIXME, we could be even more detailed,
adding a descriptor map allocate method based on the descriptor
type. That would mean more individual allocations, and slightly more
complexity.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10207 >
2021-04-14 11:00:36 +00:00
Alejandro Piñeiro
9415e3de04
v3dv/device: fix and cleanup v3dv limits
...
We had some cases were we have defined a value on v3dv_limits but
using other when setting it at GetPhysicalDeviceProperties (like
dynamic storage buffers).
Also we do a cleanup. So far we were adding on v3dv_limits only the
limits that were used on more that one place. But then we had the
definition of several limits on different places. It is clearer to
have a common place for those, even if it is used on just one place.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10207 >
2021-04-14 11:00:36 +00:00
Alejandro Piñeiro
cbd299b051
v3dv/device: do not compute per-pipeline limits multiplying per-stage
...
There were two problems here:
* We were multiplying by 6, when for graphics pipelines, we only
support 2.
* Right now we are tracking descriptors through the descriptor
maps, and we have one per pipeline. So in practice there is no
difference between per-stage and per-pipeline limits. So far this
was not a problem, we could revisit in the future.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10207 >
2021-04-14 11:00:36 +00:00
Samuel Pitoiset
e24049da63
radv: advertise attachmentFragmentShadingRate on GFX10.3
...
Layered VRS attachments is for later.
The CTS failures are similar to the existing ones, I will investigate
soon.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
ee77dde396
radv: configure the VRS combiners when an attachment is 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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
ea370f45b4
radv: copy VRS rates to HTILE when beginning a subpass
...
The global VRS image is created on-demand to avoid wasting space.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
0b7e346203
radv: add support for copying VRS rates into HTILE
...
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
164b1884c0
radv: bind our internal depth buffer when not provided by the app
...
When a subpass uses a VRS attachment without binding a depth/stencil
attachment (yes, this is allowed by the Vulkan spec), we have to bind
our internal depth buffer that contains the VRS data.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
513a166a7b
radv: handle the VRS attachment subpass
...
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
bb88f73ad3
radv: create an image for VRS if no depth/stencil attachment is bound
...
The Vulkan spec doesn't require the application to always binds
a depth/stencil attachment when a VRS attachment is used inside the
same subpass.
To handle this situation, the driver creates a global 4096x4096
VRS image that will be bind at draw-time if needed. This isn't
super ideal but we have to do that unfortunately.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
ba7c510e1f
radv: allow HTILE for very small images if VRS attachment is used
...
We need a HTILE buffer to store the VRS rates.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
7bd3a9f502
radv: update the HTILE clear word when VRS is used
...
SR1 is the VRS x-rate.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
d075711b0e
radv: do not use the whole HTILE buffer for depth when VRS is used
...
The stencil data needs to be included for storing the VRS rates
into the HTILE buffer.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
73dac68cb8
radv: configure the VRS HTILE encoding size
...
Any depth buffer can potentially use VRS.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
62033e0cb3
radv: determine if attachment VRS is enabled
...
When VRS attachment, any depth buffer can potentially be used for VRS.
We also have to create a global depth buffer if the app doesn't
provide one.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
9141716481
radv: do not enable DCC for fragment shading rate attachments
...
That's unnecessary.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
5980cd5768
radv: do not allow MSAA with fragment shading rate attachments
...
The Vulkan spec requires the implementation to only supports
VK_SAMPLE_COUNT_1_BIT with fragment shading rate attachments.
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
ec6da922df
radv: expose R8_UINT as the only supported format for VRS attachments
...
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
f232c404d3
ac/surface: store the HTILE pitch to the surface
...
This will be used to copy VRS rates to the HTILE buffer.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
b9c7c5098e
ac/surface: implement HtileAddrFromCoord in NIR
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
9fabbf2150
ac/surface: copy the HTILE equations to the surface
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
438e02fc0f
ac/surface: increase gfx9_meta_equation::gfx10_bits by 4 elements
...
For the HTILE equation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
9eee737364
ac/surface: rename gfx9_dcc_equation to gfx9_meta_equation
...
gfx9_meta_equation will be used to store the HTILE equation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
1edda9e878
ac/surface: add a test of HtileAddrFromCoord prototype outside of addrlib
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
64bd245c84
ac/surface: rename ac_surface_dcc_address_test.c
...
This file will also contain HTILE equation tests.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Samuel Pitoiset
4d25229c24
amd/addrlib: expose HTILE address equations to drivers on GFX10+
...
Similar to the DCC address equations. Only GFX10+ because this
is for copying VRS rates to the HTILE buffer.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
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/10187 >
2021-04-14 09:31:13 +00:00
Erik Faye-Lund
3ebe604ad6
lavapipe: ask pipe-driver for int16 support
...
We shouldn't assume the driver can deal with int16 unless it reports
that it can.
... And LLVMpipe isn't quite there yet, see this MR for details:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189 >
2021-04-14 09:17:00 +00:00
Erik Faye-Lund
ffe534f27b
lavapipe: check all graphics stages
...
For these caps, we need to check all stages to be sure we've got things
right.
Again, this is probably benign, because LLVMpipe should support the same
value for all stages.
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189 >
2021-04-14 09:17:00 +00:00
Erik Faye-Lund
d91a549b67
lavapipe: check all vertex-stages
...
We should really check for the minimum of all supported vertex-stages
here, not just the vertex-shader.
This shouldn't make any real-world difference, because we really only
support LLVMpipe here, and that driver has the same limits for all
stages. But it seems better to actually check all stages instead of just
assuming.
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189 >
2021-04-14 09:17:00 +00:00
Erik Faye-Lund
83de54f6a6
lavapipe: do not subtract 8 from enum
...
This seems arbitrary, and makes us check for PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS
instead of PIPE_SHADER_CAP_MAX_SHADER_IMAGES, which isn't what we want.
The end result is that we accidentally exposed 128 shader images,
instead of 16. This can lead to us writing outside of the array of
shader images in llvmpipe_set_shader_images, among other bad things.
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10189 >
2021-04-14 09:17:00 +00:00
Axel Davy
7fbd7bb7cb
st/nine: Default tearfree_discard to true
...
With tearfree_discard=false, we tear when rendering
fullscreen apps with vsync off.
This is a feature in the sense it's the same as the native
implementation. This also means lower input lag.
However I think most users will prefer to have no tearing,
and don't care about sub refresh-rate input lag.
Thus it's better to default tearfree_discard to true.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
c19a841fd4
st/nine: Default thread_submit to true
...
When rendering fullscreen with vsync on at
a rate close to the refresh rate, you can
miss pageflips by submitting buffers for pageflip
that end up not finished being rendered when the pageflip is due.
With Nine in this situation you could get half the refresh
rate fps before this patch.
Due to the way the presentation backend is implemented,
it's not possible to easily detect the situation and adapt (use
one more backbuffer, but only in this scenario to not increase input
lap when the issue is not present).
thread_submit doesn't have this issue.
Let's default thread_submit to true.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
a2a95abb6c
st/nine: Improve performance with thread_submit
...
Use the Async flush flag to return faster during
Present() when thread_submit is used.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
062c4cc0b9
st/nine: Bump num of backbuffers for tearfree thread_submit
...
Running some high fps benchmarks, thread_submit gets
subpar fps with the option tearfree_discard.
Increasing the number of backbuffers fixes it.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
53f4766a3e
st/nine: Lower texture_memory_limit default
...
512 MB is too ambitious as default value.
128 MB seems safer, and users can increase the limit
manually for the few games that would benefit from it.
Also fixes a typo in the description
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
b41f1e32e9
st/nine: Make it optional to use a sw renderer
...
Until the problem described in
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4489
is fixed, the advantages of using a sw renderer for the
sw rendering in nine are too small compared to the
disadvantages.
Add an option to control whether we use a sw renderer,
and make it so by default we don't.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
c5f75bc200
st/nine: Allow to override the vram size
...
This can be useful for debugging, or for some apps
not supporting >= 4GB of vram.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
26a42f1053
st/nine: Disable buffer_upload when csmt is off
...
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
5702b15cd9
st/nine: Use PIPE_MAP_ONCE for persistent buffers
...
This enables radeonsi to really unmap on release,
which reduces virtual memory usage.
Do it only on 32 bits, as it can reduce performance if the
allocation is reused.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
7ac9c9c667
st/nine: Add fallback for YUV formats
...
Adds alternative format to store YUV textures/surfaces.
These will be converted on upload to the alternative format.
Fixes: https://github.com/iXit/wine-nine-standalone/issues/39
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
25d203a116
st/nine: Do not memset buffers twice
...
No need to apply memset on an allocation
from align_calloc.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
805cedd207
st/nine: Have NOOVERWRITE win over DISCARD
...
I held for a long time the belief DISCARD wins
over NOOVERWRITE, backed by experiments.
But probably both behaviours are ok.
For perf it is better to have NOOVERWRITE win.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
1797a6eb04
st/nine: Add logging to Ex function
...
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
4953d19518
st/nine: Complete *Ex stubs
...
Returning D3D_OK instead of an error when it
makes sense.
Return the value passed previously (or the default)
when it makes sense.
Add (void)variable for unused input variables.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
8c72f7506e
st/nine: Pseudo implement Create*Ex functions
...
It seems some apps use them.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
006338f702
st/nine: Improve Reset on Ex devices
...
Found with wine tests
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
ee580c96ef
st/nine: Pseudo implement set/getClipstatus
...
Not sure why any app would use this in production,
it seems like a debugging feature. Still some do make
the calls.
Fixes: https://github.com/iXit/wine-nine-standalone/issues/99
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:14 +00:00
Axel Davy
a1bb1b9b07
st/nine: Catch redundant scissor and viewport settings
...
The redundancy check is done in the nine_context function,
rather than the device function, in order to also filter
calls from SetRenderTarget and Reset*.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
e0caa05d42
st/nine: Fix ff has_aNrm computation
...
In some cases the wrong computation led the
normal to be zero instead of the correct value,
which led to artifacts.
Fixes: https://github.com/iXit/wine-nine-standalone/issues/105
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
a0288fa3b7
st/nine: Fix ps ff BLENDTEXTUREALPHA
...
This ff ps operation has the texture alpha as input.
Thus we need to sample the texture.
Fixes: https://github.com/iXit/wine-nine-standalone/issues/105
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
9e9644666e
st/nine: Refuse depth buffers as rendertargets
...
If we allow them, some apps try to use them
as rendertargets.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
a849923aea
st/nine: Clamp max_anisotropy
...
GL does the same.
Fixes the low texture quality issue of
https://github.com/iXit/wine-nine-standalone/issues/21
The are some indications it might not be the native
behaviour (which makes sense, the native filtering
of states seems more to not update internal states
when the passed value is invalid).
However it's better visually to have anisotropic filtering
enabled in these buggy cases.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
619c53489f
st/nine: Ignore swizzle on samplers
...
Prevents a crash running wine tests
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
787b03d5f6
st/nine: Increase number of constants of vs1_sw
...
Wine tests seem to indicate more the 256 should
be supported for this case, but I couldn't find the
doc for how much it should be. Use the vs >= 2
settings for now.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
138615a094
st/nine: Remove errors on unsupported lock flags
...
Some applications seem to pass undefined flags...
And we shouldn't return an error.
Found investigating:
https://github.com/iXit/wine-nine-standalone/issues/100
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
70f8d78aa7
st/nine: Handle D3DFMT_NULL multisampling
...
When D3DFMT_NULL is set as render target,
we must take the multisampling state
from the depth buffer.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
de66d503f7
st/nine: Enable multisampling also without depth buffer
...
Found with wine tests.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
1272640d55
st/nine: Fix alpha to coverage states
...
The sequence of states to disable NVidia alpha
to coverage was disabling AMD alpha to coverage.
This patch fixes it.
Found with wine tests.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
d03f401fda
st/nine: Improve Surface GetContainer
...
Prevents a crash in wine tests. Not sure
this behaviour is the correct one, but at
least it'll check the IID passed is the device
before returning it.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
17dc334b81
st/nine: Prevent negative reference count
...
Apparently this is a thing, according to wine tests
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
586cede4b6
st/nine: Fix value of pipe_draw_info's max_index vertex
...
max_index didn't include draw.start
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
f5a1f3c98d
st/nine: Fix read outside bounds for some textures
...
According to wine tests, some apps can allocate very
small ATI1/ATI2 textures levels.
The issue is that the CPU versions of these textures are stored
in buffers which size is the same as if the format was uncompressed.
Thus the content filled cannot possibly be correct for these levels.
The tests seems to hint when rendering with these levels the output
is bad, but at least it the runtime shouldn't crash when using them.
Previously nine would read outside bounds (found with asan) in this
scenario, as the gallium helper copies a full compressed block.
Instead do not copy anything for these levels.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
a6cce52908
st/nine: Fix compilation warnings
...
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
68024fc0cc
st/nine: Fix reading invalid pointer
...
Apparently it is incorrect to use the pointer in
LIST_FOR_EACH_ENTRY like I used to.
Found with asan.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
2146494d08
st/nine: Prevent use after free on dtor
...
Found with asan.
This->device was accessed after This was destroyed.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
8df04b1b2d
st/nine: Fix invalid NULL check
...
Found with clang warnings.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
a5f2084c1b
st/nine: Add missing breaks
...
This makes clang warnings happier.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
29cc19e54f
st/nine: Fix cubetexture early destruction
...
When the surface creation fails, the dtor
can face NULL pointers for the surfaces.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
204bc8981f
st/nine: Fix crash on texture creation failure
...
Fixes regression introduced by:
a179ea2e "st/nine: Use the texture memory helper"
The device is used on texture/surface dtor since this commit.
We need to early fill the device field in case of error.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Axel Davy
d9e79bfe4f
st/nine: Disable fpu exceptions during init
...
Prevents a crash in wine tests. The crash
seems to happen in llvmpipe.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160 >
2021-04-14 08:33:13 +00:00
Juan A. Suarez Romero
9e5762c387
ci: Update VK-GL-CTS to 1.2.6.0
...
v2:
- Bump up MESA_ROOTFS_TAG instead of arm_build (Michel)
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10136 >
2021-04-14 08:06:55 +00:00
Stéphane Marchesin
d6db4d2e08
virgl: Add simple disk cache
...
Since virgl has no backend compilation, this is just a disk cache for the
frontend. As such it is very simple and only implements enough for
get_disk_shader_cache() to work.
With portal2 apitrace:
Before: 100.65 fps
After: 129.051 fps
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10200 >
2021-04-14 07:37:34 +00:00
Pierre-Eric Pelloux-Prayer
a86450e00a
radeonsi: avoid querying gpu state if possible
...
No-op dispatch should only be setup for full reset, not soft-recovery resets.
The same trick cannot be used in si_get_reset_status because EGL expects
us to return GL_***_CONTEXT_RESET even if it has been fixed by a soft
recovery.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
8fd912b9ae
amdgpu,radeon: add full_reset_only param to ctx_query_reset_status
...
Using this boolean the caller tells if it wants to ignore resets
fixed by a soft recovery.
When true, amdgpu can skip the call to libdrm if no cs has been
rejected (since only full gpu reset cause cs rejections).
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
93183480fc
radeonsi: re-create the aux context in si_create_context
...
If a GPU reset occurs, all contexts need to be recreated.
So instead of re-creating the aux context during the flush
of a normal context, we build a new one if we detect that
it needs to be updated.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
6938aa7534
radeonsi: only recreate the aux_context when soft recovery failed
...
When a GPU hang is detected in the kernel, it can uses 2 different
mechanism to recovery: a soft recovery or a hard reset.
Soft recovery doesn't lose the vram content so contexts are still
valid. In this case we don't need to recreate the aux context.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
5c3931fbc5
radeonsi: do not recreate the aux context from the aux context
...
This will cause a deadlock since si_get_reset_status is called
from flush, which is called with aux_context_lock taken.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
3d5c4db23e
radeonsi: use SI_CONTEXT_FLAG_AUX when recreating the aux context
...
Fixes: e6a0f243ea ("radeonsi: update pipe_screen::num_contexts")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
646c5db06f
radeonsi: submit cs to failed context instead of skipping them
...
Skipping the submission would trigger asserts in debug builds
or cause memory corruption.
Instead the cs is submitted as ususual but the kernel won't submit
it to the hardware (and will return ECANCELED) if the context
is really lost (= not soft-recovered).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2491
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
bc71f689f1
amdgpu,radeon: add needs_reset param to ctx_query_reset_status
...
The kernel can do different types of recovery (soft recovery, GPU reset).
Since they both increase gpu_reset_counter, this will cause all contexts
to report AMDGPU_CTX_QUERY2_FLAGS_RESET, which is a bit misleading: if
a single context was soft-recovered, the others are fine and we don't need
special processing.
This commit uses the AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST to distinguish
between the 2 kind of reset and later commits will use this information.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179 >
2021-04-14 07:00:00 +00:00
Pierre-Eric Pelloux-Prayer
3a56f06998
driconf: add workarounds for Teardown
...
Based on the comments from https://gitlab.freedesktop.org/mesa/mesa/-/issues/3714 .
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10172 >
2021-04-14 06:35:30 +00:00
Pierre-Eric Pelloux-Prayer
15e24850b7
gallium/u_threaded: skip refcounting only once
...
If info->take_index_buffer_ownership is true we can skip
refcounting but only for the first iteration of the loop.
The next iterations have to use tc_set_resource_reference.
Fixes: 363c1ef0c0 ("gallium/u_threaded: split draws that don't fit in a batch")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10171 >
2021-04-14 07:50:20 +02:00
Marek Olšák
165a69d2f7
nir: handle mediump varyings in varying compaction helpers
...
Group mediump varyings and don't put 16-bit and 32-bit components
in the same vec4.
... and reply to the comment there.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10224 >
2021-04-14 01:42:49 +00:00
Marek Olšák
30ab38ba6d
radeonsi: enable FP16 for mediump on gfx9+ if radeonsi_fp16=true
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9051 >
2021-04-13 21:10:43 -04:00
Marek Olšák
c53f25b668
radeonsi: kill 16-bit VS outputs if PS doesn't use them or doing Z-only draw
...
The kill_outputs logic uses our internal IO indices. Just add indices for
16-bit varyings. We don't have enough free indices to use, but we can reuse
the indices that GLES doesn't have. Those are all the legacy desktop GL
varyings.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9051 >
2021-04-13 21:10:43 -04:00
Marek Olšák
5efdf4afac
radeonsi: optimize and legalize 16-bit samplers
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9051 >
2021-04-13 21:10:43 -04:00
Marek Olšák
9fa0f5f1ba
radeonsi: implement 16-bit VS inputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9051 >
2021-04-13 21:10:43 -04:00
Marek Olšák
7db43960f6
radeonsi: implement 16-bit VS->PS varyings
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9051 >
2021-04-13 21:10:43 -04:00
Marek Olšák
1dff495057
ac/llvm: implement 16-bit packed VS outputs and FS inputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9051 >
2021-04-13 21:10:43 -04:00
Adam Jackson
80b67a3b44
glx: Lift sending the MakeCurrent request to top-level code
...
Somewhat terrifyingly, we never sent this for direct contexts, which
means the server never knew the context/drawable bindings. To handle
this sanely, pull the request code up out of the indirect backend, and
rewrite the context switch path to call it as appropriate. This
attempts to preserve the existing behavior of not calling unbind() on
the context if its refcount would not drop to zero.
Of course, you can't just do this indiscriminately, because this is GLX
and extant X servers have bugs and everything is terrible. To wit:
- For 1.20.x prior to 1.20.6, you can bind a direct context once, but
the second time you try to modify the context's binding you will get
GLXBadContextTag. This includes unbinding the context. And "deleting"
the context will leak memory, because it will still appear to be
current.
- For 1.19 and earlier, glXMakeCurrent(dpy, None, ctx) should be legal
for GL 3.0+ contexts, but the server will throw BadMatch.
To guard against this, we only send the request for indirect contexts
unless the server is known good, and only mention one context at a time
in such a request; if switching between contexts, we first unbind the
old, and then bind the new. Note that the second VendorRelease() version
is to catch XFree86 4.x and Xorg [67].x, which almost certainly have the
above bugs. Other servers might report different version numbers here,
but we can't do direct rendering against them, so this should be safe.
Fixes : mesa/mesa#4418
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992 >
2021-04-13 22:58:58 +00:00
Adam Jackson
b8236bcb74
glx: Be more robust against null fbconfigs
...
These can happen along the internal paths for no-config contexts, and we
shouldn't crash.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992 >
2021-04-13 22:58:58 +00:00
Adam Jackson
a2b474c333
glx: Move {Bind,Release}TexImage from context to screen vtable
...
All the other operations on drawables live there, be consistent.
Acked-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992 >
2021-04-13 22:58:58 +00:00
Adam Jackson
e8d10a15f1
glx: Don't pointlesly add -D_REENTRANT to libGL's cflags
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992 >
2021-04-13 22:58:58 +00:00
Adam Jackson
b1cb0af596
glx: Remove some #if 0'd DRI config attribute fetch
...
We've never read any of this out. The transparency stuff we've never
implemented and the shift/mask stuff doesn't vary independently enough
to need to match on.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992 >
2021-04-13 22:58:58 +00:00
Adam Jackson
2f9dd41701
glx: Clean up fbconfig attribute handling
...
Move the macros defining the expected number of attributes into the same
file as their consumer, remove a pointless maximum, and allocate more
space for attribs on the stack to avoid malloc in the common case.
glxext.c knows about 46 config attribs, 46 - 18 = 28, round up to 32 to
future proof a bit.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992 >
2021-04-13 22:58:58 +00:00
Adam Jackson
a7474f19d4
glx: Default sRGBCapable in the same place as the other config attribs
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9992 >
2021-04-13 22:58:58 +00:00
Mike Blumenkrantz
dc265008c7
aux/trace: use ralloc_free for ralloc()ed state pointers
...
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10221 >
2021-04-13 18:26:20 -04:00
Iván Briano
8328989130
intel, anv: propagate robustness setting to nir_opt_load_store_vectorize
...
Closes #4309
Fixes dEQP-VK-robustness.robustness2.*.readonly.*
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10147 >
2021-04-13 13:30:09 -07:00
Jason Ekstrand
e6c79329dd
intel: fix querying mip levels on null surfaces on SKL and prior
...
When a surface of type SURFTYPE_NULL is accessed by resinfo, the MIPCount
returned is undefined instead of 0.
Closes #4309
Fixes dEQP-VK.robustness.robustness2.*.sampled_image.*.null_descriptor.*
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10147 >
2021-04-13 13:30:09 -07:00
Ella-0
a18ac347cf
glsl: build without bison
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8739 >
2021-04-13 19:12:48 +00:00
Alyssa Rosenzweig
e7977b8c49
docs: Add some notes on building for macOS
...
I intend this page to grow as I explore more about Mesa/Darwin.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10152 >
2021-04-13 19:09:13 +00:00
Daniel Schürmann
b6a28aaa8b
aco/cssa: don't create parallelcopies for constants and exec
...
if we are able to spill these directly.
Totals from 4913 (3.60% of 136546) affected shaders (Raven):
SpillSGPRs: 16021 -> 15451 (-3.56%); split: -3.87%, +0.31%
CodeSize: 58102020 -> 57371464 (-1.26%); split: -1.26%, +0.00%
Instrs: 11411454 -> 11230105 (-1.59%); split: -1.59%, +0.00%
Latency: 555706331 -> 550058635 (-1.02%); split: -1.07%, +0.05%
InvThroughput: 273023354 -> 271854469 (-0.43%); split: -0.44%, +0.01%
SClause: 385168 -> 385371 (+0.05%); split: -0.01%, +0.06%
Copies: 1342084 -> 1175762 (-12.39%); split: -12.40%, +0.01%
Branches: 392619 -> 378662 (-3.55%); split: -3.56%, +0.00%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
18ba93e673
aco/cssa: rewrite lower_to_cssa pass
...
The previous pass was based on misconceptions and
rounded up with bug fixes. The new pass is entirely
rewritten and basically just one-to-one from the paper:
"Revisiting Out-of-SSA Translation for Correctness, CodeQuality, and Efficiency"
by B. Boissinot et al.
It also incorporates the value-equality testing.
The regressions are mainly due to creating parallelcopies for
exec phis at loop headers (mitigated in the next commit).
Totals from 4933 (3.61% of 136546) affected shaders (Raven):
SpillSGPRs: 16249 -> 16527 (+1.71%); split: -0.28%, +1.99%
SpillVGPRs: 1771 -> 1595 (-9.94%)
CodeSize: 57544436 -> 58280304 (+1.28%); split: -0.00%, +1.28%
Scratch: 176128 -> 179200 (+1.74%)
Instrs: 11265783 -> 11445884 (+1.60%); split: -0.00%, +1.60%
Latency: 552596156 -> 555880540 (+0.59%); split: -0.53%, +1.13%
InvThroughput: 271431862 -> 273097423 (+0.61%); split: -0.18%, +0.79%
VClause: 160240 -> 160241 (+0.00%); split: -0.02%, +0.02%
SClause: 386863 -> 386685 (-0.05%); split: -0.07%, +0.02%
Copies: 1180801 -> 1345633 (+13.96%); split: -0.02%, +13.98%
Branches: 379129 -> 393052 (+3.67%); split: -0.01%, +3.69%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
9d73a4a412
aco: add new reindex_ssa() pass
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
d75c73e6a6
aco: fix kill flags on phi operands
...
Fossil-db changes are likely due to how the CSSA pass works.
Totals from 1782 (1.31% of 136546) affected shaders (Raven):
CodeSize: 25333292 -> 25294020 (-0.16%); split: -0.16%, +0.00%
Instrs: 4916059 -> 4908218 (-0.16%); split: -0.16%, +0.00%
Latency: 282860167 -> 282707176 (-0.05%); split: -0.08%, +0.03%
InvThroughput: 136487564 -> 136394958 (-0.07%); split: -0.12%, +0.05%
VClause: 74791 -> 74795 (+0.01%)
Copies: 542115 -> 534280 (-1.45%); split: -1.48%, +0.04%
Branches: 168977 -> 168966 (-0.01%); split: -0.01%, +0.01%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
13e4fed01f
aco: lower p_spill with constants correctly
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
4a57787006
aco/spill: use correct next_use_distances at loop header
...
To decide which variables to spill, we must use the distances at the
beginning of the loop-header, and not the distances at the end of the
loop-preheader. The difference are that the former includes phis which are
viable to be spilled as opposed to the phi operands which would be reloaded
by add_coupling_code(), ending up in potentially too high register pressure
before the loop.
Totals from 206 (0.15% of 136546) affected shaders (Raven):
SpillSGPRs: 5154 -> 5000 (-2.99%)
CodeSize: 3654072 -> 3647184 (-0.19%); split: -0.19%, +0.00%
Instrs: 701482 -> 700526 (-0.14%); split: -0.14%, +0.00%
Latency: 40988780 -> 40872506 (-0.28%); split: -0.29%, +0.00%
InvThroughput: 20364560 -> 20306006 (-0.29%)
SClause: 20192 -> 20198 (+0.03%)
Copies: 77732 -> 77688 (-0.06%); split: -0.08%, +0.03%
Branches: 24204 -> 24050 (-0.64%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
b56ea19111
aco/spill: refactor live-in registerDemand calculation
...
This also fixes some hypothetical issue for loops without phis
and for loops with higher register pressure at the end of the
loop preheader.
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
282eacc3e0
aco/spill: refactor some more spill decision taking
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
dfb10e4f4b
aco/spill: don't count phis as variable access
...
This increases the chance of evicting phis
if these have longer next-use distances.
Totals from 6 (0.00% of 146267) affected shaders (Navi10):
CodeSize: 476992 -> 464388 (-2.64%)
Instrs: 81785 -> 79952 (-2.24%)
VClause: 2380 -> 2374 (-0.25%)
Copies: 26836 -> 25131 (-6.35%)
Branches: 2494 -> 2492 (-0.08%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
b2a6346df7
aco/spill: spill phi constants and exec directly to VGPR
...
This lets us avoid some CSSA copies.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
99936d7142
aco/spill: reload spilled exec masks directly to exec
...
This handles the case of
exec = p_linear_phi %a, %b
where %a or %b might have been spilled.
By directly reloading these variables into the exec mask register,
we can avoid additional CSSA parallelcopies.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
beb292343a
aco/spill: refactor spill decision taking
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Boris Brezillon
17429b8ad4
panfrost: Pass a tile enable map to avoid reloading untouched tiles
...
We only do that when there are more than one damage rectangle and the
number of tiles to reload is significantly lower than the total number
of tiles covered by the damage extent, otherwise the overhead of the
TEM read might defeat the optimization that we might get from using one.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
988b0d2863
panfrost: Kill the old tile-buffer preload logic
...
Now that the gallium driver uses the pan_preload() helpers we can get
rid of the code in pan_blit.c and all its dependencies.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
ff3eada7eb
panfrost: Use the generic preload and FB helpers in the gallium driver
...
We also rework the code to have the FB descriptor shared by the tiler
and fragment jobs, instead of allocating a separate FB descriptor for
tiler jobs.
The new implementation seems to fix a few dEQP failures on T720.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
d7008a6d7b
panfrost: Fix partial update
...
The KHR_partial_update spec says:
"
If EGL_EXT_buffer_age is supported, the contents of the buffer inside
the damage region may also be relied upon to contain the same content
as the last time they were defined for the current back buffer.
"
but we currently assume that everything inside the damage region will
be overwritten by new data and that the previous content doesn't need
to be reloaded.
Let's get rid of the damage rect inversion logic for now and reload
everything inside the damage extent. We will optimize things further
down the line, using pre-frame DCDs on Bifrost, and a tile enable map
on Midgard.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
8ba2f9f698
panfrost: Create a blitter library to replace the existing preload helpers
...
pan_blitter.c is meant to replace the pan_blit.c which currently
provides helpers to preload the tile buffer. Some changes
are worth mentioning:
- we use pre-frame DCDs on Bifrost (Midgard still uses a tiler job
to preload the tile buffer)
- the blit shaders are now stored in a hash table and created lazily
- we now cache blend shader binaries and blit RSDs too
This library will soon be extended to cover regular blits.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
a11807b795
panfrost: Always pass a non-NULL screen to set_damage_region()
...
We will soon have a different handling for Bifrost, and we need to know
which GPU we're targeting to choose the right path.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
c5d6abae5b
panfrost: Extend pan_fb_info to allow passing pre/post frame DCDs
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
c52c3e2424
panfrost: Extend pan_fb_info to allow passing a tile enable map
...
We will use this tile enable map to implement KHR_partial_update and
replace the current solution where the preload process is done by
inverting damage regions, merging the resulting inverted regions and
issuing preloading draws for those rectangles.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
96b71a59c0
panfrost: Decode pre/post frame DCDs
...
Bifrost FB descritptors can be attached 3 DCDs describing pre/post frame
operations (pre frames DCDs can be used to preload the tile buffers).
Decode them when mode != NEVER.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
9f1bbced3c
panfrost: s/pandecode_vertex_tiler_postfix_pre/pandecode_dcd/
...
We will soon use this function to decode pre/post frame DCDs which are
not part of a job descriptor.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
9d7a5a6b75
panfrost: Add the early ZS pre frame mode
...
We will use that one when preloading ZS buffers.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
bacd9df8de
panfrost: Add align info to the draw and draw padding definitions
...
Needed if we want to allocate pre/post frame draw descriptors.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
25f948d4d9
panfrost: Add an helper to emit fragment jobs
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
387f8c037d
panfrost: Add various helpers to simplify FB desc emission
...
Now that image and image views are gallium-agnostic and contain enough
information, we can provide generic helpers to emit FB descriptors and
their dependencies, thread storage and tiler descriptors.
This helpers will be re-used in the Vulkan driver.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
0fc7c1f971
pan/midg: Use the sampler index passed to the texture instruction
...
Sampler index and texture index can differ.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
477c67d79e
panfrost: Pass a const device to panfrost_sample_positions()
...
This function doesn't modify the dev object, we can constify this
argument.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
e23cbac70e
panfrost: Provide a helper to retrieve image surface pointers
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
af34e29f15
panfrost: Provide a helper to calculate the polygon list size
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
f5d7c419e7
panfrost: Pass an image view to panfrost_new_texture()
...
pan_image_view contains everything we need to emit a texture
descriptor. Pass this object instead of the dozen of arguments
we have now.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
9d0ad7fd2e
panfrost: Patch the gallium driver to use pan_image_layout_init()
...
Now that we have a generic implementation, we can use it and get rid
of panfrost_setup_layout().
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
051d62cf04
panfrost: Add a pan_image_layout_init() helper
...
We will need it for Vulkan.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
f1d4df1cd7
panfrost: Move special Z32_S8X24 case out of panfrost_setup_layout()
...
We are about to move the panfrost_setup_layout() logic out of the
gallium driver, and the Z32_S8X24 split is not mandatory (some GPU
support this format natively). Let's move this special case out of
panfrost_setup_layout() and patch the format of the first plane
instead.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
50f39908aa
panfrost: Move out-of-band CRC info to pan_image
...
We already have the data BO stored there, let's move the out-of-band
CRC BO too. We also add a CRC mode to pan_image_layout so we can easily
know where the CRC resides.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
1c7e8a1692
panfrost: Add an offset field so we can attach a sub-buffer to an image
...
Needed for Vulkan.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
8bd70ea6ea
panfrost: Split pan_image in two
...
Move the image view bit out of pan_image and create a separate
pan_image_view struct. Once this is done we can embed a pan_image
object in panfrost_resource which will be referenced by the image
view that we pass to panfrost_load_{midgard,bifrost}().
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
cfe9bca912
panfrost: Add extra info to the pan_image_layout struct
...
This means duplicating some of the bits we already have in the
pipe_resource object embedded in panfrost_resource, but if will also
allow us to move some code out of the gallium driver without requiring
copy those fields every time we call a generic helper.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
efcb1e494b
panfrost: Stop passing a depth > 1 when creating 2D textures
...
The depth field is ignored if dim != 3D, but it's a bit confusing.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
5d7c244c07
panfrost: Add a format field to pan_image_layout
...
We will need this information at the layout level if we want to move
some of the code out of the gallium driver and share it with the
Vulkan driver. Let's get rid of panfrost_resource.internal_format which
basically encodes the same thing.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
3f8cebee09
panfrost: Move image states out of pan_image_layout
...
The layout is supposed to encode image miplevels/surfaces layout, not
the state data stored in the buffers. It doesn't matter for a gallium
driver, since resources are expected to hold both a layout and a state,
but Vulkan is a bit different. In Vulkan, the image state is explicitly
passed by the user when starting a render pass (vkCmdBeginRenderPass()),
and might evolve depending on the operation done in this render pass.
This state is not effective until the command buffer is queued and
executed. For these reasons, keeping the image state attached to the
VkImage object is not an option, but we'd still like to re-use the
layout and state objects, and all common helpers acting on those objects.
Let's move the state bits out of the layout to make that possible.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
b00b6a727c
panfrost: s/panfrost_slice/pan_image_slice_layout/
...
We are about to move slice states out of the panfrost_slice object,
but before we do that, let's rename the existing struct to reflect what
this object refers to.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10033 >
2021-04-13 18:06:37 +00:00
Connor Abbott
ed20e69b0c
vtn: Handle ZeroExtend/SignExtend image operands
...
These decorations allow you to override the signedness of image
instructions. This means that we have to override the type we get from
the sampled image.
Apparently both Intel and AMD get the type from the descriptor rather
than the instruction, but this appears to not be the case with Adreno,
which is why this wasn't noticed until now. So this probably won't fix
any preexisting bugs, but it's required to fix
dEQP-VK.image.extend_operands_spirv1p4.* when exposing VK_KHR_spirv_1_4
on turnip.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7968 >
2021-04-13 17:41:27 +00:00
Lucas Stach
07546c69b0
Revert remaining half of "gallium/dri2: Pass the resource that corresponds to the plane"
...
As documented in 6ec7e0d406 (gallium: document convention for get_handle
calls on multi-planar resources) it's the drivers responsibility to walk
the chain of resources for multi-planar resources. The get_handle interface
should always be called with the base resource by the frontend.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Acked-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10212 >
2021-04-13 16:40:04 +00:00
Juan A. Suarez Romero
cbb1e2dcac
v3dv: fix assertion
...
Ensure subpass_idx has a valid value; we use "-1" as invalid one.
Fixes CID#1468096 "Macro compares unsigned to 0 (NO_EFFECT)"
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/10203 >
2021-04-13 16:24:37 +00:00
Juan A. Suarez Romero
d69d8817c9
v3d: use GS_BIN inputs as VS_BIN outputs
...
When creating the Vextex Shader bin, only store outputs that will be
read later as inputs by the Geometry Shader bin.
This fixes
KHR-GLES31.core.geometry_shader.rendering.rendering.lines_input_triangle_strip_output_line_loop_drawcall
(exposed by previous commit).
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/10129 >
2021-04-13 16:08:00 +00:00
Juan A. Suarez Romero
64943f2063
broadcom/compiler: use VPM offsets in GS load_per_vertex input
...
Vertex Shader has a store_out lowering pass that converts gallium driver
locations in offsets inside the VPM.
One of the consequences is that these offsets are consecutives; that is,
if the VS stores VARYING_SLOT_VAR0.xyz and VARYING_SLOT_VAR1.xyzw, there
isn't a hole in the VPM offsets for the un-stored VARYING_SLOT_VAR0.w.
Thus we need to change how the VPM offset is computed in the Geometry
Shader when loading the inputs.
This bug is exposed by !9050 .
v2 (Iago):
- Include explanatory comment.
- Use assert.
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/10129 >
2021-04-13 16:08:00 +00:00
Bas Nieuwenhuizen
61a1a385d3
radv: Re-enable retiling.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10037 >
2021-04-13 12:08:24 +00:00
Juan A. Suarez Romero
515ffe4af4
ci/broadcom: use SNMP to turn on/off devices
...
So far we were using a telnet-based script to communicate with the PoE
Switch to turn on/off the network ports the DUTs are connected.
But this script does not seem very reliable because from time to time the
switch fails to execute the steps in the script.
As the PoE Switch we use is a smart one with support for SNMP protocol,
it would be easier to use it to handle it, which allows to turn on/off
the ports without going through the nasty telnet steps
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9954 >
2021-04-13 13:16:26 +02:00
Samuel Pitoiset
3720c6a6f6
radv: fix needed dynamic state for VRS
...
If the pipeline struct isn't found, the state might still be dynamic.
Cc: mesa-stable
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/10193 >
2021-04-13 08:48:42 +02:00
Erik Faye-Lund
437ed05708
compiler/glsl: do not cast struct to string
...
When formatting the error here, we're currently casting an
ast_type_qualifier as a string.
But we don't need to use a string here at all, because we know from
context exactly what qualifier we're talking about, because the
if-statements explicitly check for the uniform-qualifier.
So let's just hard-code the format-string to reference the right
qualifier instead of the string-shenanigans. The latter cannot do the
right thing.
Fixes: 2d03f48a65 ("glsl: Add parsing for GLSL uniform blocks.")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9911 >
2021-04-13 06:16:41 +00:00
Erik Faye-Lund
2a984da18e
compiler/glsl: drop rogue argument to _mesa_glsl_error
...
This arugment is not present int the format-string, so we shouldn't pass
it to _mesa_glsl_error either.
Noticed by Coverity.
Fixes: 02dc74fbd7 ("glsl: parse invocations layout qualifier for ARB_gpu_shader5")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9911 >
2021-04-13 06:16:41 +00:00
Marek Olšák
a0718e8977
st/mesa: fix nir_lower_io if it's done right after IO vectorization
...
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
d7250b0b08
gallium: add PIPE_SHADER_CAP_FP16_CONST_BUFFERS for FP16 uniforms
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
b19a836413
glsl: lower mediump uniforms to FP16 based on an option
...
Everything else is done - just allow it.
v2: update lower_precision_test.py
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com > (v1)
Reviewed-by: Eric Anholt <eric@anholt.net > (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
43270e24b9
mesa: implement glGetActiveUniform for FP16 uniforms
...
We must return the types before lowering to 16 bits.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
d6f3ca95b3
mesa: implement glGetUniform for FP16 uniforms
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
6bf18fe036
mesa: implement glUniform for packed FP16 uniforms
...
Let's just say that this passes dEQP.
If you think the _mesa_float_to_half conversions are costly, you can
enable FP16 uniforms only if the CPU supports F16C, which is fast.
Drivers will control whether this is used, not common code.
ARM will need something that is equivalent to F16C.
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
6604aa2606
glsl: pack 16-bit uniforms in the NIR linker
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Alyssa Rosenzweig
5d32cf642f
nir: Add varying precision linking helper (v2)
...
It is useful for the precisions of varyings to match across shader
stages at link-time to enable precision lowering optimizations, which
would otherwise require costly draw-time fixups.
The goal is to enable `producer->precision == consumer->precision` to be
an invariant drivers may rely on for linked shaders.
v2: keep transform feedback outputs at mediump - mareko
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com > (v1)
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
fb29cef8dd
nir: add many passes that lower and optimize 16-bit input/outputs and samplers
...
Added:
* a pass that renumbers bases of IO intrinsics
* a pass that converts mediump IO to 16 bits, optionally using the new
packed varying slots
* a pass that sets (forces) mediump in IO intrinsics (for testing)
* a pass that remaps VARYING_SLOT_VAR[0..15]_16BIT to VARYING_SLOT_VAR[0..31]
(if some shader stages don't want packed varyings)
* a pass that folds type conversions around texture opcodes into those
opcodes (e.g. tex(f2f32(coord), ..) is changed into tex accepting f16)
* a pass that changes (legalizes) sampler src and dst types based on specified
hw constraints (e.g. derivatives must be the same type as coordinates)
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
73f532e5bf
nir: add new VARYING_SLOTs and shader info for packed 16-bit varyings
...
This allows mediump inputs and outputs to be trivially lowered into packed
16-bit varyings where 1 slot is occupied by 2 16-bit vec4s, without any
packing instructions in NIR and without any conflicts with 32-bit varyings.
The only thing that is changed is IO semantics in intrinsics to get packed
16-bit varyings.
This simplifies supporting 16-bit types for drivers that have 32-bit slots
everywhere except the fragment shader where they can do 16-bit interpolation
on either the low or high half of each slot.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
5f7c7c9a7f
nir: add src and dest types to all IO loads and stores for mediump
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
e06cbff50e
compiler: move TEXTURE_COORD/VERTEX_GENERIC_ATTRIB limits into shader_enums.h
...
because they are used there.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Jesse Natalie
4b69ae8e1e
nir_opt_deref: ptr_as_array(deref_cast<T*>(x))[0] isn't the same as x[0] if the cast has alignment
...
This breaks CLOn12's handling of CL CTS test_basic vector_creation for char3 (at least).
Removing this cast causes us to try to load from a deref with no alignment info.
Fixes: 99bb2a4d ("nir/opt_deref: Don't remove casts with alignment information")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10165 >
2021-04-13 03:40:23 +00:00
Jesse Natalie
70aefe3449
vtn: Support scoped control barriers for OpenCL too
...
The current handling for SPIR-V memory semantics is very specific to
the wording in the SPIR-V spec, which breaks its handling of OpenCL
(compared to what we had working downstream before merging upstream).
Update/relax the logic here to support CL's barrier(CLK_GLOBAL_MEM_FENCE);
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10165 >
2021-04-13 03:40:23 +00:00
Marek Olšák
f9b527a9a5
radeonsi: unify internal compute with SSBOs in si_launch_grid_internal_ssbos
...
just deduplicate the code
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
ec60526035
radeonsi: move binding the internal compute shader into si_launch_grid_internal
...
instead of doing it in each function
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
aa8a6e5f26
radeonsi: enable DCC for MSAA 4x and 8x on gfx9
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
3120113ee7
radeonsi: implement DCC MSAA 4x/8x fast clear using DCC equations on gfx9
...
MSAA 4x and 8x should only clear the first 2 samples because other samples
are uncompressed. The compute shader only clears that subset of DCC.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
8b95f51ef1
radeonsi: fix and enable full DCC with MSAA 2x on gfx9
...
This enables fast clear with any clear color (not just 0/1) for bpp >= 32.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
7e68fae25f
ac,radeonsi: rewrite DCC retiling without the DCC retile map
...
The retile map is removed and replaced by direct DCC address computations
in the retile shader using the new function ac_nir_dcc_addr_from_coord.
The RADV code is disabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
35adf91de7
ac/surface: limit the number of swizzle modes that can have displayable DCC
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
5ce8c440dd
ac/surface: add a test of DccAddrFromCoord prototype outside of addrlib
...
The test takes over 2 minutes on a 12C/24T CPU with OpenMP.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
cd2832ee51
meson: add an optional OpenMP dependency for AMD tests
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
df2cbdd2e3
amd/addrlib: expose DCC address equations to drivers
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
8771d45a74
ac/surface/tests: fix a random segfault in the modifier test
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
23b2cf032a
ac/surface/tests: test Sienna Cichlid and Navy Flounder
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
1b3dbde3b9
ac/surface: only apply the 3D swizzle mode tuning to gfx10+
...
This fixes an addrlib failure on gfx9.
Fixes: b43f40166c "ac/surface: select best swizzle mode for 3D sampler performance"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
ec42f52013
radeonsi: allow DCC_DECOMPRESS via CB with MSAA textures
...
The shader-based codepath doesn't support it.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
8277732358
radeonsi: try to fix DCC coherency issues with DCC decompression
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
f7c58559f5
radeonsi: refine fast clears for small buffers, always use them for large HTILE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
06b6af596c
radeonsi: do Z-only or S-only HTILE clear using a compute shader doing RMW
...
This adds a clear_buffer compute shader that does read-modify-write to
update a subset of bits in HTILE.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
84fa21a611
radeonsi: when transitioning to TC-compat HTILE, try to do a proper clear
...
instead of always clearing to uncompressed.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
558ab3310d
radeonsi: enable DCC fast clears for non-zero mipmap levels and 0/1 clear values
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
9defe8aca9
radeonsi: implement fast Z/S clears using clear_buffer on HTILE
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
e2714d5dd4
radeonsi: indent the code for TC-compatibility HTILE transition
...
So that HTILE clears can be nicely inserted into a new else statement there.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
fcd01ad444
radeonsi: add si_can_fast_clear_depth/stencil helpers
...
for later use
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
4dd8d58ad5
radeonsi: clean up some mess around htile_stencil_disabled
...
Set the final value in si_texture_create_object, so that other places
don't have to derive it redundantly.
The only thing to remember is that HTILE stencil can be enabled when
stencil is not present, and it can be disabled when stencil is present
due to various workarounds.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
bcd1a69f79
radeonsi: parallelize Z/S conversion into TC-compatible with fast color clears
...
It's not really a fast clear, but it's the next logical step towards doing
HTILE clears here.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
fb72d41b18
radeonsi: implement Z/S fast clear for non-zero mipmap levels
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
6434b0b652
radeonsi: implement per-level DCC and CMASK fast clears for gfx10+
...
Fast clears are only used for level 0. This enables clearing level 0
of CMASK and DCC on gfx10+ when there are multiple mipmap levels.
vi_dcc_clear_level can also clear any level now.
Mipmapped array textures are still cleared slowly.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
059f042fb1
radeonsi: allow trivial DCC clears for shared textures with DCC constant encode
...
This relaxes the existing restriction.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
c00b314ae4
radeonsi: restructure DCC disablement into a switch
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Marek Olšák
fa43d61953
radeonsi: don't cache FMASK transactions from CB in L2
...
FMASK is usually pretty large. It's better to leave the cache to shaders.
FMASK stores are still cached, but they can be evicted sooner, which is
the same as other color stores. Only DCC, HTILE, and CMASK are cached.
I haven't benchmarked this, but it seems like the right thing to do.
This only affected APUs.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003 >
2021-04-13 03:17:42 +00:00
Nanley Chery
bc1f715076
iris: Support I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC
...
With a resolution of 1600x1200, I measured FPS increases in:
* glxgears 18.04% +/- 0.65% (n=691)
* Nexuiz 3.58% +/- 0.09% (n=553)
compared to the master branch at commit
3f614c6f7c .
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9230 >
2021-04-13 02:53:11 +00:00
Nanley Chery
4785aad6a0
iris: Support RC_CCS_CC modifier in plane queries
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9230 >
2021-04-13 02:53:11 +00:00
Nanley Chery
f02951d727
iris: Support clear color plane imports for RC_CCS_CC
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9230 >
2021-04-13 02:53:11 +00:00
Nanley Chery
11a0584c48
isl: Describe I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC
...
v2. Simplify the diff. (Jason)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9230 >
2021-04-13 02:53:11 +00:00
Nanley Chery
7a69942d29
drm-uapi: Update drm_fourcc.h for new TGL modifier
...
Pull in the header from drm-next commit
32c3d9b0f51ee1e6bb0160496b97e50b5caca4d0. Among other things, this
brings in the I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9230 >
2021-04-13 02:53:11 +00:00
Nanley Chery
0092219cfe
iris: Set BO maps to NULL in bo_free
...
bo_free is called on external BOs when there are no objects left which
reference them. The function unmaps the address range associated with
any maps which occured. However, if the BO is busy (not idle), it
doesn't mark the pointer to the start address as invalid. This can lead
to a segfault later on.
At the end of bo_free, these BOs are still present in the handle hash
table. If such a BO is reused (i.e., when a DMABUF with the same handle
is reimported) and the driver attempts to get another mapping, the
bufmgr will incorrectly assume that the map pointer is still valid and
reuse it. This leads to a segfault. Set the pointer to NULL to mark it
as invalid.
Enables iris to run and pass the piglit test,
ext_image_dma_buf_import-reimport-bug.
Cc: mesa-stable
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9230 >
2021-04-13 02:53:11 +00:00
Mike Blumenkrantz
5a61a4dbfa
aux/trace: do deep dumps of fb state for triggered traces
...
having the full surface info available here is very useful
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10093 >
2021-04-13 02:04:22 +00:00
Mike Blumenkrantz
5ac3bb806b
aux/trace: dump current fb state on trigger-mode draw if it hasn't been seen yet
...
this info is important to have for a given frame, but it requires that the base
structs be copied and stored to the trace context for later use
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10093 >
2021-04-13 02:04:22 +00:00
Mike Blumenkrantz
5ecffaa7a6
aux/trace: enhance trigger mode to dump context states during bind
...
when dumping a single frame, the creation info for these states hasn't been
dumped yet, so always dump it during bind so it's visible
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10093 >
2021-04-13 02:04:22 +00:00
Chia-I Wu
51216d656d
venus: check vn_renderer_info::vk_xml_version
...
When crosvm does not support venus, it still advertises
VIRGL_RENDERER_CAPSET_VENUS but provides no or zeroed capset data.
vk_xml_version will be zero.
It is a good idea to verify vk_xml_version anyway.
v2: print required version suggested by Ryan
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10192 >
2021-04-13 01:03:52 +00:00
Eric Anholt
f86e0a519d
ci: bump bare-metal kernel to bring in an a530 stability fix
...
and while I'm here, drop a workaround for back when we had binary
snapshots of the a530 kernel without compression support.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10047 >
2021-04-13 00:40:56 +00:00
James Park
f3bd5f9590
amd: Hide drm_fourcc.h on Windows
...
Declare missing definitions instead.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9708 >
2021-04-13 00:24:02 +00:00
James Park
7dfc9e4431
amd: Hide amdgpu_drm.h on Windows
...
Declare missing definitions instead.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9708 >
2021-04-13 00:24:02 +00:00
Icecream95
821d68652d
panfrost: Add fast path for graphics work group computation
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10158 >
2021-04-12 23:53:41 +00:00
Icecream95
c8620005d2
panfrost: Align BO size to 4096 bytes
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10158 >
2021-04-12 23:53:41 +00:00
Icecream95
1b41707bbc
panfrost: Only add resource checksum BOs to the batch once
...
Previously panfrost_batch_add_bo was called MAX_MIP_LEVELS times on
the same batch.
Fixes: cbf68b21fb ("panfrost: Move checksum_bo to panfrost_resource")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10158 >
2021-04-12 23:53:41 +00:00
James Park
1aeebac4e6
ac/rgp: BSD elf library compatibility
...
Allow compilation on Windows using modified BSD elf library.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9210 >
2021-04-12 22:50:52 +00:00
Thong Thai
e62c7e7c6c
radeon: Add cropping to encoded H.265 when padding is used
...
Because the VCN encoder needs the surface to be memory aligned, the
resolution of the image passed to the encoder might be larger and have
extra padding added - this change crops the resulting output to
compensate for the extra padding that might have been added.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4559
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10137 >
2021-04-12 22:42:53 +00:00
Vasily Khoruzhick
77fdabdfa5
lima: limit number of draws per job
...
Otherwise we may hit tile heap size limit if an app issues too many
draws per job.
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10121 >
2021-04-12 22:34:12 +00:00
Vasily Khoruzhick
c8e80c24d4
lima: use passed surface to get mipmap level for reload, not cbuf
...
lima_pack_reload_plbu_cmd() can be used for either cbuf or zsbuf, so
use passed surface other using cbuf unconditionally.
Fixes: b8c31ac06d ("lima: fix glCopyTexSubImage2D")
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10121 >
2021-04-12 22:34:12 +00:00
Erico Nunes
b071d98c04
lima: increase epsilon for depthrange near == far
...
When the application sets depthrange near == far, lima inserts an
'epsilon' difference of decreasing 'near' by 1 unit, to prevent
application bugs.
For some specific values of depthrange this does not seem to be
sufficient, presumably due to precision limitations.
Increase the difference by also incrementing the 'far' distance in
this case, to further avoid bugs.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9933 >
2021-04-12 21:08:35 +00:00
Marek Olšák
faf10bd49d
ac/surface: use named "color and "zs" structures in unions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
468836317b
ac/surface: unify htile_* and dcc_* fields as meta_* fields
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
34fd07aa56
ac/surface: unify htile_levels and dcc_levels as meta_levels
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
b16c7b706f
ac/surface: pack radeon_surf better
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
988f148db3
ac/surface: overlap color and Z/S fields using a union in gfx9_surf_layout
...
to save space
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
ab00557685
ac/surface: pack alignments by storing log2 in radeon_surf
...
Only one bit is set in alignments, so store the bit offset (log2) and
change the type from uint32_t to uint8_t.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
cb016bb600
ac/surface: pack radeon_surf::num_htile_levels better
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
8837d1d833
ac/surface: pack gfx9_surf_layout:resource_type better to save 8 bytes
...
Yes, this saves 8 bytes. See pahole for yourself.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
4bd5f62966
ac/surface: pack gfx9_surf_meta_flags better
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
3f074d2f45
ac/surface: inline and reorder gfx9_surf_flags for better packing
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
48dbdc62bf
ac/surface: change legacy_surf_level::offset to 32-bit offset_256B shifted by 8
...
Images are always aligned to 256B (enforced by register and descriptor
fields) and limited to 40-bit addresses. This saves some space.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
bbda20bf29
ac/surface: overlap color and Z/S fields using a union in legacy_surf_layout
...
to save space
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Marek Olšák
2fd8018845
ac/surface: split dcc level info from surface_info to save space
...
stencil level info doesn't have DCC
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10083 >
2021-04-12 20:53:45 +00:00
Rhys Perry
e9dc3df868
nir/loop_unroll: fix is_indirect_load() with load_global
...
load_global only has one source.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Fixes: dfe429eb41 ("nir/loop_unroll: unroll more aggressively if it can improve load scheduling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10186 >
2021-04-12 20:28:57 +00:00
Jesse Natalie
eae264918c
CI: Enable -werror for Windows
...
Acked-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10157 >
2021-04-12 19:12:40 +00:00
Jesse Natalie
3b44d481e4
driconf: Remove default values from string driconf entries
...
None of the call sites pass a string here, which produces warnings
for MSVC, for not passing an argument to a macro which requires it.
Looks like GCC/clang stringize an unpassed argument to ""
Acked-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10157 >
2021-04-12 19:12:40 +00:00
Jesse Natalie
99dde83a3e
meson: For MSVC, suppress warnings generated by useless delayloads
...
LLVM's tools delayload some OS DLLs to improve process startup times,
but they put the delayload in the exported linker args that Meson picks
up and then applies to all libraries that link against LLVM. Since our
binaries don't link against the OS libs that are being delayloaded, that
generates a "useless delayload" warning.
Acked-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10157 >
2021-04-12 19:12:40 +00:00
Jesse Natalie
8cc3100226
microsoft/clc: Update unit test to always use COMMON state for buffers
...
New Windows versions have new debug validation warning that for resources that
aren't actually UPLOAD/READBACK (which these aren't, thanks to the
GetCustomHeapProperties call), initial state that's not COMMON doesn't actually
do anything, which causes these tests to all fail because they verify that
they don't produce debug layer messages.
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10190 >
2021-04-12 18:50:20 +00:00
Rhys Perry
0f2bf55c7e
nir/lcssa: fix nondeterminism in predecessor iteration
...
set_foreach()'s order on a list of nir_block * isn't deterministic, so we
need to sort the predecessor list.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3364 >
2021-04-12 18:17:19 +00:00
Rhys Perry
7050896be0
nir: add nir_block_get_predecessors_sorted() helper
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3364 >
2021-04-12 18:17:19 +00:00
Jason Ekstrand
21582016c5
anv: Make memory type and queue family pointers const
...
These point to data inside the instance so no one should be modifying
them.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10184 >
2021-04-12 18:09:27 +00:00
Leo Liu
544044b29e
radeonsi: replace the hard coded video decode and encode caps
...
For the caps of max_width, max_height and max_level with those
that are available via querying the kernel.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10095 >
2021-04-12 17:33:32 +00:00
Leo Liu
75a725e4c5
ac: add function for querying video capabilities
...
It will be used to query caps of decode and encode
for hardware AMDGPU supports
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10095 >
2021-04-12 17:33:32 +00:00
Leo Liu
012e84ac11
include/drm-uapi: bump AMDGPU headers
...
From drm-next:
commit 2cbcb78c9ee5520c8d836c7ff57d1b60ebe8e9b7
Merge: 06debd6e1b28 8c44390d8872
Author: Daniel Vetter <daniel.vetter@ffwll.ch >
Date: Fri Mar 26 15:52:01 2021 +0100
Merge tag 'amd-drm-next-5.13-2021-03-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-5.13-2021-03-23:
amdgpu:
...
UAPI:
- amdgpu: Add a new INFO ioctl interface to query video capabilities
rather than hardcoding them in userspace. This allows us to provide
fine grained asic capabilities (e.g., if a particular part is
bandwidth limited, we can limit the capabilities). Proposed userspace:
https://gitlab.freedesktop.org/leoliu/drm/-/commits/info_video_caps
https://gitlab.freedesktop.org/leoliu/mesa/-/commits/info_video_caps
...
Danvet: A bunch of conflicts all over, but it seems to compile ... I
did put the call to dc_allow_idle_optimizations() on a single line
since it looked a bit too jarring to be left alone.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
From: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324040147.1990338-1-alexander.deucher@amd.com
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10095 >
2021-04-12 17:33:32 +00:00
Leo Liu
a99d77e5be
ci: Fix meson-i386 build failed after libdrm bump version
...
libpciaccess-dev:$arch from STABLE_EPHEMERAL down to the main list of packages
in .gitlab-ci/container/cross_build.sh, and bumping the arm_build, i386_build,
ppc64el_build & s390x_build tags again.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Suggested-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
----
.gitlab-ci.yml | 8 ++++----
.gitlab-ci/container/cross_build.sh | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10095 >
2021-04-12 17:33:32 +00:00
Leo Liu
2c1e4c4baa
meson: bump drm amdgpu version to 2.4.105
...
To include the INFO ioctl query for video caps
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10095 >
2021-04-12 17:33:32 +00:00
Ilia Mirkin
1b06189f4a
nv50: enable ARB_framebuffer_no_attachments
...
This is a required part of ES3.1 and fairly trivial to enable. In
practice it's almost entirely useless since the only information one
would be able to obtain are queries.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10162 >
2021-04-12 16:45:40 +00:00
Ilia Mirkin
97d61ae771
nv50/ir: fake SV_THREAD_KILL support
...
If we say that there are no helper invocations, it's suboptimal but
allows ES 3.1 to chug along.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10162 >
2021-04-12 16:45:40 +00:00
Ilia Mirkin
ea49c9dabc
nv50: emulate indirect draws
...
This is helpful for allowing ES 3.1 to work, as this is required.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10162 >
2021-04-12 16:45:40 +00:00
Ilia Mirkin
1baefe4119
nv50/ir: fix texture size for msaa textures
...
These are scaled up in the descriptor, which doesn't really know about
their MSAA-ness. So we have to shift them back down.
Cc: mesa-stable
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10162 >
2021-04-12 16:45:40 +00:00
Rhys Perry
723b000d27
radv: don't use fp16 for 8-bit division lowering before GFX9
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081 >
2021-04-12 16:19:46 +00:00
Rhys Perry
d8f12fd421
aco: fix 16-bit f2{u8,i8} on GFX6/7
...
Not really tested.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081 >
2021-04-12 16:19:46 +00:00
Rhys Perry
d0e15b8c22
aco: fix 16-bit u2f32
...
This shouldn't sign-extend.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081 >
2021-04-12 16:19:46 +00:00
Rhys Perry
254360d96c
nir/lower_idiv: make lowered divisions exact
...
I can't imagine any reasonable optimization which could break this, but
since it's lowered from an integer instructions, we shouldn't do anything
which could change the result.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081 >
2021-04-12 16:19:46 +00:00
Rhys Perry
a2619b97f5
nir/lower_idiv: add options to use fp32 for 8-bit division lowering
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081 >
2021-04-12 16:19:46 +00:00
Rhys Perry
7db8d307bc
radv: remove second nir_lower_idiv
...
nir_lower_idiv now lowers 8/16-bit divisions.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10081 >
2021-04-12 16:19:45 +00:00
Alyssa Rosenzweig
e00d94f14f
panfrost: Enable AFBC buffer sharing
...
This was hidden originally to workaround a bug in the RK3399 display
driver. The patch resolving this issue has been merged in the upstream
kernel, and in fact...
1. The issue was visible on 21.0 even with this workaround under certain
configurations (sway with an external monitor).
2. Even on buggy kernels, due to other platform details this is an
obscure bug to hit (not aware of any ways to trigger it OOTB with
current userspaces other than sway with an external monitor)
So why bother? Let's just delete the hack and let AFBC be used freely.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10148 >
2021-04-12 15:55:55 +00:00
Alyssa Rosenzweig
23b060bba7
panfrost: Fix AFBC body_size for shared resources
...
Accidental read-before-write due to incorrect statement ordering. I love
SSA as much as anyone, but not everything is a parallel copy.
Fixes faults in glamor in 21.0 when using GIMP on v5.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Fixes: e8b997e175 ("panfrost: Add AFBC slice.body_size and slice.{row,surface}_stride fields")
Closes : #4389
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10148 >
2021-04-12 15:55:55 +00:00
Mike Blumenkrantz
e52712a653
zink: disable mutable formats for zs formats and scanout images
...
swapchain images are never going to be used as texture views, and zs formats
aren't compatible with any other formats
this enables implicit modifiers in some cases, and more work can be done in the future
to eliminate mutable format usage to further improve performance
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10180 >
2021-04-12 15:37:46 +00:00
Mike Blumenkrantz
3622df7ab2
zink: flag anv for mesa image create wsi
...
the image creation wsi is used, but the memory creation wsi isn't
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10180 >
2021-04-12 15:37:46 +00:00
Mike Blumenkrantz
104603fa76
zink: create separate linear tiling image for scanout
...
rendering onto a linear-tiled image is unbelievably slow if any sort of
blending is enabled, so instead always render to optimal tiling and then
copy to linear for scanout
this doubles performance for now and can be deleted in its entirety along
with the rest of the related hacks once real wsi support is implemented
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10180 >
2021-04-12 15:37:46 +00:00
Juan A. Suarez Romero
e7f4f1b582
broadcom/compiler: use signed pointers for packed condition
...
`qpu.raddr_b` is an unsigned int, so it is always positive, even after
casting to signed int.
Fixes CID#1438117 "Operands don't affect result
(CONSTANT_EXPRESSION_RESULT)":
"result_independent_of_operands: (int)inst->qpu.raddr_b >= -16 is
always true regardless of the values of its operands. This occurs as
the logical first operand of "&&".
v2:
- Use signed pointers (Iago)
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/10131 >
2021-04-12 15:22:05 +00:00
Danylo Piliaiev
16fd5bd996
turnip: support copying both aspects of D32_SFLOAT_S8_UINT
...
We cannot copy both aspects at the same time, so copy them one by one.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10140 >
2021-04-12 14:36:30 +00:00
Jesse Natalie
c04b36de39
vtn: Add a cap for CL drivers to support read-write images
...
This is a required CL2.0, optional CL3.0 feature
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10181 >
2021-04-12 13:41:39 +00:00
Jesse Natalie
9f82399bf9
vtn: Don't warn about linkage capability if we're creating a NIR library
...
We've supported this for a while now for libclc
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10181 >
2021-04-12 13:41:39 +00:00
Mike Blumenkrantz
6a545e69d9
zink: make a bunch of descriptor functions static
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10177 >
2021-04-12 12:51:27 +00:00
Mike Blumenkrantz
344c4ab580
zink: move descriptor state management to descriptors.c
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10177 >
2021-04-12 12:51:27 +00:00
Pierre-Eric Pelloux-Prayer
8c6a64c9b0
radeonsi/rgp: export compute shader programs
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10105 >
2021-04-12 14:27:29 +02:00
Pierre-Eric Pelloux-Prayer
aa077ba3a2
radeonsi/rgp: export barriers
...
Wrap the si_cp_wait_mem call to emit RGP_SQTT_MARKER_IDENTIFIER_BARRIER_START and
RGP_SQTT_MARKER_IDENTIFIER_BARRIER_END events.
Only for gfx9+ for now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10105 >
2021-04-12 14:27:26 +02:00
Tomeu Vizoso
0e0dc669bd
Revert "ci: Disable panfrost t760"
...
The devices have been running KernelCI jobs for a good while without
glitches, let's reenable Mesa jobs on them now.
This reverts commit c6fbbbbf70 .
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10173 >
2021-04-12 13:19:23 +02:00
Tomeu Vizoso
44f0dbb724
Revert "ci: Disable panfrost g52"
...
The devices have been running KernelCI jobs for a good while without
glitches, let's reenable Mesa jobs on them now.
This reverts commit 40647fcc3d .
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10173 >
2021-04-12 13:19:19 +02:00
Tomeu Vizoso
113cb036c7
Revert "ci: Disable t720 LAVA jobs"
...
The maintenance window is closed.
This reverts commit 4fa9c35942 .
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10173 >
2021-04-12 13:19:05 +02:00
Tomeu Vizoso
10f05c9030
ci: Disable t720 LAVA jobs
...
As the devices providing the testing are going down due to a planned
maintenance window of 4 hours.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10167 >
2021-04-12 09:09:04 +02:00
Pierre-Eric Pelloux-Prayer
fd0480957b
vbo: inline vbo_primitive_restart in brw_primitive_restart
...
This is the only user of this code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10066 >
2021-04-12 07:36:36 +02:00
Pierre-Eric Pelloux-Prayer
2f1014e41d
st/draw: remove st_draw_vbo
...
Driver.Draw is now unused for Gallium drivers - except for st_cb_feedback which
sets its own Draw function.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10066 >
2021-04-12 07:36:28 +02:00
James Park
d32512effc
vulkan/util: Use util_bitcount
...
__builtin_popcount is not available on all compilers.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10159 >
2021-04-12 03:25:59 +00:00
Ilia Mirkin
80b96a2158
st/mesa: adapt for the case where buffers are not supported in frag
...
Some logic was tuned to buffers / atomics / images being supported in
frag stages in order to expose any support at all. Fix some of these
assumptions.
Signed-off-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/10161 >
2021-04-11 22:30:18 -04:00
Ilia Mirkin
0dfc5b5196
nv50/ir: fix emission of ld/st lock/unlock
...
This is necessary to implement shared atomics.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
d0fa6e066b
nv50/ir: avoid inlining results of a locked load
...
These are a bit special. Among other things, removing them will cause us
to potentially remove the load itself, defeating the purpose of the
locking. Also it's unclear whether it's legal to access the shared
memory directly when it's locked like this.
This only comes up on nv50, since on nvc0+, shared memory can't be
loaded from random ops.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
7052927ee4
nv50: fix expression for ucp offset
...
It doesn't matter since it's 0, but all the offsets are in bytes whereas
the method expects words. So adjust by 2.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
52172fded5
nv50/ir: fix emission of cas without a destination
...
We were previously dumping $r127 in there. This has a bad effect on
nv50, so make sure we allocate an actual register for it, even if
there's nothing using the result.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
a3b02fea7e
nv50/ir: fix emission of 16-bit add
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
fe93723aaa
nv50/ir: add support for 16-bit immediates
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
8a69efa171
nv50/ir: logic ops on half-regs can't take an immediate
...
There does not appear to be an instruction form for this. Prevent an
immediate from being loaded into place.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
afcd296b1b
nv50/ir: fix emission of shifts on half-regs
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
af8665c3a5
nv50/ir: fix emission of logic ops on half-regs
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
96e8e74813
nv50/ir: fix emission of cvt with half-reg destinations
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
c6b02c097f
nv50/ir: fix emitting movs from imm to short registers
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
2ff2d65799
nv50/ir: lower buffer to global
...
The idea is that buffers will be bound to the appropriate indices. That
means that we can just rename them to global.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
ee28cae1ef
nv50/ir: fix emission of RED
...
When the atomic result is unused, the opcode form needs to be a bit
different.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
1fad964553
nv50/ir: do not use inline offsets for global, ensure indirect access
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
3e99271163
nv50/ir: force shared memory indirect to be an address
...
The upstream logic will not end up using an address, so we have to force
it here. The other backends don't care either.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
d2a0aa5efe
nv50/ir: retrieve (n)ctaid.z from first user param
...
The driver is responsible for feeding this in.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
de71feccbf
nv50: pass in third axis via user param
...
This is probably not the most efficient way to go for all geometries,
but the assumption is that kernels tend to be x/y-heavy rather than
z-heavy. Iterates over each z slice and passes in the current value via
user param. (And bump all user params by a dword.)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:22 -04:00
Ilia Mirkin
c3e9be9b5a
nv50: add texture, constbuf, image, buffer validation
...
This makes compute mostly work. For now we're laying out images/buffers
in a fixed offset from each other in the globals "array", but this
should be done dynamically. We're also missing passing image info to
shaders, as well as adding image formats to a shader key.
Heavily inspired by nvc0 variants of these.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 12:31:14 -04:00
Ilia Mirkin
1a6a772527
nv50: implement memory barrier handling
...
With shader images / buffers, we can get more complex barrier requests.
This mirrors the logic in nvc0.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 11:47:42 -04:00
Ilia Mirkin
cd296c9f8c
nv50: add resource tracking for shader images and buffers
...
Heavily inpsired by the nvc0 code. Note that these only exist for the
compute stage, so there is no shared-based indexing.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 11:47:42 -04:00
Ilia Mirkin
ba6ba8c990
nv50: adapt texture and constbuf paths for compute shaders
...
This contains the logic updates necessary to perform necessary resource
tracking and emit update / flush commands for the relevant stages.
Inspired by some changes from Pierre Moreau.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 11:47:42 -04:00
Pierre Moreau
9abfd4ba18
nv50: Update texture indices to match stage indices
...
For legacy reasons, we were using the PIPE order, instead of the
hardware order. Reorder the stages to match the order of the
BIND_TIC/etc methods, and adjust internal usage to match.
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
[imirkin: fixed numbering, removed TODO comments]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 11:47:42 -04:00
Pierre Moreau
afe1472cde
nv50: Replace hardcoded texture/constbuf count with define
...
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299 >
2021-04-11 11:47:42 -04:00
Erico Nunes
2d6b7b2e0c
lima: enable rg formats for fp16 render
...
These were noticed by trial and error after fixing the fp16 render
setup.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9916 >
2021-04-11 10:06:50 +00:00
Erico Nunes
8393fad0de
lima: fix half float render
...
Format 0x26 is invalid, formats are in a 4 bit field so they repeat
in increments of 16.
Frame reg flags needs to set 0x01 to actually enable fp16.
The clear color setup is also a bit different for fp16, need to use
the 16 bit values in the first two clear color registers.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9916 >
2021-04-11 10:06:50 +00:00
Alyssa Rosenzweig
ba8737bb86
pan/bi: Determine block successors correctly
...
Fixes GPU timeouts in Google Maps.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Icecream95 <ixn@disroot.org >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10145 >
2021-04-11 02:05:31 +00:00
Mauro Rossi
492c8f1709
compiler/glsl: fix include for Android build
...
Sources outside of src/util path should include "util/string_buffer.h"
Fixes the following building error in Android:
external/mesa/src/compiler/glsl/ast_type.cpp:25:10: fatal error: 'string_buffer.h' file not found
^~~~~~~~~~~~~~~~~
1 error generated.
Fixes: eeec9d56ad ("compiler/glsl: clean up output")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10156 >
2021-04-10 20:33:52 +02:00
Matti Hamalainen
44ed8378bf
gallium/tools: update trace scripts to Python 3
...
Bring the scripts for parsing, dumping state and diffing of Gallium
trace files to modern day by updating them to Python 3.
Add option '-p' to some tools for outputting only plaintext
instead of ANSI / colorized format.
Also fix state parsing of some dumps by adding 'clear_render_target'
and 'get_disk_shader_cache' to ignored calls list.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4321
Signed-off-by: Matti Hamalainen <ccr@tnsp.org >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9830 >
2021-04-10 14:00:45 +00:00
Erik Faye-Lund
e7bece080f
zink: fix typo in function name
...
Suggested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10127 >
2021-04-10 09:48:38 +00:00
Erik Faye-Lund
6940d3ba05
zink: document scalarBlockLayout requirement
...
We're currently using uint arrays instead of uvec4 arrays for UBOs and
SSBOs, which requires scalarBlockLayout. Fixing this is a lot of work,
so let's just document it for now.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10127 >
2021-04-10 09:48:38 +00:00
Erik Faye-Lund
6a2ee3b17c
gallium/st: correct range for int16
...
This fixes the following dEQP tests:
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.lowp_uvec2_fragment
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.lowp_uvec4_fragment
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.mediump_uvec2_fragment
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.mediump_uvec4_fragment
Fixes: 1af8fe4ed5 ("gallium: add shader caps INT16 and FP16_DERIVATIVES")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Tested-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10128 >
2021-04-10 09:22:12 +00:00
Erik Faye-Lund
07a02a3390
gallium/st: correct range for float16
...
Fixes: b83f4b9fa2 ("glsl: Add an IR lowering pass to convert mediump operations to 16-bit")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10128 >
2021-04-10 09:22:11 +00:00
Erik Faye-Lund
a161cccd9b
glsl: tolerate int16 loop counters
...
When lowering precision on integers from GLSL ES, we can end up with
16 bit integer loop counters. So let's tolerate this as well.
This was probably not caught earlier because most NIR drivers disable
GLSL-level loop-unrolling, and no non-NIR driver sets LowerPrecisionInt16
to true. This was discovered while trying to wire up int16 support for
Zink, which doesn't currently disable GLSL loop-unrolling.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10125 >
2021-04-10 09:01:54 +00:00
Erik Faye-Lund
c64e2bf2c3
glsl: fix int16 type
...
This shouldn't be unsigned, or else we'll trigger asserts.
Fixes: 7f00d4dac8 ("glsl: Handle 16-bit types in loop analysis")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10125 >
2021-04-10 09:01:54 +00:00
Erik Faye-Lund
b718de746d
glsl: fix is_integer_16_32
...
This shouldn't check for 64-bit...
Fixes: a052a9c277 ("glsl: handle int16 and uint16 types and add instructions for mediump")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10125 >
2021-04-10 09:01:54 +00:00
Icecream95
0a7a61b2d7
panfrost: Only do point coord replacement for PIPE_PRIM_POINTS
...
Fixes rendering in Terraria on Midgard.
Thanks to macc24 for reporting this and to HdkR for pointing me to a
similar issue for virgl.
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10154 >
2021-04-10 16:56:39 +12:00
Jason Ekstrand
c43109c07b
anv: Use vk_object_alloc/free
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123 >
2021-04-10 02:18:02 +00:00
Jason Ekstrand
22478bb0e4
vulkan: Add a vk_object_multialloc helper
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123 >
2021-04-10 02:18:02 +00:00
Jason Ekstrand
2b19b7a165
anv: Clean up anv_semaphore::base on the error path
...
Fixes: 682c81bdfb "vulkan,anv: Add a base object struct type"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123 >
2021-04-10 02:18:02 +00:00
Jason Ekstrand
46749afe45
anv: Clean up anv_descriptor_pool::base on the error path
...
Fixes: 682c81bdfb "vulkan,anv: Add a base object struct type"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123 >
2021-04-10 02:18:02 +00:00
Jason Ekstrand
13036a62e4
anv: Refactor framebuffer creation
...
This avoids having the create call duplicated.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123 >
2021-04-10 02:18:02 +00:00
Jason Ekstrand
e20c653781
anv: Clean up anv_device_memory::base on failure
...
Fixes: 682c81bdfb "vulkan,anv: Add a base object struct type"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123 >
2021-04-10 02:18:02 +00:00
Bas Nieuwenhuizen
fcd8aaf07a
radv: Update editorconfig.
...
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10091 >
2021-04-10 03:31:58 +02:00
Bas Nieuwenhuizen
59c501ca35
radv: Format.
...
Using
find ./src/amd/vulkan -regex '.*/.*\.\(c\|h\|cpp\)' | xargs -P8 -n1 clang-format --style=file -i
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10091 >
2021-04-10 03:31:58 +02:00
Bas Nieuwenhuizen
8451b41022
radv: Add clang-format for AMD code.
...
Copied from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8883
with increased colum width as 80 really made a mess.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10091 >
2021-04-10 03:31:32 +02:00
Icecream95
51a812bb60
panfrost: Flush output after disassembling shaders
...
Fixes text printed to stderr appearing in the middle of disassembly
when piping stdout and stderr to the same place.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10088 >
2021-04-09 23:45:26 +00:00
Mauro Rossi
81513085e5
android: anv: fix build error in anv_android.c
...
Fixes the following building error:
external/mesa/src/intel/vulkan/anv_android.c:568:13: error: no member named 'stride' in 'struct anv_image_create_info'
anv_info.stride = gralloc_info->stride *
~~~~~~~~ ^
1 error generated.
Fixes: afd2f489d3 ("anv: Drop unused anv_image_create_info::stride")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10119 >
2021-04-10 00:44:30 +02:00
Mauro Rossi
496b04389b
android: anv: Remove anv_intel.c from Makefile.sources
...
Fixes the following building error:
clang: error: no such file or directory: 'external/mesa/src/intel/vulkan/anv_intel.c'
clang: error: no input files
Fixes: 5e6db19168 "anv: Remove vkCreateDmaBufINTEL (v4)"
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10119 >
2021-04-10 00:44:25 +02:00
Chia-I Wu
cd6f8ce4a7
ci: enable venus in some meson build jobs
...
Enable it in meson-{android,clang,vulkan,i386}.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10124 >
2021-04-09 21:55:19 +00:00
Lucas Stach
76c0217fb0
etnaviv: remove stale comment in etna_resource_copy_region
...
The comment about using the RS engine was correct before the code got
changed to use the 3D blitter and a fallback before etnaviv was merged
into upstream Mesa. It has been incorrect ever since. As it's just
adding confusion, instead of being helpful, remove it.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9310 >
2021-04-09 22:44:17 +02:00
Lucas Stach
171d7a3081
etnaviv: don't try to copy PIPE_BUFFER with the 3D engine
...
PIPE_BUFFER layout is incompatible with the 3D pipe, so don't try to
blit it via a 3D engine blit, but fall back to the software copy.
Fixes crashes in piglit tests arb_copy_buffer and arb_map_buffer_range.
Fixes: c9e8b49b88 (etnaviv: gallium driver for Vivante GPUs)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9310 >
2021-04-09 22:43:59 +02:00
Chia-I Wu
22ea985d70
venus: include individual venus-protcol headers
...
Include individual headers than vn_protocol_driver.h to save compile
time.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
01c46704ec
venus: split out vn_queue.[ch]
...
Move VkQueue, VkFence, VkSemaphore, and VkEvent functions to the new
files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
49a15148fa
venus: split out vn_device_memory.[ch]
...
Move VkDeviceMemory functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
ee399c265f
venus: split out vn_image.[ch]
...
Move VkImage{,View} and VkSampler{,YcbcrConversion} functions to the new
files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
d082addab9
venus: split out vn_buffer.[ch]
...
Move VkBuffer{,View} functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
e653dc7697
venus: split out vn_descriptor_set.[ch]
...
Move VkDescriptor{Pool,Set,SetLayout,UpdateTemplate} functions to the
new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
c3fbe3368b
venus: split out vn_render_pass.[ch]
...
Move VkRenderPass and VkFramebuffer functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
02e6164b08
venus: split out vn_query_pool.[ch]
...
Move VkQueryPool functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
8b6ed71cf1
venus: split out vn_pipeline.[ch]
...
Move VkShaderModule and VkPipeline{,Layout,Cache} functions to the new
files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
0433952153
venus: split out vn_command_buffer.[ch]
...
Move VkCommand{Pool,Buffer} functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
5a3f632373
venus: prepare for splitting vn_device.[ch]
...
Make virtqueue/ring sync functions available to other files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Chia-I Wu
41535aa80b
venus: update venus-protocol headers
...
This takes vn_protocol_driver_{structs,commands,calls}.h and split them
by Vulkan handle types. This enables us to split up vn_device.c in the
following commits without slowing down compile time too much.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117 >
2021-04-09 16:58:46 +00:00
Connor Abbott
ba796d5115
ir3/postsched: Make sure to schedule inputs before kill
...
Before, we would prefer to schedule inputs before kills, which works
assuming that the live range of the bary_ij system value don't get
split and therefore all bary.f are ready at the start of the block.
However live range splitting can mess up that assumption and cause a
kill to get scheduled before a move that leads to a bary.f.
This fixes even e.g. dEQP-GLES2.functional.shaders.discard.basic_always
on a3xx before introducing CSE of collect instructions, but even after
that it could be a problem theoretically as the register allocator
doesn't guarantee that any live ranges aren't split.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10143 >
2021-04-09 16:31:29 +00:00
Mike Blumenkrantz
e11df07e54
anv: fix debugoptimized build compile
...
this function is only needed for asserts
Fixes: 2e4c153c6b ("anv/image: Refactor check_memory_bindings()")
fixes #4599
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10141 >
2021-04-09 16:17:46 +00:00
Adam Jackson
b5c33174a1
dri: Use __DRI_BUFFER_COUNT consistently internally
...
These arrays were all sized with insufficiently large magic numbers,
which is probably not a good idea.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10142 >
2021-04-09 16:05:35 +00:00
Mike Blumenkrantz
17b5ca5869
zink: don't lose existing pNext when using wsi_image_create_info in image creation
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10138 >
2021-04-09 15:54:23 +00:00
Alexander von Gluck IV
d941df85ef
egl/haiku: Fix ConfigID naming inline with mesa
...
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9454 >
2021-04-09 15:29:41 +00:00
Jesse Natalie
3aa8cbc784
meson: Refuse to build lavapipe without llvmpipe
...
This config doesn't work, and as of recently it no longer links.
Let's fail it early.
Fixes: 7b79db11c2 ("lavapipe: enable correct workgroup sizing")
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10107 >
2021-04-09 14:52:30 +00:00
Matt Turner
4251e9cddf
ir3: Don't count (nopX) towards the wrong category
...
Prior to this commit
(nop3) mad.f32 r0.y, c0.x, r1.w, c0.y
was counted as 4 cat3 instructions (and still 3 cat0/nops) in shader-db
results. With this change, it is counted as only 1 cat3 instruction.
Probably never going to have better shader-db results than this in my
career:
total cat2 in shared programs: 1214667 -> 732058 (-39.73%)
cat2 in affected programs: 1194729 -> 712120 (-40.39%)
helped: 8551
HURT: 0
total cat3 in shared programs: 376448 -> 274745 (-27.02%)
cat3 in affected programs: 344918 -> 243215 (-29.49%)
helped: 7222
HURT: 0
Reviewed-by: Rob Clark <robdclark@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10116 >
2021-04-09 14:26:35 +00:00
Mike Blumenkrantz
0dfc076743
zink: only unmap PIPE_MAP_ONCE in synchronous mode
...
this flag cannot be used to infer that a transfer_map call will be matched
by a transfer_unmap call when tc reordering is active
fixes #4600
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10114 >
2021-04-09 13:41:44 +00:00
Mike Blumenkrantz
b7a0265c27
zink: handle checking batch completion from other contexts without timelines
...
if a batch state can't be found, it may exist on a different context, so the screen
value needs to be checked
if the screen value indicates that the batch hasn't completed and we're waiting,
force a flush so there's a fence that can be waited upon
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10115 >
2021-04-09 13:31:55 +00:00
Mike Blumenkrantz
fa36a16c68
zink: make timeline semaphores per-screen
...
I misread the spec, and it turns out timeline ids can't be reused across
semaphores. This is obvious in retrospect, but what can be done?
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10115 >
2021-04-09 13:31:55 +00:00
Samuel Pitoiset
1ad295ed6f
radv: allow to force VRS rates on GFX10.3 with RADV_FORCE_VRS
...
This allows to force the VRS rates via RADV_FORCE_VRS, the supported
values are 2x2, 1x2 and 2x1. This supports the primitive shading rate
mode for non GUI elements.
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/7794 >
2021-04-09 14:47:53 +02:00
Samuel Pitoiset
549f41754a
radv: use explicit VRS mode when configuring PA_CL_VRS_CNTL
...
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/7794 >
2021-04-09 14:47:52 +02:00
Lionel Landwerlin
ec6d9b7fb2
microsoft: fixup clc_log() define
...
The local msg variable shadows one of the argument of
SPIRVMessageConsumer making the error message "(null)".
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10133 >
2021-04-09 15:29:39 +03:00
Iago Toral Quiroga
0a3bfacabb
broadcom/compiler: rename unifa tracking fields
...
The term 'last' may be misleading because the offset represents
the current unifa offset, which is the offset used by the last
load plus 4 bytes, so rename these to use the term 'current'
instead.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100 >
2021-04-09 10:31:40 +00:00
Iago Toral Quiroga
8998666de7
broadcom/compiler: sort constant UBO loads by index and offset
...
This implements a NIR pass that groups together constant UBO loads
for the same UBO index in order of increasing offset when the distance
between them is small enough that it enables the "skip unifa write"
optimization.
This may increase register pressure because it can move UBO loads
earlier, so we also add a compiler strategy fallback to disable the
optimization if we need to drop thread count to compile the shader
with this optimization enabled.
total instructions in shared programs: 13557555 -> 13550300 (-0.05%)
instructions in affected programs: 814684 -> 807429 (-0.89%)
helped: 4485
HURT: 2377
Instructions are helped.
total uniforms in shared programs: 3777243 -> 3760990 (-0.43%)
uniforms in affected programs: 112554 -> 96301 (-14.44%)
helped: 7226
HURT: 36
Uniforms are helped.
total max-temps in shared programs: 2318133 -> 2333761 (0.67%)
max-temps in affected programs: 63230 -> 78858 (24.72%)
helped: 23
HURT: 3044
Max-temps are HURT.
total sfu-stalls in shared programs: 32245 -> 32567 (1.00%)
sfu-stalls in affected programs: 389 -> 711 (82.78%)
helped: 139
HURT: 451
Inconclusive result.
total inst-and-stalls in shared programs: 13589800 -> 13582867 (-0.05%)
inst-and-stalls in affected programs: 817738 -> 810805 (-0.85%)
helped: 4478
HURT: 2395
Inst-and-stalls are helped.
total nops in shared programs: 354365 -> 342202 (-3.43%)
nops in affected programs: 31000 -> 18837 (-39.24%)
helped: 4405
HURT: 265
Nops are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100 >
2021-04-09 10:31:40 +00:00
Iago Toral Quiroga
fb2214a441
broadcom/compiler: allow compilation strategies to limit minimum thread count
...
This adds a minimum thread count parameter to each compilation strategy with
the intention to limit the minimum allowed thread count that can be used to
register allocate with that strategy.
For now all strategies allow the minimum thread count supported by the
hardware, but we will be using this infrastructure to impose a more
strict limit in an upcoming optimization.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100 >
2021-04-09 10:31:40 +00:00
Iago Toral Quiroga
4b244dc64f
broadcom/compiler: add a definition for the unifa skip distance
...
We will be using this distance to setup another optimization in a
follow-up patch.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
x# Please enter the commit message for your changes. Lines starting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100 >
2021-04-09 10:31:40 +00:00
Iago Toral Quiroga
a45ab46563
v3dv: fix index buffer binding
...
This can be called outside a render pass so we should not expect to have
a job available. Also, we should not be emitting state here, instead we
should do in the pre-draw handler with all the other draw call state.
Fixes cases of crashes in RenderDoc when selecting elements in the
Event Browser.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10130 >
2021-04-09 10:13:46 +00:00
Juan A. Suarez Romero
cc8d4cd1ae
broadcom/compiler: fix first_component assertion
...
first_component is an uint, and thus if it takes value 0 we can't know
if it is because writemask has its first bit to 1, or all bits to 0.
As we want to ensure that at least one bit is set, apply the assertion
in writemask.
Fixes CID#1472829 "Macro compares unsigned to 0 (NO_EFFECT)".
v2:
- Restore "first_component <= last_component" assertion (Iago)
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/10103 >
2021-04-09 07:55:41 +00:00
Gert Wollny
46fc8ed432
r600: Enable sb for nir only on specific request
...
SB si known to be buggy and the ultimate aim is to make it go away. To
test workloads with better optimizations it makes sense to be able to
enable SB, but for the NIR backend it should not be enabled together
with NIR the default. Therefore an a specific debug option "nirsb" that
enables NIR with SB.
Fixes: 3b27243b01
r600: Enable sb also for NIR
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10108 >
2021-04-09 07:32:41 +00:00
Samuel Pitoiset
b4a66b29cd
radv: add MSAA support to CopyImage() on compute queue
...
CopyImage supports copying MSAA images if the number of samples match.
Found by inspection because this is untested by CTS for some reasons.
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/10055 >
2021-04-09 07:05:24 +00:00
Samuel Pitoiset
4caf19eb7d
radv: do not clamp framebuffer dimensions to the minimum dimension
...
This shouldn't be needed and this is going to be wrong with VRS
attachments because dimensions are divided by the VRS texel size.
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/10111 >
2021-04-09 08:32:05 +02:00
Tapani Pälli
0532365759
egl: support no error attribute set to false with ES 1.1
...
We advertise the extension so it should support case where context has
attribute EGL_CONTEXT_OPENGL_NO_ERROR_KHR set to EGL_FALSE indepdendent
of ES version used.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4586
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10102 >
2021-04-09 08:02:21 +03:00
Erik Faye-Lund
eeec9d56ad
compiler/glsl: clean up output
...
It's really hard to make sure we have the right amount of %s in the
format string, so let's change how we generate this string.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9896 >
2021-04-09 03:57:51 +00:00
Erik Faye-Lund
d5e0be9342
compiler/glsl: fix volatile string
...
The reason the member has a leading underscore is because volatile is a
keyword in C. We don't want to carry that detail into the error-string,
so let's drop the underscore.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9896 >
2021-04-09 03:57:51 +00:00
Erik Faye-Lund
01e012dab8
compiler/glsl: correct the number of string-arguments
...
This format-string seems to have been incorrect since it's inception.
But there's also been commits that have both forgotten to add and remove
flags as appropriate as well.
Let's correct the format-list. This was done by counting by hand. A
better solution for the long-term is coming in a future commit.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9896 >
2021-04-09 03:57:50 +00:00
Jesse Natalie
34c84b6f0e
microsoft/compiler: Add some more float16 support
...
We can support float16 constants, b2f16, and casts to float16.
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Jesse Natalie
ca08e74525
microsoft/spirv_to_dxil: Support doubles
...
First, we need to lower alu to scalar so that all alu ops on doubles
only take one input. Then, we can use our new double lowering pass.
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Jesse Natalie
771c223f60
microsoft/compiler: Implement new double pack/unpack alu ops
...
MakeDouble is pretty straightforward, but SplitDouble is interesting
since it returns a unique 2-element struct.
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Jesse Natalie
5578fdd2c4
microsoft/compiler: Add a lowering pass to emit double [un]pack instructions
...
Whenever we have an ALU op that's operating on a double, we'll unpack
it as an integer, then repack it as a float. When we have an ALU op that
returns a double, we'll unpack it as a double, then repack it as an integer.
Then, simple algebraic opts will remove any redundant unpack/repack ops,
so we should be left with constructing and deconstructing doubles using
the right operations.
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Jesse Natalie
3c8bcdc863
nir: Add a new opcode for [un]packing doubles
...
HLSL doesn't support bitcasting a 64bit integer to a double. DXIL
doesn't have generic pack/unpack instructions, so we lower those to
integer bitwise ops. As a result, NIR generic double pack/unpack would
require our backend to emit a bitcast to get a double, but we want
to match HLSL semantics and emit MakeDouble/SplitDouble.
Adding a dedicated opcode for double pack/unpack allows us to add a
pass to emit that instead, which lets our backend emit the right
instruction to pack and unpack doubles.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Jesse Natalie
bd219321a5
microsoft/compiler: Support fp16 i/o vars
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Jesse Natalie
79bcefa8d9
microsoft/spirv_to_dxil: Lower io arrays
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Jesse Natalie
cac3aedb0f
microsoft/spirv_to_dxil: Lower globals to function_temp
...
Reviewed-by: Enrico Galli <enrico.galli@intel.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063 >
2021-04-09 01:54:33 +00:00
Mike Blumenkrantz
f5ca29b430
zink: fix CI flakiness in glx-multithread-clearbuffer
...
unsetting zink from GALLIUM_DRIVER is required in order for lavapipe to
work, but setting it back is totally broken in the case where an app
creates a ton of screens simultaneously
instead, just leave it set to llvmpipe, and if a race condition occurs,
at least llvmpipe isn't going to fail a test that zink passes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10120 >
2021-04-08 20:55:20 -04:00
Bas Nieuwenhuizen
8b9033ad0a
radv: Support DCC modifiers fully.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998 >
2021-04-08 22:29:12 +00:00
Bas Nieuwenhuizen
6ff88a823b
radv: Add retiling for foreign queues.
...
This way modifier images that don't go through the present layout
get the retile executed properly.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998 >
2021-04-08 22:29:12 +00:00
Bas Nieuwenhuizen
dece117fdc
radv: Support DCC without DCC/FCE predicates.
...
Imported images can't have this as part of the associated memory.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998 >
2021-04-08 22:29:12 +00:00
Bas Nieuwenhuizen
b61efd53b4
radv: Support DCC without a fast clear value.
...
For imported images we can't have one in the associated memory.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998 >
2021-04-08 22:29:12 +00:00
Adam Jackson
f0861c803e
glx: Downgrade sRGB-ful fbconfigs
...
Again, NVIDIA supports this on every fbconfig, Mesa alternates it on and
off for some reason but only on some drivers, and in particular llvmpipe
doesn't try to create sRGB-ful fbconfigs. Nerf it out of the fbconfig.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648 >
2021-04-08 21:43:04 +00:00
Adam Jackson
6b93746b56
glx: Downgrade tfp mipmap-capable fbconfigs
...
Again, NVIDIA does this but Mesa doesn't. Just disable it in the
fbconfig so apps can't try to use it.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648 >
2021-04-08 21:43:04 +00:00
Adam Jackson
000035222e
glx: Downgrade aux-buffer-ful fbconfigs
...
Mesa's never supported this, but NVIDIA does, on every fbconfig. Just
disable it if we see it.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648 >
2021-04-08 21:43:04 +00:00
Adam Jackson
8917ca8af5
glx: Don't downgrade the visual caveat from the server
...
Mesa marks accumful fbconfigs as slow (for no especially good reason,
it's only accum operations that aren't accelerated, and we could fix
that). NVIDIA doesn't. All that mismatching on this attribute can do is
prevent a config from working exactly as well as it possibly can.
Trust the server's opinion here (but warn if you ask for warnings).
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648 >
2021-04-08 21:43:04 +00:00
Adam Jackson
7934b283dd
glx: Stop pretending to validate the pbuffer fbconfig attributes
...
For hardware drivers we've never set this to anything interesting so
there's no benefit to validating it. For drisw we're at the mercy of
whatever the X server sent to us anyway, and it's not like any server is
going to vary two fbconfigs by _just_ these values.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648 >
2021-04-08 21:43:04 +00:00
Adam Jackson
40afef67e2
dri: Don't tie the accum buffer's alpha-ness to the color buffer's
...
Let's preface this all by noting that the accum buffer is unused even by
legacy feature standards, and that anybody needing it to be performant
is probably not using Mesa to begin with since we've never accelerated
it. This fix is really about making drisw work under hostile GLX
environments, since it doesn't have any control over what's running on
the server side.
NVIDIA's driver simply lists RGBA16 accumulation buffers for every
fbconfig, and the accum buffer's alpha channel is always non-zero even
if the color buffer is RGBX. If we try to point llvmpipe at such a
screen, then _none_ of the depth-24 fbconfigs will find a matching DRI
config, since DRI's accumful config will have 0 accum alpha bits. This
is somewhat limiting since most X applications are expecting an RGBX
config and will be accidentally translucent at depth 32.
Due to the somewhat ugly nature of how xserver constructs fbconfigs, if
you run a driver with this fix against a server from before this fix (or
vice versa), you will find the opposite result: none of your RGBX
fbconfigs will have an accum buffer, though the RGBA ones still will.
That's a pretty acceptable tradeoff to me since what we're gaining is
the ability to use llvmpipe at all.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648 >
2021-04-08 21:43:04 +00:00
Adam Jackson
0a6e726bfb
mesa: gl_config::rgbBits should count alphaBits too
...
This backs {EGL,GLX}_BUFFER_SIZE, which explicitly include alpha.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648 >
2021-04-08 21:43:04 +00:00
Dave Airlie
8343dfe059
lavapipe: add dummy sampler ycbcr conversion
...
This at least keeps the CTS tests happy.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10098 >
2021-04-08 20:13:23 +00:00
Dave Airlie
2a92e9ee3f
lavapipe: add vk1.1 image swapchain support
...
Adding support to create images from memory in the swapchain.
Just missed this in my pass of 1.1 features
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10099 >
2021-04-08 20:02:26 +00:00
Mike Blumenkrantz
c79c2afd9f
gallium/threaded_context: add another rule for buffer mapping
...
a synchronous driver can use PIPE_MAP_ONCE to infer that a buffer is
guaranteed to not be mapped multiple times, as this is only used when
doing map -> memcpy -> unmap directly
a threaded driver performs maps/unmaps asynchronously, so this flag
can only be used by the driver to confirm that the mapped region is accessed
exactly once, not that it will not need to remain mapped for other transfer_map
uses after it is unmapped
in short, consider this scenario:
transfer_map(A) -> memcpy(map, data) -> transfer_unmap(map_A) ->
transfer_map(A) -> memcpy(map, data) -> transfer_unmap(map_A)
when a synchronous driver executes this, the call chain is unmodified
when a tc driver executes this, the call chain may become:
transfer_map(A) -> memcpy(map, data) ->
transfer_map(A) -> memcpy(map, data) ->
transfer_unmap(map_A) -> transfer_unmap(map_A)
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10113 >
2021-04-08 19:35:10 +00:00
Christian Gmeiner
663272c4da
etnaviv: tell the truth if alpha-test is supported
...
GPUs with the feature bit PE_NO_ALPHA_TEST set have no fixed-function
alpha test unit and we want to let st lower it with a shader variant.
For GC7000K this fixes all fbo-alphatest-formats piglits like:
spec@ext_framebuffer_object@fbo-alphatest-formats
spec@ext_packed_float@fbo-alphatest-formats
spec@ext_texture_srgb@fbo-alphatest-formats
This only works with the NIR compiler backend.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Tested-by: Lukas F. Hartmann <lukas@mntmn.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9871 >
2021-04-08 19:25:26 +00:00
Mike Blumenkrantz
d1f96e0c72
features: mark off ARB_fragment_shader_interlock for zink
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10109 >
2021-04-08 19:06:04 +00:00
Yiwei Zhang
a049cff241
venus: implement vn_debug_init_once with os_get_option
...
getenv is not working well with Android VM. Instead, use os_get_option
to read Android system property.
e.g. adb shell setprop mesa.vn.debug drm
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/10112 >
2021-04-08 18:51:24 +00:00
Yiwei Zhang
82bb90e072
venus: bring up Android support
...
1. implement hwvulkan_device_t
2. mask Android extension support
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/10112 >
2021-04-08 18:51:24 +00:00
Yiwei Zhang
fc3335a472
venus: properly enable WSI for different platforms
...
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/10112 >
2021-04-08 18:51:24 +00:00
Andrii Simiklit
c6232afde0
nir/spirv: remove unused fields from vtn_builder
...
They were used for tracking whether SSA needed to be repaired,
but now the repair is done for all functions with structured control flow.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7755 >
2021-04-08 18:28:08 +00:00
Andrii Simiklit
4220befb38
spirv: repair ssa defs for switchs with only default case
...
This fixes OpSwitch corner case when switch doesn't have any targets
just a `default` and SSAs defined in it is used after switch block
directly without phis.
v2: Just use `repair_ssa` for all structured control-flow cases
( - Jason Ekstrand <jason@jlekstrand.net >
- Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com > )
Closes : #3787
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7755 >
2021-04-08 18:28:08 +00:00
Yevhenii Kharchenko
edd12acbec
intel/compiler: remove unused member 'input_vue_map'
...
v2: Instead of fixing unitialized member 'fs_visitor::input_vue_map'
(as reported by Coverity Scan in defect CID 1474559),
remove unused members 'vec4_tcs_visitor::input_vue_map' and
'fs_visitor::input_vue_map'.
Also fixed 'debug_enabled' argument skipped in a fs_visitor constructor
call from brw_compile_tes().
Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10040 >
2021-04-08 18:20:10 +00:00
Samuel Pitoiset
63772f3ca5
radv: add MSAA support to ClearColorImage() on compute queue
...
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/10070 >
2021-04-08 17:42:15 +00:00
Chia-I Wu
31a3f2e4f4
venus: initial support for WSI
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
91f914338d
venus: initial support for transform feedback
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
5dfe49e588
venus: advertise extensions promoted to 1.2
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
1cb0caf0ae
venus: advertise extensions promoted to 1.1
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
4db8163392
venus: initial support for command buffers
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
723f0bf74a
venus: initial support for module and pipelines
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
5782506597
venus: initial support for events and queries
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
8e2844b377
venus: initial support for render pass and fb
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
99fb8f6c69
venus: initial support for descriptor sets
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
c1cc3e8b7d
venus: initial support for buffers/images/samplers
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
2c78d5ce52
venus: initial support for VkDeviceMemory commands
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
ddd7533055
venus: initial support for queue/fence/semaphore
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
5d94efd1b2
venus: initial support for VkDevice commands
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
108f386a61
venus: initial support for VkPhysicalDevice commands
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
90802b514d
venus: initial support for vkCreateInstance
...
Connect to the renderer.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
83d7c2bb40
venus: add a ring buffer
...
vn_ring is a fast way to submit commands, skipping vn_renderer entirely.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
cd576a3742
venus: add a CS encoder/decoder
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
247232d596
venus: add experimental renderers
...
There are a virtio-gpu renderer and a vtest renderer. The vtest
renderer must be enabled with VN_DEBUG=vtest.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
b5653e3414
venus: add generated venus-protocol headers
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
b0736f49d3
venus: add driver skeleton
...
It only has enough stubs to be loadable by the loader.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Chia-I Wu
dab339b07e
virgl: update headers from virglrenderer
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800 >
2021-04-08 17:15:37 +00:00
Rhys Perry
5f62083c26
nir/gather_info: fix partial masking of compact I/O with location_frac!=0
...
nir_lower_clip_cull_distance_arrays() can create compact variables with
location_frac!=0.
Fixes: cc7a187411 ("nir/gather_info: implement partial masking of struct and compact I/O")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4554
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10002 >
2021-04-08 16:39:48 +00:00
Mike Blumenkrantz
b927de8b7f
aux/trace: dump all the blend state members
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10092 >
2021-04-08 16:08:32 +00:00
Bas Nieuwenhuizen
edb89e7c4d
nir: Do not reset shared_size in nir_lower_io.
...
I'd like to use raw shared intrinsics already for some raytracing
stuff before this pass gets called and this was a real pitfall.
This mirrors scratch_size and constant_data_size.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10094 >
2021-04-08 14:39:28 +00:00
Bas Nieuwenhuizen
4ca4de50f7
nir: Remove nir_shader->shared_size.
...
The same info is in shader_info. Dedupe.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10094 >
2021-04-08 14:39:28 +00:00
Bas Nieuwenhuizen
580f1ac473
nir: Extract shader_info->cs.shared_size out of union.
...
It is valid for all stages, just 0 for most of them. In particular
mesh/task shaders might be using it.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10094 >
2021-04-08 14:39:28 +00:00
Chad Versace
afd2f489d3
anv: Drop unused anv_image_create_info::stride
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
5e6db19168
anv: Remove vkCreateDmaBufINTEL (v4)
...
Superceded by VK_EXT_image_drm_format_modifier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com > (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net > (v4)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
f4c6988184
anv: Enable VK_EXT_image_drm_format_modifier
...
Also enable the dependency VK_EXT_queue_family_foreign.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
13ee22c662
anv/image: Support VkImageDrmFormatModifierExplicitCreateInfoEXT
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
d526fcba0d
anv/image: Add 'offset' param to add_surface()
...
Will be used by VkImageDrmFormatModifierExplicitCreateInfoEXT.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
13498cdd34
anv: Declare anv_layout_to_* as pure functions
...
Because I want the compiler to eliminate some function calls in
transition_color_buffer() that produce unused return values. Let's hope
the compiler gets the hint.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
0e3199d912
anv: Implement image acquire/release of modifier images
...
If VkImageMemoryBarrier acquires ownership of the image on
VK_QUEUE_FAMILY_FOREIGN_EXT or VK_QUEUE_FAMILY_EXTERNAL, and if the
image has a DRM format modifier with an aux surface, then we must ensure
that the image's aux state is consistent with the modifier. In the other
direction, if VkImageMemoryBarrier releases ownership, then we may have
to resolve the image's aux surface.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
7fcec8ea5e
anv/image: Fix vkGetImageSubresourceLayout for modifier images
...
For modifier images, the spec requires that aspect be one of
VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
46f0e5b1e9
anv: Move assert in vkGetImageSubresourceLayout
...
Assert the value is valid before we use it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
3a62d02c17
anv/image: Fix Vk*ImagePlaneMemory*Info for modifier images
...
In VkImagePlaneMemoryRequirementsInfo and VkBindImagePlaneMemoryInfo,
the spec requires the aspect to be
VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for modifier images.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
f9fa09ec92
anv/image: Add ANV_IMAGE_MEMORY_BINDING_PRIVATE
...
Used for storing the aux surface and/or aux state data for some images
that have a DRM format modifier.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
c21dc4101a
anv/image: Fix cleanup of failed image creation
...
In anv_image_create(), the failure path neglected to call
vk_object_base_finish().
CC: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
2e4c153c6b
anv/image: Refactor check_memory_bindings()
...
Reduce boilerplate with a helper function, because DRM format modifiers
will soon increase the complexity. In particular, remove the
'prev_range' variable.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:55 +00:00
Chad Versace
a7a59d8dd1
anv/image: Check that anv_image is compatible with its modifier
...
At end of image creation, check for incompatibilities that
vkGetPhysicalDeviceImageFormatProperties2() has difficulty predicting.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:54 +00:00
Chad Versace
96f4568b63
anv/image: In vkCreateDmaBufImageINTEL use modifiers
...
In vkCreateDmaBufImageINTEL, use VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.
No intended change in publicly visible behavior.
I really don't want to update this soon-to-be-removed function, but this
change is necessary to avoid upcoming assertion failures. In particular,
we will soon assert that the image has a modifier if and only if it has
modifier tiling.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:54 +00:00
Chad Versace
12e8e20802
anv/image: Fix tiling if VkImageSwapchainCreateInfoKHR
...
We incorrectly used VK_IMAGE_TILING_OPTIMAL when the original swapchain
image had VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. When we soon begin
using a different memory layout for modifier images, this mismatch would
have produced undefined behavior.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:54 +00:00
Chad Versace
de870cc4b2
anv/image: Simplify assertions in anv_image_from_swapchain()
...
No intended change in behavior.
Conceptual diff:
|- assert(swapchain_image->apples == (pCreateInfo->apples + MORE));
| local_create_info->apples = pCreateInfo->apples + MORE;
|+ assert(swapchain_image->apples == local_create_info->apples);
And, where appropriate:
|- local_create_info->orange = X;
|+ /* See spec anchor #swapchain-wsi-image-create-info . */
|+ assert(local_create_info->orange == X);
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:54 +00:00
Chad Versace
0845cabc72
vulkan: Track dependencies of Python imports
...
The meson.build was unaware of transitive dependencies introduced by
Python imports.
Android still needs fixing. But I did not update the Android files lest
I break the build.
Ideally, we would fix this by using a Python runner that generates
a depfile, similar to how meson creates depfiles for C files by passing
flags -MD -MQ -MF to gcc. But this patch gets the job done, without
stalling on the ideal general solution, by manually tracking the Python
imports in new 'foo_depend_files' variables.
CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466 >
2021-04-08 14:15:54 +00:00
Bas Nieuwenhuizen
84e0f6dbd8
nir: Fix shader calls with nir_opt_dead_write_vars.
...
Fixes: 5a28893279 ("spirv,nir: Add ray-tracing intrinsics")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10096 >
2021-04-08 11:10:52 +00:00
Jose Maria Casanova Crespo
95c4f0f910
v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support
...
It enables SAND modifier with columns 128-bytes-wide support for
NV12 format.
When a DRM_FORMAT_MOD_BROADCOM_SAND128 is enabled an imported NV12
texture format has a different layout. Luma and Chroma planes layout
is interleaved for every 128-bytes-wide columns.
Although TFU was supposed to convert a NV12 with SAND_COL128 modifier
from YUV to sRGB color space, it expects a particular swizzle that is not
the one provided by the video decoder available at the Raspberry Pi 4.
This patch follows a similar approach to VC4 YUV blit, using a custom
blit shader that transforms a NV12 texture with SAND_COL128 modifier
with the two interleaved planes to two not-interleaved textures with
UIF format, as it was a regular NV12 format texture.
To reduce the number of texture-fetch operations during the blit, we
are reading and writing the textures in pixel groups of 32-bits. This
implies some swizzling of the pixels to meet the particularities
of the different micro-tile layouts for 8bpp, 16bpp and 32bpp.
With this approach, we are not adding a new format that could be named
"NV12_SAND128". We are just enabling a format modifier.
v2: Rework checks for supported modifiers (Alejandro Piñeiro)
Destroy custom shaders on context destroy (Alejandro Piñeiro)
Add more comments (Alejandro Piñeiro)
SAND128 in query_dmabuf_modifiers should report external_only true.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10051 >
2021-04-08 10:40:34 +00:00
Philipp Zabel
2470bcb946
meson: Fix missing xcb-xrandr dependency for Vulkan X11 WSI
...
Fixes a build failure when building any Vulkan driver for the X11
platform with -Dxlib-lease=disabled. For example:
/usr/bin/ld: src/vulkan/wsi/libvulkan_wsi.a(wsi_common_x11.c.o): in function `wsi_x11_detect_xwayland':
src/vulkan/wsi/wsi_common_x11.c:123: undefined reference to `xcb_randr_query_version_unchecked'
Fixes: 1de2fd0cf2 "wsi/x11: Always link against xcb-xrandr"
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9972 >
2021-04-08 10:08:40 +00:00
Rhys Perry
961361cdc9
aco: ensure loops nested in a WQM loop are in WQM
...
Fixes a potential empty exec mask in this situation:
enter_wqm()
loop {
... wqm code ...
enter_exact()
loop {
... no wqm code ...
}
}
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: f0074a6f05 ("aco: do not flag all blocks WQM to ensure we enter all nested loops in WQM")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4546
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10075 >
2021-04-08 09:56:25 +00:00
Rhys Perry
49cb1fac13
draw: fix pstipple, aaline and aapoint without LLVM
...
Because of nir_to_tgsi, LLVM is not required here.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Fixes: d0f8fe5909 ("softpipe: Switch to using NIR as the shader format from mesa/st.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10072 >
2021-04-08 09:33:59 +00:00
Lionel Landwerlin
49be175a4b
intel/fs: limit OW reads to 8 owords on XeHP+
...
We can only use 16 OW reads/writes on SLM.
v2: Update comment (Curro)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
BSpec: 47652
Fixes: 369eab9420 ("intel/fs: Emit code for Gen12-HP indirect compute data")
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10082 >
2021-04-08 09:25:38 +00:00
Lionel Landwerlin
655251ad30
anv: put correct number of BT prefetch for compute on XeHP+
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10084 >
2021-04-08 09:17:35 +00:00
Samuel Pitoiset
9a3d496398
radv: make sure FMASK decompress and FCE are performed on gfx queue
...
To catch possible transition failures.
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/10056 >
2021-04-08 08:21:40 +02:00
Mike Blumenkrantz
6528cd762d
zink: support ARB_fragment_shader_interlock
...
just smashing in some caps and intrinsics
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10013 >
2021-04-08 04:13:14 +00:00
Mike Blumenkrantz
7580a69844
zink: hook up EXT_fragment_shader_interlock
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10013 >
2021-04-08 04:13:14 +00:00
Mike Blumenkrantz
9114863609
zink: use explicit subpass deps
...
this lets us avoid the spec-mandated barrier and use flags based on
what we'll actually be doing in the pass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9986 >
2021-04-08 04:02:21 +00:00
Mike Blumenkrantz
6536d5a947
zink: use set_foreach_remove()
...
this saves potentially thousands of iterations on each batch reset
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10097 >
2021-04-08 03:51:49 +00:00
Mike Blumenkrantz
c7e4f28a16
zink: simplify clear-apply on fb state change
...
since surfaces are cached and deduplicated, we no longer have to
do deep comparisons to determine whether two surfaces are equal and can
just compare the pointers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10087 >
2021-04-08 03:44:20 +00:00
Mike Blumenkrantz
f19946ca6e
zink: stop unmapping resources
...
it turns out there's not actually a requirement that resources be unmapped,
which means that a ton of overhead can be saved both in the unmap codepath
(the cpu overhead here is pretty insane) and then also when mapping cached
resource memory, as the map can now be added to the cache for immediate reuse
as seen in radeonsi
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9980 >
2021-04-08 03:34:49 +00:00
Mike Blumenkrantz
eab985d070
zink: fix conditional when assigning tess variable io
...
this was not copied directly and changed the old conditional, which
was intended to catch only non-patch tess io
fixes tess io with legacy builtins, e.g., spec@!opengl 2.0@vertex-program-two-side back front2 back2
Fixes: 2d98efd323 ("zink: pre-populate locations in variables")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9996 >
2021-04-08 03:25:57 +00:00
Mike Blumenkrantz
8ebdb8c687
zink: bypass separate stencil path in resource_reference_rw when not a zs image
...
no point in trying to get a stencil resource if none exists
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9961 >
2021-04-08 03:15:25 +00:00
Mike Blumenkrantz
40e8328ce5
zink: remove atomic usage from batch tracking comparisons
...
race conditions here have no impact because it cannot change the evaluation
of this condition
also no need to check zs stuff if there's no update happening
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9961 >
2021-04-08 03:15:25 +00:00
Mike Blumenkrantz
15f2c1f661
zink: add env var to force uniform inlining
...
this is great for debugging/testing, but there's no great heuristics
for using it yet
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9888 >
2021-04-08 03:00:48 +00:00
Mike Blumenkrantz
7f28775edc
zink: implement uniform inlining
...
this lets us inline away our problems
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9888 >
2021-04-08 03:00:48 +00:00
Mike Blumenkrantz
b47815c772
zink: add a pipe_screen::finalize_nir hook
...
moves some of the always-run passes into the base nir
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9888 >
2021-04-08 03:00:47 +00:00
Mike Blumenkrantz
193c02e0cf
aux/trace: add GALLIUM_TRACE_TRIGGER mode
...
similar to amd/radv driver debug modes for sqtt, this specifies a filename
which is checked on every flush(PIPE_FLUSH_END_OF_FRAME); when it exists,
the next frame (and only that frame) is captured into the trace
to use, specify a file with the env var, run your app, and 'touch /path/to/file'
when you want to capture a trace
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10058 >
2021-04-08 00:01:31 +00:00
Enrico Galli
ad88e2f959
microsoft/spirv_to_dxil: Use non-zero exit code on failed compilations
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10064 >
2021-04-07 23:50:39 +00:00
Enrico Galli
5756f2cd2c
microsoft/spirv_to_dxil: Add support for load_vulkan_descriptor
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10064 >
2021-04-07 23:50:39 +00:00
Mike Blumenkrantz
31e546a762
util/hash_table: add macro for destructively iterating entries
...
a common usage for hash tables is for tracking exactly one instance of a pointer
for a given period of time, after which the table's entries are purged and it
is reused
this macro enables the purge phase of such usage to reset the table to a
pristine state, avoiding future rehashing due to ballooning of deleted entries
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8498 >
2021-04-07 22:57:27 +00:00
Mike Blumenkrantz
759cc91450
util/set: add macro for destructively iterating set entries
...
a common usage for sets is for tracking exactly one instance of a pointer
for a given period of time, after which the set's entries are purged and it
is reused
this macro enables the purge phase of such usage to reset the table to a
pristine state, avoiding future rehashing due to ballooning of deleted entries
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8498 >
2021-04-07 22:57:27 +00:00
Mike Blumenkrantz
539c7ca508
aux/trace: add a bunch of methods for lavapipe
...
with all of these, lavapipe can now be traced
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9958 >
2021-04-07 22:11:46 +00:00
Mike Blumenkrantz
c1270d4845
aux/trace: add screen deduplication for zink+lavapipe tracing
...
if zink+lavapipe is enabled at compile-time, special handling is needed
to ensure that only the intended screen is traced, otherwise malformed
xml will be generated
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10059 >
2021-04-07 21:48:37 +00:00
Dave Airlie
f89c8ba410
docs: update lavapipe bits for 1.1
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10086 >
2021-04-07 20:30:10 +00:00
Mike Blumenkrantz
e1ba6158c0
zink: export PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER
...
avoids memcpy slowpath
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9733 >
2021-04-07 20:19:59 +00:00
Dave Airlie
e1eb72ae3c
lavapipe: enable Vulkan 1.1 support
...
This is not fully conformant but the failures are the same as the Vulkan 1.0
failures.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
7b79db11c2
lavapipe: enable correct workgroup sizing
...
If I say layering violation, you say?
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
34525bb088
lavapipe: enable subgroups features
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
50049bd241
gallivm: add compute shader subgroup system values support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
bf6fd9a2eb
gallivm: add subgroup lowering support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
8dc398848a
gallivm: add subgroup read invocation support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
2d6a0a8620
gallivm: add subgroup ballot support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
7b3073ad44
gallivm: add subgroup reduction + in/ex scan support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
2e1266d1fe
gallivm: add subgroup elect intrinsic support.
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
52415cd39e
gallivm: add subgroup system values support
...
This just adds support for retrieving subgroup system values.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
1b8145eee9
gallivm: move get_flt_bld to header.
...
Rewrite a little as we have to add 16-bit support later in life
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
2e23108274
gallivm: add subgroup vote 64-bit and feq support.
...
These are both required for vulkan subgroup support.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
8a18ed018b
lavapipe: fix missing protected memory properties
...
This is needed for vk 1.1
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Dave Airlie
e47b742810
lavapipe: add vulkan 1.1 properties/features apis
...
Still have to add subgroups before advertising 1.1
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Mike Blumenkrantz
35c02f79c9
lavapipe: add some asserts for blit region extents
...
this enforces spec for 3d vs array texture blits, more to come
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10005 >
2021-04-07 19:45:26 +00:00
Dave Airlie
be477f39aa
ci: update zink/virgl results for depth clamping fixes
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068 >
2021-04-08 05:19:00 +10:00
Dave Airlie
60bdf61d68
llvmpipe: always take depth clamping from state tracker
...
Don't be smarter than state tracker here, of d3d10 wants to do
something the state tracker should hard code that. Since lavapipe
wants to use clip_halfz and depth clipping independently.
This fixes some issues blitting Z that zink was seeing
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068 >
2021-04-08 05:18:16 +10:00
Dave Airlie
f96f016c22
llvmpipe: when depth clamp is disable clamp to 0.0/1.0
...
When depth clamp is disabled the viewport values aren't meaningful,
however the value is about to be converted to a unorm so needs
to still be clamped to 0/1.
This might not be the best place for this, maybe it should be in
the write swizzled code.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068 >
2021-04-08 05:17:53 +10:00
Samuel Pitoiset
da166f648f
radv: enable DCC for concurrent images on GFX10
...
The driver now supports DCC stores on GFX10 that means that we can
keep DCC compressed on all layouts/queues.
This should help games which use aync compute or which declare
all images as concurrent like Youngblood.
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/9850 >
2021-04-07 18:33:34 +00:00
Samuel Pitoiset
37d48de83e
radv: simplify a check when enabling DCC for concurrent images
...
If the image is marked as concurrent, each element of
pQueueFamilyIndices must be unique, so queue_family_mask is
different than 1.
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/9850 >
2021-04-07 18:33:34 +00:00
Mike Blumenkrantz
05ecb6780c
zink: emit WorkgroupSize when not using ExecutionModeLocalSize
...
the system_values_read bit might not be set if the value isn't read or is
DCE, but it still needs to be emitted
probably.
fixes #4591
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com >
Tested-by: Witold Baryluk <witold.baryluk@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10079 >
2021-04-07 17:55:53 +00:00
Dylan Baker
636170c888
docs: update calendar and link releases notes for 21.0.2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10078 >
2021-04-07 17:51:27 +00:00
Dylan Baker
6f4e17a4bb
relnotes: Add sha256sum for 21.0.2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10078 >
2021-04-07 17:51:27 +00:00
Dylan Baker
8368598c44
docs: add release notes for 21.0.2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10078 >
2021-04-07 17:51:27 +00:00
Corentin Noël
4e5ea37612
ci: Use lavacli from master
...
This allows to fix some credential leaks and provides compatibility with
the latest LAVA version.
Avoids failures when the LAVA instance returns Error 500
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9851 >
2021-04-07 17:26:29 +00:00
Samuel Pitoiset
d4db68b338
radv: enable DCC stores with MSAA 4x/8x on GFX10+
...
Should work now.
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/10052 >
2021-04-07 17:13:51 +00:00
Alyssa Rosenzweig
1286e73c2c
nir/lower_idiv: Add 8-bit and 16-bit lowering path
...
Roundtrip to a larger float and divide there. The extra details for
mod/rem are handled directly in integer space to simplify verification
of rounding details. The one issue is that the mantissa might be
rounded down which will cause issues; adding 1 unconditionally (proposed
by Jonathan Marek) fixes this. The lowerings here were tested
exhaustively on all pairs of 16-bit integers.
v2: Update idiv lowering per Rhys Perry's comment.
v3: Rewrite lowerings.
v4: Remove useless ftrunc, fix 8-bit issue, simplify code.
v5: Remove useless ffloor
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Tested-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Tested-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8339 >
2021-04-07 15:48:15 +00:00
Alyssa Rosenzweig
e91dec1327
nir/lower_idiv: Factor out numer/denom load
...
No need to duplicate across paths.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8339 >
2021-04-07 15:48:15 +00:00
Alyssa Rosenzweig
7b0eb4aa00
nir/lower_idiv: Convert to lower_instructions
...
Helps deduplicate some code between the two lowering paths. In
particular, it ports the missing 32-bit? check to the precise pass. This
does not change anything immediately: drivers depending on this to lower
16-bit did not work before due to type mismatches and will not work now
since it'll refuse to lower. But that means sub-32-bit idiv can be
lowered more efficiently in an algebraic pass.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8339 >
2021-04-07 15:48:15 +00:00
Alyssa Rosenzweig
e4da24bd24
nir: Add {i2f, u2f, f2i, f2u} helpers
...
Convenient for bitsize independent lowerings, will be used in the idiv
lowering.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8339 >
2021-04-07 15:48:15 +00:00
Alyssa Rosenzweig
6b19711645
nir: Add nir_type_convert
...
Generalizes nir_convert_to_bit_size, which we implement as a
special-case.
v2: Take a sized dest type but allow unsized or sized source to address
Jason's feedback. Shorten name.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8339 >
2021-04-07 15:48:15 +00:00
Samuel Pitoiset
f280367a27
radv: perform MSAA color decompression for storage images with DCC
...
For MSAA storage images with DCC, we also need to perform a MSAA
color decompression.
Fixes dEQP-VK.pipeline.multisample.storage_image.* if DCC stores
is enabled.
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/9854 >
2021-04-07 15:35:07 +00:00
Rhys Perry
835c5b7ebf
aco: fix integer tg4 workaround with unnormalized coordinates
...
Same as LLVM from 2abf62d348 .
fossil-db (GFX8):
Totals from 15 (0.01% of 147787) affected shaders:
VGPRs: 744 -> 748 (+0.54%)
CodeSize: 100472 -> 100732 (+0.26%)
Instrs: 19995 -> 20059 (+0.32%)
Latency: 1001530 -> 1001859 (+0.03%)
InvThroughput: 378508 -> 378747 (+0.06%)
SClause: 676 -> 675 (-0.15%)
Copies: 1655 -> 1654 (-0.06%)
PreSGPRs: 735 -> 742 (+0.95%)
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/10053 >
2021-04-07 15:21:51 +00:00
Connor Abbott
5a70c4d4a0
ir3: Don't copy propagate arrays in ir3_cp
...
We don't check whether there's an intervening write in this pass, which
makes it incorrect. ir3_cp_postsched does check correctly, but we were
accidentally doing it here anyway for some sources.
While we're here, delete some code that was only used in the array case.
Fixes: f370e954 ("freedreno/ir3: handle const/immed/abs/neg in cp")
Reviewed-by: Rob Clark <robdclark@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076 >
2021-04-07 14:35:13 +00:00
Connor Abbott
1ad5ee5a04
ir3/cp_postsched: Set address of uses for relative mov's
...
Fixes: 680ca5b ("freedreno/ir3: add post-scheduler cp pass")
Reviewed-by: Rob Clark <robdclark@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076 >
2021-04-07 14:35:13 +00:00
Connor Abbott
dcc26a3945
ir3: Fix valid flags for STIB
...
Disallow immediates for the source. This was hidden by the fact that we
didn't copy-propagate trivial collect instructions.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Rob Clark <robdclark@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076 >
2021-04-07 14:35:13 +00:00
Connor Abbott
94beaa1d92
ir3/legalize: Fix last input (ss) insertion
...
If there was a mix of ldlv and bary.f and we inserted an (ss) *after*
the last input which was a bary.f, then last_input_needs_ss would get
unset, even though it shouldn't. For figuring out whether we need the
(ss), we need to know whether there are any pending ldlv's when
last_input gets executed, not at the end of the block, which means that
the existing code's strategy of inserting it after the whole block has
been processed won't work. Rework it to do the last_input processing in
the main loop instead.
Reviewed-by: Rob Clark <robdclark@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076 >
2021-04-07 14:35:13 +00:00
Connor Abbott
35ffe4fec1
freedreno/a3xx: Fix SP_FS_CTRL_REG1_INITIALOUTSTANDING
...
Unfortunately this didn't fix anything, but I thought I might as well
include it.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Rob Clark <robdclark@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076 >
2021-04-07 14:35:13 +00:00
Connor Abbott
8cd7950014
util/bitset: Avoid out-of-bounds reads
...
I missed a corner case here: when the next range ends right at the end
of the bitset, we need to return immediately to avoid trying to search
after the bitset. And when finding the next end, we similarly need to
bail if the range is size 1 at the very end of the range. In practice
this probably would'nt have been noticed, because it would break out of
the loop anyway, but I happened to be running something using this under
Valgrind and it complained.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076 >
2021-04-07 14:35:13 +00:00
Mike Blumenkrantz
387189a955
intel: avoid dumping null cs sampler/binding states
...
this crashes the driver
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10077 >
2021-04-07 14:24:08 +00:00
Rhys Perry
7ebb215495
nir_to_tgsi: run constant folding after nir_opt_algebraic
...
Otherwise, an infinite loop can occur.
The first nir_opt_algebraic in the loop can optimize:
op(bcsel(a, #b, c), #d) to bcsel(a, op(b, d), op(c, d))
which (because op(b, d) is not constant folded), will be reverted by the
second nir_opt_algebraic in the loop.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10071 >
2021-04-07 13:55:31 +00:00
Jason Ekstrand
26c3a509de
intel: Drop gen_device_info::has_resource_streamer
...
We've never done anything with that HW and it was removed in ICL.
There's no point in carrying around the useless field.
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10069 >
2021-04-07 13:33:18 +00:00
Michel Dänzer
8ec530d982
wsi/x11: Wait for fences with IMMEDIATE on Xwayland
...
The commit below was already meant to do this, but accidentally missed
this part.
Fixes stutter when the frame-rate drops below the refresh rate.
Fixes: e8f50bd600 "wsi/x11: Treat IMMEDIATE present mode the same as
MAILBOX for Xwayland"
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10026 >
2021-04-07 13:20:20 +00:00
Danylo Piliaiev
519eb735a3
turnip: implement variableMultisampleRate
...
If subpass doesn't have depth/color attachments - samples count is
devised from VkPipelineMultisampleStateCreateInfo::rasterizationSamples.
Without variableMultisampleRate enabled all pipelines in such subpass
should have the same samples count; variableMultisampleRate allows
to have pipelines with different number of samples in one subpass,
given that it doesn't have depth/color attachments.
Blob doesn't have it enabled but there is no known reason for this.
Passes:
dEQP-VK.pipeline.multisample.variable_rate.*
Fixes test:
dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9556 >
2021-04-07 12:04:45 +00:00
Tomeu Vizoso
f31a84233b
ci: Don't retry failed test runs
...
After a recent LAVA update, failures in running a test would cause the
whole test to be retried. We only want for the boot to be retried (in
case of infrastructuer errors), so set the nr of retries for tests to 1.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9950 >
2021-04-07 13:36:14 +02:00
Tomeu Vizoso
4297fe1d9d
ci: Set more reasonable timeouts for LAVA jobs
...
The test timeout shouldn't be bigger than the whole job's timeout.
Also, reduce the timeouts to a more sane level and remove timeouts that
don't bring value.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9950 >
2021-04-07 13:36:14 +02:00
Tomeu Vizoso
93ec399b28
ci: Use a single template for LAVA jobs
...
It's a pain to keep both templates in sync and there aren't really that
many differences.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9950 >
2021-04-07 13:34:14 +02:00
Mike Blumenkrantz
8926c4a313
aux/trace: add a set_inlinable_constants hook
...
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10057 >
2021-04-07 10:30:00 +00:00
Juan A. Suarez Romero
eddbbd8b68
v3d: use uint type in _gen_unpack_uint
...
Use a unsigned int type in the loop to avoid unintended sign extensions.
Fixes CID#1414500 (Unintended sign extension [SIGN_EXTENSION]).
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10060 >
2021-04-07 09:39:42 +00:00
Boris Brezillon
d760a995e3
panfrost: Hook up indirect draw support
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8700 >
2021-04-07 08:27:58 +00:00
Boris Brezillon
54526d8eca
panfrost: Prepare things for indirect draws
...
Several things need to be tweaked to re-use existing helpers for
indirect draws:
* Indirect draws should always be considered as instanced draws since
we don't know in advance how many instances will be requested. For
each vertex attribute buffer entry we store the element divisor which
will be extracted by the compute shader and transformed into a HW
divisor
* PRIMITIVE.index_count should be initialized to its default value
(one, or zero after the minus(1) modification) waiting for the
compute shader to patch it
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8700 >
2021-04-07 08:27:58 +00:00
Boris Brezillon
2e6d94c198
panfrost: Add helpers to support indirect draws
...
Indirect draws are implemented with compute jobs patching the
vertex/tiler jobs. Provide helpers to do that.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8700 >
2021-04-07 08:27:58 +00:00
Boris Brezillon
9a08c9097f
panfrost: Stop including pan_device.h from pan_bo.h
...
We want to define structures containing pan_pool objects in pan_device.h
but it is prevented by the
pan_device.h -> pan_pool.h -> pan_bo.h
^____________________________|
loop.
Break this loop by not including pan_device.h from pan_bo.h.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8700 >
2021-04-07 08:27:58 +00:00
Pierre-Eric Pelloux-Prayer
363c1ef0c0
gallium/u_threaded: split draws that don't fit in a batch
...
Multidraws with large draw count will try to call tc_add_slot_based_call
with a payload larger than TC_CALLS_PER_BATCH.
This commit split these draws in multiple commands to avoid this issue.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4534
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9920 >
2021-04-07 08:00:36 +00:00
Boris Brezillon
e25daef16f
panfrost: Skip disabled RTs when selecting a RT for transaction elimination
...
If the render target is disabled, the CRC won't be updated, and the
slice state should stay unchanged.
Fixes dEQP-GLES2.functional.fbo.render.shared_colorbuffer.tex2d_rgba_stencil_index8
and dEQP-GLES2.functional.fbo.render.shared_colorbuffer.rbo_rgba4_depth_component16.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9907 >
2021-04-07 09:44:50 +02:00
Boris Brezillon
13ff5756ae
panfrost: Don't reserve space in the color buffer for disabled RTs
...
Render targets that have no clear or draws are disabled and thus don't
use the color buffer. Don't reserve space for those.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9907 >
2021-04-07 09:44:37 +02:00
Marek Olšák
c105c8ad2c
winsys/amdgpu: remove another 8 bytes from amdgpu_winsys_bo by packing better
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
815d98c22d
gallium/pb: remove 8 bytes from pb_buffer by packing variables
...
Only svga used usages beyond 16 bits. All other drivers are OK with 16 bits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
712b629abf
gallium/pb: change pb_buffer::alignment to alignment_log2
...
Alignments are always 2^n, so store n = log2(alignment). The next commit
will take advantage of the saved space.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
3d0a4864ce
winsys/amdgpu: add amdgpu_cs::ws to reduce dereferences
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
d5b877619d
winsys/amdgpu: remove amdgpu_winsys_bo::ws
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
65495e6caa
radeon_winsys.h: add a winsys parameter to most winsys buffer functions
...
This will allow removing the winsys pointer from buffers.
The amdgpu winsys adds dummy_ws to get radeon_winsys because there can be
no radeon_winsys around (e.g. while amdgpu_winsys is being destroyed), but
we still need some way to call buffer functions.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
aed8af5456
radeon_winsys.h: add a new function radeon_bo_reference that takes a winsys
...
This will allow removing the winsys pointer from buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
522938f271
winsys/radeon: rename radeon_bo_reference -> radeon_ws_bo_reference
...
radeon_bo_reference will be a new function in radeon_winsys.h.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Marek Olšák
6c6a39682e
gallium/pb: pass an optional winsys pointer to the buffer destroy function
...
This will allow removing the winsys pointer from buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809 >
2021-04-06 22:31:15 +00:00
Lionel Landwerlin
33b2daab1a
intel/compiler: lower bit sizes in NIR postprocessing
...
It appears that between preprocess & postprocess some descriptor
lowering introduces 8bit types in the shader, so run the lower bit
size again to make sure we don't have any unsupported types in our
shader.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: e06144a818 ("anv: Use 64bit_global_32bit_offset for SSBOs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4478
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9705 >
2021-04-06 23:21:30 +03:00
Alyssa Rosenzweig
d01628d24d
pan/bi: Remove conversion lowering
...
Inherited from Midgard, it's easier to just do at NIR->BIR time now that
we have a builder that doesn't suck. Impeded certain optimizations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
266de379c2
pan/bi: Generalize f2i16, f2u16
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
be74b84e6f
pan/bi: Fill in some more conversions
...
The trick is that downcasts are just swizzling out what you don't want,
so things like U32_TO_F16 can be synthesized as V2U16_TO_V2F16 with
src.h00
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
435800e750
pan/bi: Lower swizzles
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
e3e2c5b594
pan/bi: Optimize MKVEC.v2i16 generation
...
Prefer SWZ.v2i16 in cases where that's possible, it will be easier to
optimize later.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Alyssa Rosenzweig
f9bc168bd3
pan/bi: Add bi_swz_16 helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10065 >
2021-04-06 19:35:33 +00:00
Marek Olšák
6bc7a0b366
radeonsi: fix si_compute_copy_image if DCC decompression happens before a copy
...
The buffer clear after DCC decompression overwrote user SGPRs that we set
here, leading to invalid image coordinates. Set them after we bind images.
This will actually be fixed by "radeonsi: don't decompress DCC for float
formats in si_compute_copy_image" as well.
Fixes: ad71ef9326 "radeonsi: don't use a constant buffer for the copy_image compute shader"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4583
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10061 >
2021-04-06 19:19:56 +00:00
Mike Blumenkrantz
fc7ce9b636
zink: drop VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT from compute path
...
this was dropped a while ago from gfx but I failed to pick it up for compute
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10062 >
2021-04-06 18:11:08 +00:00
Adam Jackson
84d6ee0920
mesa: Remove unused gl_config::mutableRenderBuffer
...
This bit is only meaningful for EGL, where we in fact derive it from
whether EGL_KHR_mutable_render_buffer is enabled and don't actually look
at the DRI attribute.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:17 -04:00
Adam Jackson
fa425511ed
mesa: Make _mesa_initialize_visual return void
...
The assertions here clearly never get hit, and if they did it'd mean we
were _trying_ to enable 64-bit Z or something. And checking only that
the accumulation has non-negative size is... curious. Just delete it and
clean up the callers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:16 -04:00
Adam Jackson
9dd0d68d26
mesa: Remove unused _mesa_create_framebuffer
...
One fewer gl_config in the API.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:16 -04:00
Adam Jackson
a6f1d56b7b
radeon: Exchange one curious idiom for another in radeonMakeCurrent
...
radeonMakeCurrent is the only consumer of _mesa_create_framebuffer(),
and all we're doing here is making a dummy for the context to hang on to
when there is no current drawable. intelMakeCurrent uses
_mesa_get_incomplete_framebuffer() for this instead, which is
equivalent, and which matches the usage elsewhere in the tree.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:15 -04:00
Adam Jackson
6d81b9c972
gallium: Remove curious st_visual::no_config
...
The gallium context creation API embeds storage for a whole st_visual
even if the context is to have no config. no_config was being used to
signal this, but we can just as easily check that the color format is
non-NONE.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10045 >
2021-04-06 12:16:10 -04:00
Mike Blumenkrantz
421fbb5f5e
zink: flag DYNAMIC resources as coherent
...
the contents of these may change frequently, so we should skip all the
flush/invalidate
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9983 >
2021-04-06 12:29:56 +00:00
Mike Blumenkrantz
6ff6d01c37
zink: don't use cached mem for staging resources
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9983 >
2021-04-06 12:29:56 +00:00
Simon Ser
7499f84956
radv: fix format feature reporting for modifiers
...
The format_feature_flags bitfield is derived from the modifier if
the tiling is set to VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.
However radv will reset the tiling to either LINEAR or OPTIMAL if
the caller supplied a VkPhysicalDeviceImageDrmFormatModifierInfoEXT
in the chain.
Stop resetting the tiling, so that we can compute the correct feature
flags.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 6c83e3ea98 ("radv: Add format modifier format queries.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9978 >
2021-04-06 09:20:26 +00:00
Rhys Perry
292ac71a4a
nir/lower_tex: handle deref casts
...
A RDR2 shader has a undef->texture cast which is eventually optimized out.
Without handling NULL from nir_deref_instr_get_variable(), compiling this
shader will result in a crash.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Fixes: bc438c91d9 ("nir/lower_tex: ignore texture_index if tex_instr has deref src")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10038 >
2021-04-06 08:35:39 +00:00
Mike Blumenkrantz
00fc85a011
zink: reset queries when suspending if >50% of total pool is used
...
this is a great time for resets since there's never a renderpass active,
so an early reset here may mean avoiding a renderpass split later
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10049 >
2021-04-06 02:01:07 +00:00
Mike Blumenkrantz
f5dc4db35f
zink: defer timestamp query pool resets to end_query
...
we don't do a tc context unwrap in create_query(), so this isn't a good place
to be doing anything that needs the ctx
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10049 >
2021-04-06 02:01:07 +00:00
Mike Blumenkrantz
24923b4640
zink: check last_finished first in fence_finish early out case
...
a fence's completed flag is irrelevant if we already know it has completed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10048 >
2021-04-05 21:45:53 -04:00
Mike Blumenkrantz
d3734ae2dd
zink: relax maybe_flush batch count threshold
...
10 batch states isn't actually that many if an app happens to be flushing
a lot, so let's multiply that to catch outlier cases
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10006 >
2021-04-05 22:45:52 +00:00
Mike Blumenkrantz
1ba6dcb40f
zink: relax maybe_flush mem threshold
...
10% of video mem ends up being way too aggressive and causes constant
stalls
really this is supposed to be a failsafe against ooming in a single batch, so
using 50% here ends up serving that purpose much more effectively
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10006 >
2021-04-05 22:45:52 +00:00
Mike Blumenkrantz
e4426d7828
zink: split total_mem off to total_video_mem, use total_mem for tc
...
tc needs the total host memory available, not the total video memory
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10006 >
2021-04-05 22:45:52 +00:00
Mike Blumenkrantz
c624489968
zink: move cmdpool reset to batch state reset
...
this is a more logical place for it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9964 >
2021-04-05 22:34:16 +00:00
Mike Blumenkrantz
a565ead64a
zink: only use host mem for staging resources with linear tiling
...
VK_EXT_4444_formats strikes again
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9985 >
2021-04-05 22:24:32 +00:00
Mike Blumenkrantz
6433661cda
zink: use 2 variant to check image format props during create
...
just to be pedantic
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9984 >
2021-04-05 22:14:26 +00:00
Mike Blumenkrantz
733e07565f
zink: use vkGetPhysicalDeviceFormatProperties2 when available
...
technically shouldn't matter but whatever
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9984 >
2021-04-05 22:14:26 +00:00
Mike Blumenkrantz
3fa7ce4d46
zink: use better usage flags for staging resources
...
enforce linear bind more logically and mark with more accurate usage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9982 >
2021-04-05 21:58:08 +00:00
Mike Blumenkrantz
12f93a7377
zink: hook up cs push constant for nir_intrinsic_load_work_dim
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9966 >
2021-04-05 17:38:16 -04:00
Mike Blumenkrantz
796e95d6a7
util/threaded_context: support pipe_context::set_sample_locations
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10031 >
2021-04-05 20:52:45 +00:00
Alejandro Piñeiro
1e0a69afa7
vulkan: track number of bindings instead of max binding for CreateDescriptorSetLayout
...
As that handles better, and more clear, the case of bindingCount being
zero. For the case of Anvil and Turnip, this avoids allocating a
non-needed binding when bindingCount is zero.
Inspired on radv, that was what it was doing so far.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4526
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9905 >
2021-04-05 20:17:53 +00:00
Dave Airlie
5890c322e1
zink/ci: handle getting correct drisw driver.
...
With zink not being autopicked, fixup the CI to pick the
correct drivers for zink testing, noting that xvfb really
doesn't want zink to be chosen.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9816 >
2021-04-05 18:46:16 +00:00
Dave Airlie
3e1698fe1b
drisw: move zink down the list below the sw drivers.
...
We don't ever want drisw path picking zink as the driver,
we can revisit this when the penny wrapper work gets further
along.
This selection causes systems with nvidia/intel dual-gpus
to try and pick the intel gpu for rendering in the nvidia
context if there is no nvidia GL driver or accel doesn't work.
This is a partial revert of the original commit.
Fixes: 4a3b42a717 ("drisw: Prefer hardware-layered sw-winsys drivers over pure sw")
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9816 >
2021-04-05 18:46:16 +00:00
Bas Nieuwenhuizen
57511d1458
radv: Flush caches for shader read operations.
...
As part of the fmask expand we very much read from the images as
well ...
Fixes: 8f8d72af55 ("radv: Use access helpers for flushing with meta operations.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10042 >
2021-04-05 18:34:53 +00:00
Danylo Piliaiev
0709a6b363
turnip: fix alignment of non-32b types in workgroup memory
...
Fixes tests:
dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.float16
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10039 >
2021-04-05 17:31:11 +00:00
Samuel Pitoiset
8b80e8f832
radv: init CMASK/FMASK/DCC in parallel
...
To remove bubbles during layout transitions from UNDEFINED, especially
with MSAA because we might have all.
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/10004 >
2021-04-05 16:21:12 +00:00
Jesse Natalie
91dbad7956
microsoft/compiler: Fix barrier flag for shared memory
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10010 >
2021-04-05 15:58:03 +00:00
Juan A. Suarez Romero
c1bd3d3afc
ci/broadcom: update expected list
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10041 >
2021-04-05 17:40:27 +02:00
Samuel Pitoiset
14b312b223
radv: handle implicit subpass dependencies per attachment
...
From the Vulkan spec 1.2.172:
"If there is no subpass dependency from VK_SUBPASS_EXTERNAL to the
first subpass that uses an attachment, then an implicit subpass
dependency exists from VK_SUBPASS_EXTERNAL to the first subpass
it is used in."
"Similarly, if there is no subpass dependency from the last subpass
that uses an attachment to VK_SUBPASS_EXTERNAL, then an implicit
subpass dependency exists from the last subpass it is used in to
VK_SUBPASS_EXTERNAL."
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/9714 >
2021-04-05 11:42:51 +00:00
Danylo Piliaiev
9b9ad8d66c
docs: mark float_controls,float16_int8,16bit_storage as done on Turnip
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Acked-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9993 >
2021-04-05 09:51:46 +00:00
Samuel Pitoiset
2ded998a57
radv: allow DCC for storage images on GFX10.3 with RADV_PERFTEST=dccstores
...
It's not enabled by default because it requires performance testing.
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/9919 >
2021-04-05 08:54:55 +00:00
Samuel Pitoiset
65bca137bd
aco: implement a workaround for the image load DCC hw bug on GFX10.3
...
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/9919 >
2021-04-05 08:54:55 +00:00
Samuel Pitoiset
3dfb453626
aco: fix get_sampler_desc() for image loads
...
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/9919 >
2021-04-05 08:54:55 +00:00
Samuel Pitoiset
ec611beae2
ac: add ac_gpu_info::has_image_load_dcc_bug
...
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/9919 >
2021-04-05 08:54:55 +00:00
Pierre-Eric Pelloux-Prayer
e4ef5f0433
mesa/st: ignore texture_index if tex_instr has deref src
...
texture_index is meaningless when a tex_instr has deref src.
Use var->data.binding instead.
CC: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9931 >
2021-04-05 10:14:24 +02:00
Pierre-Eric Pelloux-Prayer
72c54713aa
mesa/st: fix st_nir_lower_tex_src_plane arguments
...
st_nir_lower_tex_src_plane expects a mask, no a boolean.
CC: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9931 >
2021-04-05 10:14:22 +02:00
Pierre-Eric Pelloux-Prayer
bc438c91d9
nir/lower_tex: ignore texture_index if tex_instr has deref src
...
texture_index is meaningless when a tex_instr has deref src.
Use var->data.binding instead.
This fixes the incorrect lowering on radeonsi where the same
lowering steps was applied to all tex_instr based on the needs
of the first one (since texture_index is always 0).
CC: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9931 >
2021-04-05 10:14:07 +02:00
Samuel Pitoiset
9745a6f9a3
radv: clean up fence syncobj code
...
Since RADV requires DRM 3.35+, this code can be simplified.
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/9953 >
2021-04-05 08:04:51 +00:00
Samuel Pitoiset
4b0fc025f3
radv: try to keep HTILE compressed with DEPTH_STENCIL_READ_ONLY_OPTIMAL
...
From the Vulkan spec:
"VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL specifies a
layout for both the depth and stencil aspects of a depth/stencil
format image allowing read only access as a depth/stencil
attachment or in shaders as a sampled image, combined
image/sampler, or input attachment. It is equivalent to
VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL and
VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL."
So, it should be safe to keep HTILE compressed if the depth/stencil
image isn't going to be sampled. We could probably extend this
to separate depth/stencil layout but that seems a bit more
complicated.
This gives a huge boost to the deferredmultisampling Vulkan demo.
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/10008 >
2021-04-05 07:23:50 +00:00
Samuel Pitoiset
8fa7aa16ce
radv: change RADV_FORCE_FAMILY to use family name instead of LLVM processor name
...
gfx1030 doesn't allow us to specify e.g. dimgrey.
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/9974 >
2021-04-05 06:53:55 +00:00
Samuel Pitoiset
11c1027730
ac: add ac_get_family_name() helper
...
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/9974 >
2021-04-05 06:53:55 +00:00
Iago Toral Quiroga
9ca0e070e7
broadcom/compiler: optimize branch emission for uniform break/continue
...
A break/continue in a loop is typically emitted like this:
if (cond) {
break/continue;
} else {
}
If cond is uniform, we'll emit code for a uniform if statement and
that will emit a branch right before the if to jump directly to the
else (or the block after the else in this case, since the else is
empty) in case cond evaluates to false. This means we end up emitting
two consecutive branch instructions, one before the if and one for the
THEN block right after:
branch(!cond) -> jump to else (or after else) if cond is false
nop
nop
nop
branch -> unconditional jump to break/continue
nop
nop
nop
Instead, if we are in this scenario, we can do better by emitting the
conditional jump directly and avoiding the "jump to else" case:
branch(cond) -> jump to break/continue if cond is true
nop
nop
nop
We need to be careful when emitting the break/continue for the case
where all lanes are disabled to avoid infinite loops: if we have a
break we always want to take the jump, but we don't want to take it
if it is a continue.
total instructions in shared programs: 13563672 -> 13557348 (-0.05%)
instructions in affected programs: 348034 -> 341710 (-1.82%)
helped: 1158
HURT: 10
Instructions are helped.
total uniforms in shared programs: 3779137 -> 3777535 (-0.04%)
uniforms in affected programs: 90583 -> 88981 (-1.77%)
helped: 1169
HURT: 0
Uniforms are helped.
total max-temps in shared programs: 2317670 -> 2317575 (<.01%)
max-temps in affected programs: 1943 -> 1848 (-4.89%)
helped: 85
HURT: 4
Max-temps are helped.
total sfu-stalls in shared programs: 32247 -> 32247 (0.00%)
sfu-stalls in affected programs: 69 -> 69 (0.00%)
helped: 7
HURT: 9
Inconclusive result (value mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13595919 -> 13589595 (-0.05%)
inst-and-stalls in affected programs: 350674 -> 344350 (-1.80%)
helped: 1154
HURT: 11
Inst-and-stalls are helped.
total nops in shared programs: 358202 -> 354325 (-1.08%)
nops in affected programs: 17367 -> 13490 (-22.32%)
helped: 1168
HURT: 1
Nops are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9948 >
2021-04-05 06:38:19 +00:00
Iago Toral Quiroga
14843ccc33
broadcom/compiler: implement restriction for branch after setmsf
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9948 >
2021-04-05 06:38:19 +00:00
Mike Blumenkrantz
d4e2493639
zink: avoid cached memory allocations when not requested
...
don't rely on driver orderings to not pick this
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9981 >
2021-04-04 22:22:20 -04:00
Dave Airlie
0799312b99
lavapipe: add support for KHR_imageless_framebuffer
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10032 >
2021-04-05 11:33:55 +10:00
Mike Blumenkrantz
8aed6cc50d
features: mark off ARB_shader_viewport_layer_array for zink
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10025 >
2021-04-05 00:19:23 +00:00
Mike Blumenkrantz
9490c1ca92
zink: enable PIPE_CAP_TGSI_TES_LAYER_VIEWPORT
...
should've done this when PIPE_CAP_TGSI_VS_LAYER_VIEWPORT was enabled
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10025 >
2021-04-05 00:19:23 +00:00
Mike Blumenkrantz
b89359fb92
zink: only emit SpvCapabilitySampleMaskPostDepthCoverage if the mode is set
...
this isn't always applicable
Fixes: 3c72c86742 ("zink: Wire up ARB_post_depth_coverage")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10018 >
2021-04-05 00:11:30 +00:00
Mike Blumenkrantz
411f924bf9
zink: store shader_info to ntv_context struct
...
tired of adding more and more bool flags here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10018 >
2021-04-05 00:11:30 +00:00
Joshua Ashton
6420be4488
lavapipe: enable KHR_image_format_list
...
Needed for DXVK.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10027 >
2021-04-04 23:59:24 +00:00
Joshua Ashton
36115d2674
lavapipe: implement CmdBindVertexBuffers with CmdBindVertexBuffers2EXT
...
Easier than fixing the broken size logic here.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10028 >
2021-04-04 23:48:33 +00:00
Joshua Ashton
44efd2dd1f
lavapipe: handle NULL pStrides in CmdBindVertexBuffers2EXT
...
Fixes: 20bd9fc547
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10028 >
2021-04-04 23:48:33 +00:00
Jason Ekstrand
cc2a4ff880
anv: Fix coverage masks for VK_EXT_conservative_rasterization
...
Earlier, I just tried to copy what iris was doing and, as it turns out,
copied it wrong. Also, Vulkan doesn't have a concept of getting the
conservative coverage in the shader. The spec for SampleMask says:
"Decorating a variable with the SampleMask built-in decoration will
make any variable contain the coverage mask for the current fragment
shader invocation."
And the spec for conservative rasterization says
"When overestimate conservative rasterization is enabled, rather
than evaluating coverage at individual sample locations, a
determination is made of whether any portion of the pixel (including
its edges and corners) is covered by the primitive. If any portion
of the pixel is covered, then all bits of the coverage mask for the
fragment corresponding to that pixel are enabled."
Putting these two together and you get what the Intel HW docs say for
ICMS_NORMAL:
"Input Coverage masks based on inner conservatism and factors in
SAMPLE_MASKs. If Pixel is conservatively fully covered all samples
are enabled."
So I'm pretty sure based on this that the right thing to do here is to
ignore conservative rasterization and leave it set to ICMS_NORMAL
whenever we're not in the post-depth-coverage special case.
While we're here, fix the silly indentation.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4565
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: d5b56debde "anv: Implement VK_EXT_conservative_rasterization"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10017 >
2021-04-04 17:39:32 +00:00
Mauro Rossi
1b3a0f8829
vulkan/util: Fix implicit declaration of ffs for Android build
...
Similar to 641320ce02 and 68bb26af63 to avoid Android build errors
Fixes the following building error:
In file included from external/mesa/src/vulkan/util/vk_util.c:28:
external/mesa/src/vulkan/util/vk_util.h:248:30: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return (gl_shader_stage) (ffs((uint32_t) vk_stage) - 1);
^
1 error generated.
Fixes: 06ebbde630 ("vulkan: Deduplicate mesa stage conversion")
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10023 >
2021-04-04 17:04:04 +02:00
Alyssa Rosenzweig
11010b932b
pan/bi: Lower large arrays to scratch
...
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10020 >
2021-04-03 19:18:55 +00:00
Alyssa Rosenzweig
f5d1a8bf6f
pan/bi: Split writemasks for memory stores
...
Will avoid a regression in the following commit, and probably fixes some
GLES3.1 stuff.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10020 >
2021-04-03 19:18:55 +00:00
Alyssa Rosenzweig
52863f2e60
pan/bi: Enable all nir_opt_move/sink optimizations
...
total instructions in shared programs: 116716 -> 116716 (0.00%)
total nops in shared programs: 86280 -> 84996 (-1.49%)
nops in affected programs: 50485 -> 49201 (-2.54%)
Nops are helped.
total clauses in shared programs: 20993 -> 20732 (-1.24%)
clauses in affected programs: 7737 -> 7476 (-3.37%)
Clauses are helped.
total quadwords in shared programs: 91697 -> 91155 (-0.59%)
quadwords in affected programs: 52123 -> 51581 (-1.04%)
Quadwords are helped.
total spills in shared programs: 0 -> 0
total fills in shared programs: 0 -> 0
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10020 >
2021-04-03 19:18:55 +00:00
Christian Gmeiner
0bd01e86f3
ci/bare-metal: no need to use tee
...
fastboot_run.py will watch results/serial-output.txt.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9976 >
2021-04-03 18:56:13 +00:00
Alyssa Rosenzweig
06ebbde630
vulkan: Deduplicate mesa stage conversion
...
Across every driver...
v2: Add casts to appease -fpermissive used on CI.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9477 >
2021-04-03 17:34:39 +00:00
Alyssa Rosenzweig
7ace3f3ef0
panfrost: Only check blend work count on midgard
...
Bifrost will handle this "automatically" by virtue of the blend ABI.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:53:28 -04:00
Alyssa Rosenzweig
5cef39acbe
panfrost: Deduplicate Bifrost fau_count
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
3fdd3be8d6
panfrost: Deduplicate UBO count assignment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
6a9936f5b5
pan/bi: Remove stale todo/assert
...
Was already handled, just untested.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
10b736f160
pan/bi: Remove TODO: RA warnings
...
We'll make this perfectly valid syntax for precolouring.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
93cdb072a8
pan/bi: Only run DCE once
...
No more progress loop needed. I'm skeptical we really want a dataflow
approach long-term, though, this is annoyingly expensive.
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
b7a339bc97
pan/bi: Only run copyprop once
...
We need to update `replacement` with the results of copyprop earlier
within the pass, but after that there's no point running more than once
if we're not going to materialize any new moves.
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
69666723f8
pan/bi: Handle 16-bit blend sr_count
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
d91bf7257d
pan/bi: Add bi_foreach_block_rev
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Alyssa Rosenzweig
8fde30925d
pan/bi: Document register conventions
...
Should motiviate RA decisions.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9421 >
2021-04-03 12:47:29 -04:00
Danylo Piliaiev
0ec495e3c9
turnip: handle format list for compressed formats
...
Compressed formats may have compatible formats, however they could
only be sampled, so we should not call tu6_format_color with them.
tu6_format_texture should have the same behaviour for checking swap
so use it for all cases.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10009 >
2021-04-02 21:52:05 +00:00
Matti Hamalainen
e4e476c9a5
gallium: Fix broken trace XML output
...
Each call argument in the trace dump should be a separate <arg>
element. In this case the trace_dump_struct_array() needs to have
trace_dump_arg_begin() and trace_dump_arg_end() surrounding it,
otherwise it becomes just random data inside the parent call.
Also fix another case where one <arg> element erraneously contains
another <arg> element by moving trace_dump_arg_end() to its
proper place.
Signed-off-by: Matti Hamalainen <ccr@tnsp.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9994 >
2021-04-02 20:58:53 +00:00
Gert Wollny
004ca76238
r600/sfn: Only fetch the constants that are needed in fdd*
...
The number of source components can be deternmined based on the number
of dest components, and copying other components to the gradient get
call is not required.
Closes #4557
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10011 >
2021-04-02 20:33:37 +00:00
Eric Anholt
dee89af505
ci: Uprev piglit to 6a4be9e9946d ("piglit: NOTE! Default branch is now main")
...
Along with other new tests, brings in the perf improvement for
gl-1.3-texture-env so we can stop skipping it.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9806 >
2021-04-02 18:42:04 +00:00
Eric Anholt
1b35cc29dd
ci: Uprev deqp runner to 0.6.5.
...
Works around the other Missing case we've seen in CI, possibly fixes the
underlying issue, and adds support for comments in xfails lists.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9806 >
2021-04-02 18:42:04 +00:00
Eric Anholt
f67b6f9c47
ci/freedreno: Fix up the a5xx border color flake annotation.
...
Looks like I put it in the wrong file back when I first caught it. It's a
one-or-twice-a-week back flake that seems to happen. The upcoming
deqp-runner uprev would have caught this mistake.
Fixes: 957132294f ("ci/a5xx: Increase the gles3/31 coverage.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9806 >
2021-04-02 18:42:04 +00:00
Anuj Phogat
051b7e1925
intel: Rename WA_### to Wa_###
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "WA_[[:digit:]]{10}" -rIl $SEARCH_PATH | xargs sed -ie "s/WA_\([[:digit:]]\{10\}\)/Wa_\1/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
f96c3b8b63
intel: Rename GEN:BUG:### to Wa_###
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN:BUG:" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN\(:BUG:\)/Wa_/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
69c3578c8b
intel: Rename GEN_{ALL, LT, ..} macros to GFX_{ALL, LT, ..}
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN_" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_\(ALL\|GE\|GT\|LT\|LE\)\([^[:alnum:]]\)/GFX_\1\2/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
ddb04b31fd
intel: Remove unused MAKE_GEN macro
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
81e85f9434
intel: Make line wrapping changes due to IS_GFX_VER_BETWEEN
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
efc863f9a1
intel: Rename IS_GEN* macros to IS_GFX_VER*
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "IS_GEN" -rIl $SEARCH_PATH | xargs sed -ie "s/IS_GEN/IS_GFX_VER/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
e7e55af4d6
intel: Rename GENx keyword to GFXx
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN\([[:digit:]]\+\)/GFX\1/g"
Exclude the changes to modifiers:
grep -E "I915_.*GFX" -rIl $SEARCH_PATH | xargs sed -ie "s/\(I915_.*\)GFX/\1GEN/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
1d296484b4
intel: Rename Genx keyword to Gfxx
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "Gen[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/Gen\([[:digit:]]\+\)/Gfx\1/g"
Exclude changes in src/intel/perf/oa-*.xml:
find src/intel/perf -type f \( -name "*.xml" \) | xargs sed -ie "s/Gfx/Gen/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
b75f095bc7
intel: Rename genx keyword to gfxx in source files
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/gen\([[:digit:]]\+\)/gfx\1/g"
Exclude pack.h and xml changes in this patch:
grep -E "gfx[[:digit:]]+_pack\.h" -rIl $SEARCH_PATH | xargs sed -ie "s/gfx\([[:digit:]]\+_pack\.h\)/gen\1/g"
grep -E "gfx[[:digit:]]+\.xml" -rIl $SEARCH_PATH | xargs sed -ie "s/gfx\([[:digit:]]\+\.xml\)/gen\1/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
66f6535974
intel: Rename genx keyword to gfxx in build files
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
find $SEARCH_PATH -type f \( -name "*.mk" -o -name "*.sources" -o -name "*.build" \) | xargs sed -ie "s/gen\([[:digit:]]\+\)/gfx\1/g"
Exclude --device-prefix, xml and _pack.h changes in this patch:
find $SEARCH_PATH -type f \( -name "*.mk" -o -name "*.sources" -o -name "*.build" \) | xargs sed -ie "s/gfx\([[:digit:]]\+_pack\.h\)/gen\1/g"
find $SEARCH_PATH -type f \( -name "*.mk" -o -name "*.sources" -o -name "*.build" \) | xargs sed -ie "s/gfx\([[:digit:]]\+\.xml\)/gen\1/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
c1f3a778de
intel: Rename GENx prefix in macros to GFXx in source files
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN" -rIl src/intel/genxml | grep -E ".*py" | xargs sed -ie "s/GEN\([%{]\)/GFX\1/g"
grep -E "[^_]GEN[[:digit:]]+" -rIl $SEARCH_PATH | grep -E ".*(\.c|\.h|\.y|\.l)" | xargs sed -ie "s/\([^_]\)GEN\([[:digit:]]\+\)/\1GFX\2/g"
Leave out renaming GFX12_CCS_E macros. They fall under renaming pattern like "_GEN[[:digit:]]+":
grep -E "GFX12_CCS_E" -rIl $SEARCH_PATH | xargs sed -ie "s/GFX12_CCS_E/GEN12_CCS_E/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
0cfe7e3968
intel: Rename GENx prefix in macros to GFXx in build files
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN[[:digit:]]+[[:alpha:]_]*_FILES" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN\([[:digit:]]\+[[:alpha:]_]*_FILES\)/GFX\1/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
dc28390e3c
intel: Rename genx keyword in filenames to gfxx
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
find $SEARCH_PATH -type f -name "*gen[[:digit:]]*.*[cph]" -exec sh -c 'f="{}"; mv -- "$f" "${f/gen/gfx}"' \;
grep -E "gen[[:digit:]]+_[[:alnum:]_]*\.(c|h|cpp)" -rIl $SEARCH_PATH | xargs sed -ie "s/gen\([[:digit:]]\+_[[:alnum:]_]*\.\)\(c\|h\|cpp\)/gfx\1\2/g"
grep -E "_gen[[:digit:]]+[[:alnum:]_]*\.(c|h|cpp)" -rIl $SEARCH_PATH | xargs sed -ie "s/\(_\)gen\([[:digit:]]\+[[:alnum:]_]*\.\)\(c\|h\|cpp\)/\1gfx\2\3/g"
grep -E "GEN[[:digit:]]+[[:alnum:]_]*_H( |$)" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN\([[:digit:]]\+[[:alnum:]_]*_H\)\( \|$\)/GFX\1\2/g"
Exclude the "_pack.h" changes:
grep -E "gfx[[:digit:]]+_pack\.h" -rIl $SEARCH_PATH | xargs sed -ie "s/gfx\([[:digit:]]\+_pack\.h\)/gen\1/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
abe9a71a09
intel: Rename gen field in gen_device_info struct to ver
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "info\)*(.|->)gen" -rIl $SEARCH_PATH | xargs sed -ie "s/info\()*\)\(\.\|->\)gen/info\1\2ver/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
99331f6deb
intel: Rename genx10 field in gen_device_info struct to verx10
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "info\)*(.|->)genx10" -rIl $SEARCH_PATH | xargs sed -ie "s/info\()*\)\(\.\|->\)genx10/info\1\2verx10/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
cc422fa498
intel: Rename ISL_DEV_GEN to ISL_GFX_VER
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "ISL_DEV_GEN" -rIl $SEARCH_PATH | xargs sed -ie "s/ISL_DEV_GEN/ISL_GFX_VER/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
9da8a55b08
intel: Rename GEN_GEN macro to GFX_VER
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN_GEN" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_GEN/GFX_VER/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:06 +00:00
Anuj Phogat
295bb3c263
intel: Rename GEN_VERSIONx10 macro to GFX_VERx10
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN_VERSION" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN_VERSION/GFX_VER/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:06 +00:00
Ilia Mirkin
b9b4324ca3
mesa: fix restoring of texture attributes for msaa binding points
...
This fixes rendering in Unigine Tropics with MSAA enabled. Since the
binding for MSAA does not get restored, we can't rely on the "defaults
get restored below" logic in that case.
Fixes: 81e6f6ef0c (mesa: don't push/pop default texture attributes redundantly)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4558
Reported-by: Andrew Randrianasulu <randrianasulu@gmail.com >
Signed-off-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/10001 >
2021-04-02 17:49:59 +00:00
Jesse Natalie
f447c69653
spirv_to_dxil: Handle clip/cull distance
...
Clip/cull only needs a little bit of lowering before nir_to_dxil can
handle it. Specifically, we just need to split apart arrays that
straddle the 4-component boundary of location, so that the signature
builder can handle it.
To do that cleanly, we need to add some lowering and optimization passes:
* nir_lower_clip_cull_distance_arrays: Merge clip/cull into a single array,
which is similar to DXIL's requirements here.
* nir_lower_io_to_temporaries: Ensure that we only have one non-indirect write
to the clip/cull output.
* nir_split_var_copies and nir_lower_var_copies: Ensure that each array entry
has an independent write with a constant index
* Optimization loop: Make sure that there's no extra derefs in the way between
deref_var for the output, deref_array for the component, and store_deref.
Then we can actually lower the clip/cull array cleanly.
Still to do is to sort the variables and add driver_location.
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Jesse Natalie
39aa32b838
microsoft/spirv_to_dxil: Implement TODO for removing dead functions
...
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Jesse Natalie
bd64669fa7
d3d12: Use compact arrays for clip/cull distance
...
This puts us more in line with other drivers, and matches what
SPIR-V would produce rather than the GLSL compiler. It also means
we can delete the current fixup pass, since previously clip distance
was always float4s but some components could go unused. Now, clip
distance is an array that's appropriately sized for what's actually
written.
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Jesse Natalie
baeb363df0
microsoft/compiler: Support compact arrays for clip/cull in nir_to_dxil
...
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Jesse Natalie
4941decc58
microsoft/compiler: Enable dxil_nir.h to be included from C++
...
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Jesse Natalie
65e1bee99c
microsoft/compiler: Add a lowering pass to split clip/cull distance compact arrays
...
As the pass's comment explains, NIR compact arrays are a better match
to represent the GLSL float[] design of clip/cull distance arrays, compared
to the float4[2] approach. This pass adjusts the variables to more closely
match what DXIL signatures would look like for that representation.
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Jesse Natalie
96cd961853
microsoft/compiler: Add copy_prop_vars to optimization loop
...
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Jesse Natalie
3f1b90d638
microsoft/compiler: Move blob_init earlier to prevent crash on failure
...
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Acked-by: Michael Tang <tangm@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Michael Tang
cb5120bcf7
microsoft/spirv_to_dxil: Add extra lowering functions according to the docs on nir_inline_functions
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Michael Tang
2f3dc0264c
microsoft/spirv_to_dxil: Add lowering pass to handle gl_PerVertex
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9846 >
2021-04-02 17:16:48 +00:00
Mike Blumenkrantz
fbebe36547
features: mark off GL_OES_viewport_array for zink
...
also done for a while
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10007 >
2021-04-02 11:35:44 -04:00
Mike Blumenkrantz
8199bd653e
features: mark off ARB_compute_variable_group_size for zink
...
this has been implemented for a long time
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10007 >
2021-04-02 11:30:21 -04:00
Adrian Ratiu
8371b75241
docs: docker: minor stale documentation fix
...
Commits like the following changed the script names and distro tag
but didn't update the documentation. We do not explicitely mention
script names because they will likely change in the future but the
distro tag is less likely to change because it is shared with the
upstream ci-templates repo.
Fixes: af7dca3560 ("ci: Update the ci-templates commit.")
Fixes: 506e9d5fc7 ("gitlab-ci: Rename container install scripts to ...")
Fixes: c6c7652753 ("gitlab-ci: Organize images using new REPO_SUFFIX ...")
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9781 >
2021-04-02 15:16:54 +00:00
Mike Blumenkrantz
9d8dd8d27b
zink: add some asserts to avoid zero-sized blit regions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9999 >
2021-04-02 14:14:57 +00:00
Mike Blumenkrantz
44076a3d6c
zink: fix layercount for array texture blits
...
3d is base, base+count, array is base, count
Fixes: 83bee837e5 ("zink: be more explicit about blit layer/depth usage")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9999 >
2021-04-02 14:14:57 +00:00
Marek Olšák
5e4d31f646
ac/surface/tests: move shareable code into ac_surface_test_common.h
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
b3e6514984
radeonsi: don't use CP DMA for clears/copies except for very small ones
...
The current compute shaders are much faster.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
64cbab5348
radeonsi: turn the loops over color buffers into while loops in si_clear
...
NULL color buffers are not set in "buffers" here.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
5ba77c4a5d
radeonsi: unset PIPE_CLEAR_* flags for non-existent buffers
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
0580d4c1a2
radeonsi: enable HTILE with mipmapping on gfx9+
...
Everything seems to be there except fast clears.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
4e35eb1d69
radeonsi: set better default depth clear value
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
3345e32de7
radeonsi: group and parallelize all clears in si_texture_create_object
...
This reduces aux_context flushes significantly.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
cb6e1c7c11
radeonsi: add num_layers variable into si_do_fast_color_clear
...
in preparation for the next commit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
1936a046b1
radeonsi: return success/failure from si_alloc_separate_cmask
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
8cd61d1248
radeonsi: parallelize CMASK and DCC clears
...
Clearing 8 RTs with both DCC and CMASK caused 16 synchronized clears where
we also did 16 times WAIT_REG_MEM for CB flushes that were 15 times
useless.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
d0f06e5c47
radeonsi: remove si_screen::dcc_msaa_allowed
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
4707dc6a64
radeonsi: determine accurately whether the framebuffer state has DCC MSAA
...
We only need to check storage samples, which is what affects DCC.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
933df67296
ac/surface: add CMASK info for level 0
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
b3e7c77f13
amd: fix parsing the last dword of DMA_DATA packets
...
It was parsing it as SQ_WAVE_GPR_ALLOC instead of COMMAND.
Change the offset to an odd number to work around it.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
95940459be
radeonsi: pack the variable block size in one SGPR, 10 bits per component
...
The side effect of this is that the compute copy image shader now has
enough free user SGPRs that it passes the src image via user SGPRs,
resulting in lower wave lifetime.
Previous copy shader:
s_load_dwordx8
image_load
s_load_dwordx8
s_waitcnt
image_store
Current copy shader:
image_load
s_load_dwordx8
s_waitcnt
image_store
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
034c1e4845
radeonsi: decrease the maximum variable block size
...
to allow packing the block size in 1 user SGPR with 10 bits per component,
so that block sizes such as 512x1x1 fit in there.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
ad71ef9326
radeonsi: don't use a constant buffer for the copy_image compute shader
...
just use user SGPRs and 16-bit values for the x,y,z coordinates.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
5701baa34b
radeonsi: don't use constbuf and set cache policy for 12-byte clear shader
...
This removes the constant buffer and sets the cache policy like other
compute shaders.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
7d14eb623b
radeonsi: return false from si_is_format_supported instead of NULL
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
c53261645d
radeonsi: add SI_CONTEXT_PFP_SYNC_ME to skip syncing PFP for image operations
...
DCC/CMASK/HTILE clears will not set this. We could do a better job
at not setting this in other cases too
Image copies also don't set this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
4fb1b7b2d8
radeonsi: use the optimal packet order before draw packets for VS flushes too
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
b1a73ec99b
radeonsi: rename and apply SI_OP_CPDMA_SKIP_CACHE_FLUSH to compute as well
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
419e05d5f6
radeonsi: don't do an L2 flush in compute_do_clear_or_copy if we're not syncing
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
aed881e34e
radeonsi: reduce syncing in si_compute_expand_fmask when it's already idle
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
5c827bde29
radeonsi: reduce syncing for initializing new buffers
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
207bafd4dd
radeonsi: reduce syncing in si_dcc_decompress
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
7e2b5ce722
radeonsi: set compute/cpdma sync flags in the outermost caller
...
This allows us to control syncing everywhere.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
a4ad08b455
radeonsi: inline clear_buffer in si_screen_clear_buffer
...
We'll add a new parameter there.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
1af99a28a0
radeonsi: merge CP DMA flags with internal compute flags
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
dd5e9af78f
radeonsi: remove unused SI_CP_DMA_SKIP_* definitions
...
The existing uses had no effect.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
938dc0e291
radeonsi: rename internal compute sync flags
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
69ff9c16bb
radeonsi: never set DISABLE_WR_CONFIRM for CP DMA clears and copies
...
Only prefetches set it. Unsynchronized clears and copies shouldn't set it
because syncing later wouldn't wait for the writes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
28d065d3e5
radeonsi: don't insert start/stop pipeline stat events if it has no effect
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
cb59cae04c
radeonsi: set the clear/copy cache policy based on L2 cache size
...
This matches the intent.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
8ea685dfc0
radeonsi: disable sparse buffers on gfx7-8
...
Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Marek Olšák
ac78b12e23
ac/llvm: don't set unsupported xnack options to fix LLVM crashes on gfx6-8
...
LLVM prints an error if xnack is unsupported and it uses a global stream
object that is not thread-safe. Since Mesa uses multiple threads to compile
shaders, there is a small chance that it will crash.
Just don't set any xnack options to use LLVM defaults.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4439
Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9795 >
2021-04-02 12:05:00 +00:00
Samuel Pitoiset
57916fbdcd
radv: use COLOR_ATTACHMENT_OPTIMAL for fast clear/hw resolve operations
...
This should be equivalent without needed to force enable FMASK for
some specific internal pipelines.
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/9940 >
2021-04-02 08:36:19 +02:00
Samuel Pitoiset
fc2186d302
radv: do not force enable FMASK during MSAA blits
...
This is no longer needed since FMASK is also compressed for
transfer dst operations.
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/9940 >
2021-04-02 08:36:16 +02:00
Samuel Pitoiset
6dbf975cb9
radv: cleanup FMASK expand transitions
...
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/9990 >
2021-04-02 06:34:45 +00:00
Samuel Pitoiset
87c8764448
radv: compress FMASK for all layouts except GENERAL
...
The COMPRESSION bit is FMASK and this is much faster! Should
speedup transfer dst operations with MSAA images considerably.
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/9990 >
2021-04-02 06:34:45 +00:00
Eric Anholt
adf04d1af4
ci/freedreno: Switch to the trimmed glxgears trace.
...
The old one had a ton of frames and took ~5 minutes on a306.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9957 >
2021-04-01 21:04:11 +00:00
Eric Anholt
fe5349f70c
freedreno/a6xx: Fix alpha tests.
...
Apparently I inverted the sense of this flag back when we didn't have
piglit testing. Fixes terrible rendering in minetest, HL2, CS:Source, and
CS.
Fixes: 0369dd9077 ("freedreno/a6xx: Add ARB_depth_clamp and separate clamp support.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9957 >
2021-04-01 21:04:11 +00:00
Eric Anholt
3043940183
freedreno/a5xx: Fix alpha test vs early Z bugs.
...
Just like with discards, we have to disable early Z writes when alpha test
is enabled.
Fixes rendering on HL2, CS: Source, counter-strike, and minetest.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9957 >
2021-04-01 21:04:11 +00:00
Eric Anholt
c9fd8c2570
ci/freedreno: Add trace testing on a3xx, a5xx.
...
Having compared rendering between a6xx and these, I found several bugs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9957 >
2021-04-01 21:04:11 +00:00
Eric Anholt
8e3a1d0dd2
ci/freedreno: Rename a306-test and a530-test to drop "arm64" from the name.
...
We don't have an armhf variant, and probably won't. Now matches a630.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9957 >
2021-04-01 21:04:11 +00:00
Eric Anholt
ec54546b2a
ci/freedreno: Add more new traces for a630 (minetest, TDM, pioneer, glyphy).
...
These are all recent traces that have been added.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9957 >
2021-04-01 21:04:11 +00:00
Mike Blumenkrantz
3d55998504
zink: emit ImageCubeArray cap when accessing arrayed cube dimension images
...
required by spec
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9987 >
2021-04-01 20:05:06 +00:00
Mike Blumenkrantz
ccbaf31f3c
zink: use max_rt to determine number of blend state attachments
...
this is more consistent with how gallium applies the states
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9988 >
2021-04-01 19:55:00 +00:00
Erik Faye-Lund
7dc1b57abb
bin/gen_release_notes.py: more robust rST escaping
...
This copies code from the xml2rst to escape rST strings. Hopefully this
will be more robust than what we've done so far.
I really wish docutils would have utils for this directly, seems kinda
essential.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9917 >
2021-04-01 19:53:03 +00:00
Erik Faye-Lund
997c94eb33
ci: turn sphinx-build warnings into errors
...
This should make it harder to accidentally introduce formatting issues
into the docs.
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9914 >
2021-04-01 19:36:05 +00:00
Erik Faye-Lund
ecc677a02f
docs: fix release notes for 20.3.5
...
This is incorrect escaping of the RST.
Fixes: 930d2a92a3 ("docs: add release notes for 20.3.5")
Acked-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9914 >
2021-04-01 19:36:05 +00:00
Pierre-Eric Pelloux-Prayer
d0fefddf4a
vbo/dlist: use DrawGallium(Complex)
...
We can build the needed structs during list compilation and then
use DrawGallium (if one draw or a single primitive mode is used) or DrawGalliumComplex
otherwise.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9533 >
2021-04-01 19:16:39 +00:00
Pierre-Eric Pelloux-Prayer
43e243762f
mesa: make _mesa_HashTable InDeleteAll debug only
...
It's only used in asserts so we can wrap it inside
This makes the struct 32 bytes instead of 40 in release
builds.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9533 >
2021-04-01 19:16:39 +00:00
Pierre-Eric Pelloux-Prayer
e26f261c7e
mesa/hash: switch to simple_mtx
...
simple_mtx are faster and smaller (4 bytes instead of 8) so switch to using them.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9533 >
2021-04-01 19:16:39 +00:00
Pierre-Eric Pelloux-Prayer
0a78c22666
mesa/hash: make the mtx non-recursive
...
Now that no one is recursively locking it we can switch to
a plain mutex.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9533 >
2021-04-01 19:16:39 +00:00
Pierre-Eric Pelloux-Prayer
46c4ae5ff1
mesa: remove 2 recursive lock usages of _mesa_HashTable
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9533 >
2021-04-01 19:16:39 +00:00
Pierre-Eric Pelloux-Prayer
bb108bdec7
dlist: remove ListExt feature
...
This is only used by vbo_save_api so let's simplify the code and add a normal
opcode for this one.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9533 >
2021-04-01 19:16:39 +00:00
Dave Airlie
89b6d70c1c
zink/ci: update results after lavapipe clear fixes
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9971 >
2021-04-01 19:05:29 +00:00
Dave Airlie
fe53c22294
lavapipe: fix only clearing depth or stencil paths.
...
This fixes the ds clears path to clear only depth or stencil
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9971 >
2021-04-01 19:05:29 +00:00
Ian Romanick
7878497c94
mesa: Clean up _mesa_layout_parameters after previous commit
...
After the previous change, PASS 1 can be trivially pulled out of the
loop.
With PASS 1 removed, the loop can be unrolled, and a lot of code can be
deleted (from the unrolls). This saves a couple lines of code, and it
makes the function a little easier to follow.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9867 >
2021-04-01 18:42:36 +00:00
Ian Romanick
9413c6aec3
mesa: Add anything dynamically indexed before any non-dynamically indexed
...
Things that are not dynamically indexed must be added last. This is
necessary so that values that are both statically indexed (or used
directly) and dynamically indexed will only be added once. With the
above change, if the constant 47 is used as a literal in an instruction
and in an array that is dynamically indexed, it will be added to
`Parameters` twice. On (really old) GPUs that store constants and other
parameters in the same storage, this can cause some valid programs to
exceed the storage limits. I don't know about R300 or NV30, but R200
was limited to something like 256 vec4s. This applies to constants,
state parameters, and local parameters (the assembly shader version of
uniforms).
The problem this causes here is that the final parameter layout created
in `_mesa_layout_parameters` may have more parameters than the input
layout. The fundamental assumption of that routine (and documented as
an assumption of `copy_indirect_accessed_array`) is that the input size
and the output size will be the same.
The affected shader had something like below. This is a common pattern
for ARB assembly shaders generated by NVIDIA's cgc compiler. As far as
I can tell, the majory of applications that use ARB assembly shaders
either use cgc or use some sort of DX9 crosscompiler... that generates
similar patterns.
PARAM c[141] = { program.local[0..133],
{ 255, 0.1, 3, 1 },
{ 0.5, 2, 0.15915491, 0.25 },
{ 0, 0.5, 1, -1 },
{ 24.980801, -24.980801, -60.145809, 60.145809 },
{ 85.453789, -85.453789, -64.939346, 64.939346 },
{ 19.73921, -19.73921, -9, 0.75 },
{ -999999 } };
The shader contains instructions like
MUL R0.x, R0, c[135].y;
and
DP4 R2.z, c[A0.x + 6], R1;
Starting with b9bff76b63 , the constants at the end of `c` would get
added to `Parameters` twice. The first time they are added due to
instructions that directly access the array (e.g., the `c[135].y`
above). The second time is because they are part of an array that is
dynamically indexed. As a result, the final layout of Parameters
(calculated by `_mesa_layout_parameters`) is 7 elements larger than the
input layout.
Since bcc61a01d4 fixed the allocation size of `ParameterValues`,
`copy_indirect_accessed_array` will now write past the end of the array.
The eventually results in a crash in `free`. Thankfully Valgrind was
able to help find the real source of the problem.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Fixes: b9bff76b63 ("mesa: put constants before state vars for ARB programs")
Closes : #4505
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9867 >
2021-04-01 18:42:36 +00:00
Adam Jackson
04b28b9375
mesa/st: Check for successful framebuffer allocation in st_api_make_current
...
Ran into this while trying to rework fbconfig setup, due to a bug I
ended up trying to allocate a PIPE_FORMAT_NONE framebuffer, which failed
like you'd hope, but which we weren't converting into an error in
st_api_make_current. Instead we'd treat it like binding no drawable to
the context, which is really not what was asked for, so let's go ahead
and make this an error.
Reviewed-by: Eric Faye-Lund <kusmabite@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9956 >
2021-04-01 18:14:33 +00:00
Adam Jackson
95be3c9b6d
mesa/st: Remove unused ST_ATTACHMENT_SAMPLE
...
Not sure what this was supposed to do, but whatever it did, it doesn't.
Reviewed-by: Eric Faye-Lund <kusmabite@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9956 >
2021-04-01 18:14:33 +00:00
Danylo Piliaiev
ce1a381e57
turnip: enable VK_KHR_16bit_storage on A650
...
A650 can use the same SSBO descriptor for both 32-bit and 16-bit access,
which makes it easy to enable this extension.
Passes tests that run under:
dEQP-VK.spirv_assembly.instruction.*.16bit_storage.*
Rebased and modified commit from Jonathan Marek.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9840 >
2021-04-01 17:51:07 +00:00
Jonathan Marek
14acc64c3b
turnip: enable VK_KHR_shader_float16_int8
...
ir3 supports 16-bit floats, so we can enable this.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9840 >
2021-04-01 17:51:07 +00:00
Danylo Piliaiev
64aaa4afc3
turnip: enable infinities for f16 math and document the register
...
When float16 is enabled this will allow to pass a number of
float16 tests.
When A6XX_SP_FLOAT_CNTL_F16_NO_INF is set - all operations which
generate +-infinity generate +-MAX_HALF_FLOAT.
Fixes some tests from:
dEQP-VK.spirv_assembly.instruction.*.float16.*
dEQP-VK.spirv_assembly.instruction.*.float_controls.fp16.*
E.g.:
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_1.sinh_vert
dEQP-VK.spirv_assembly.instruction.compute.float16.arithmetic_4.length
dEQP-VK.spirv_assembly.instruction.compute.float_controls.fp16.input_args.log_denorm_flush_to_zero_nostorage
dEQP-VK.spirv_assembly.instruction.compute.float_controls.fp16.input_args.log2_denorm_flush_to_zero_nostorage
dEQP-VK.spirv_assembly.instruction.compute.float_controls.fp16.input_args.inv_sqrt_denorm_flush_to_zero_nostorage
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9840 >
2021-04-01 17:51:07 +00:00
Danylo Piliaiev
14460faa64
ir3: convert shift amount to 16b for 16b shifts
...
NIR has shifts defined as:
opcode("*shr", 0, tuint, [0, 0], [tuint, tuint32], False, ...
However, in ir3 we have to ensure that both operators of shift
instruction have the same bitness.
Let's hope that in future the additional COV for constants would
be optimized away.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9840 >
2021-04-01 17:51:07 +00:00
Jonathan Marek
3777ecdf11
turnip: implement VK_KHR_shader_float_controls
...
This matches the blob and doesn't require actually implementing controls
since the supported modes are just what the HW does.
Passes tests under:
dEQP-VK.spirv_assembly.*.float_controls.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9840 >
2021-04-01 17:51:07 +00:00
Danylo Piliaiev
de195671bd
ir3: nir_op_f2f16 should round to even
...
cat1 instructions round to zero by default.
When fp16 is enabled this will fix:
dEQP-VK.spirv_assembly.instruction.graphics.float_controls.fp16.input_args.rounding_rte_conv_from_fp32_nostorage_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls.fp16.input_args.rounding_rte_conv_from_fp32_nostorage_vert
dEQP-VK.spirv_assembly.instruction.compute.float_controls.fp16.input_args.rounding_rte_conv_from_fp32_nostorage
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9840 >
2021-04-01 17:51:07 +00:00
Keith Packard
8c7940cc0f
wsi/x11: Fix type of target_msc argument to x11_present_to_x11_dri3
...
Broken out of VK_GOOGLE_display_timing patch
Cc: stable
Co-author: Jakob Bornecrantz <jakob@collabora.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Signed-off-by: Keith Packard <keithp@keithp.com >
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9939 >
2021-04-01 17:39:47 +00:00
Andrii Simiklit
302dce9929
gitlab-ci: remove fixed tests
...
These tests are fixed by MR2333
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2333 >
2021-04-01 17:16:33 +00:00
Andrii Simiklit
7661320815
glsl/linker: Fix xfb stride alignment for buffers containing 64bit types
...
Per OpenGL 4.6 spec:
"If no xfb_stride qualifier is specified for a
binding point, the stride is derived by identifying the variable associated with the
binding point having the largest offset, and then adding the offset and the size of
the variable, in basic machine units. If any variable associated with the binding
point contains double-precision floating-point components, the derived stride is
aligned to the next multiple of eight basic machine units. If a binding point has no
xfb_stride qualifier and no associated output variables, its stride is zero."
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2333 >
2021-04-01 17:16:33 +00:00
Danylo Piliaiev
67e33db4a6
glsl/linker: Fix xfb with explicit locations and 64bit types
...
1) Per GL_ARB_enhanced_layouts if explicit location is set for varying,
each struct member, array element and matrix row will take
separate location. With GL_ARB_gpu_shader_fp64/GL_ARB_gpu_shader_int64
they may take two locations.
Examples:
| layout(location=0) dvec3[2] a; | layout(location=4) vec2[4] b; |
| | |
| 32b 32b 32b 32b | 32b 32b 32b 32b |
| 0 X X Y Y | 4 X Y 0 0 |
| 1 Z Z 0 0 | 5 X Y 0 0 |
| 2 X X Y Y | 6 X Y 0 0 |
| 3 Z Z 0 0 | 7 X Y 0 0 |
Previously it wasn't taken into account.
2) Captured double-precision variables should be aligned to
8 bytes per GL_ARB_gpu_shader_fp64:
"If any variable captured in transform feedback has double-precision
components, the practical requirements for defined behavior are:
...
(c) each double-precision variable captured must be aligned to a
multiple of eight bytes relative to the beginning of a vertex."
v2: fix `output_size` calculations
( Andrii Simiklit <andrii.simiklit@globallogic.com > )
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1667
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2333 >
2021-04-01 17:16:33 +00:00
Danylo Piliaiev
c432cb672a
glsl/linker: Fix attempts to split up 64bit varyings between slots
...
When packing varyings when there is only 32bit of space
left in slot 64bit type is attempted to be divided between
current and next slot. However there is neither code for
splitting the 64bit type nor for assembling it back.
Instead we add 32bit padding.
The above happens only in structs because their
members aren't sorted by packing order.
Example of the issue:
struct S {
vec3 a;
double d;
};
out flat S s;
Before, the packing went as:
slot 32b 32b 32b 32b
0 a.x a.y a.z d
1 d 0 0 0
After:
slot 32b 32b 32b 32b
0 a.x a.y a.z 0
1 d d 0 0
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2333 >
2021-04-01 17:16:33 +00:00
Michel Dänzer
6652c5018c
ci: Merge ARM testing docker images to a single arm_test one
...
The merged image contains kernels & rootfs for both arm64 & armhf
baremetal test jobs, and is smaller than either arm{64,hf}_test image
before.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9955 >
2021-04-01 16:35:26 +00:00
Michel Dänzer
4b20bd7425
ci: Build ARM baremetal rootfs in native container
...
Doing so in an x86 container via qemu was slow, and started failing
recently after updating to a newer qemu version.
This also results in smaller arm*_test* docker images, since we need to
install fewer Debian packages in them.
As a bonus, this turns some piglit tests from fail to pass (Or maybe
they'll turn out to be flakes? They've passed at least 3 times in a
row).
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9955 >
2021-04-01 16:35:26 +00:00
Michel Dänzer
b2ba889856
ci: Remove INCLUDE_PIGLIT
...
It was enabled by all callers.
Also remove the unused $CI_FAIRY_PACKAGES and $VK_CTS_PACKAGES
references.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9955 >
2021-04-01 16:35:26 +00:00
Eric Anholt
bd30a0bb85
ci: Drop the custom db820c kernel/dtb from the kernel+rootfs.
...
We use the CI-built kernel+rootfs these days. I haven't bumped image tags
because the files are definitely unused, and I'm rebuilding it all in the
next commit.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9955 >
2021-04-01 16:35:26 +00:00
Jesse Natalie
afc99f9175
wgl, d3d12: Add a d3d12-specific test for swapchain leaks
...
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9959 >
2021-04-01 16:19:41 +00:00
Jesse Natalie
1517fb25a4
d3d12: Clean up swapchains on framebuffer destruction
...
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9959 >
2021-04-01 16:19:41 +00:00
Jesse Natalie
aa1643d141
d3d12: Add a constant for num_buffers
...
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9959 >
2021-04-01 16:19:41 +00:00
Jesse Natalie
51df136c8b
wgl: Add a context to framebuffer destruction
...
If the window is destroyed on a thread that has a currently-bound
context, use that context for destroying the framebuffer. This
ensures that the winsys can wait for in-flight work before
destroying any resources.
If the window did have a context bound beforehand but it was unbound,
we should've already done a glFinish. If the window is destroyed from
an unrelated thread... well, we're screwed, but that's the best we can do.
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9959 >
2021-04-01 16:19:41 +00:00
Jesse Natalie
f3db2963ce
wgl: Add unit test infrastructure for OpenGL32.dll on Windows
...
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9959 >
2021-04-01 16:19:41 +00:00
Jesse Natalie
cbd38b8809
d3d12: Use CreateDXGIFactory2 and use the debug flag when appropriate
...
This enables leak detection and other debug messages for DXGI objects
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9959 >
2021-04-01 16:19:41 +00:00
Mike Blumenkrantz
fb5615af40
zink: zink_push_constant -> zink_gfx_push_constant
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9979 >
2021-04-01 11:28:44 -04:00
Samuel Pitoiset
4fc13a7321
radv: use a sampled image descriptor for reads for the MSAA color decompress
...
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/9915 >
2021-04-01 13:57:02 +00:00
Mike Blumenkrantz
ace0b16e8e
zink: use VkSubresourceLayout::depthPitch as layer_stride when mapping 3D imgs
...
this is not only more correct according to vk spec, it avoids having a 0-sized
layer_stride, which totally breaks the transfer map
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9969 >
2021-04-01 13:43:22 +00:00
Mike Blumenkrantz
83bee837e5
zink: be more explicit about blit layer/depth usage
...
same as for resource copying, ensure that it's very clear we're abiding
by vk spec for array vs 3d usage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9969 >
2021-04-01 13:43:22 +00:00
Jason Ekstrand
d5b56debde
anv: Implement VK_EXT_conservative_rasterization
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4480
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9960 >
2021-04-01 13:34:55 +00:00
Mike Blumenkrantz
bbb00f739c
zink: enforce device lost status
...
many apps don't request device-lost notification, so just calling the reset
callback isn't enough; once the device has been lost, no more cmdbufs should
be submitted and the queue should not be waited on
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9963 >
2021-04-01 13:25:51 +00:00
Mike Blumenkrantz
357b54c9bb
zink: optimize batch states for timeline use
...
finishing a timeline wait guarantees that a given fence has completed,
meaning the accompanying batch static is implicitly available for use
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9963 >
2021-04-01 13:25:51 +00:00
Mike Blumenkrantz
4dbeb92c7e
zink: add timeline semaphore fastpath for checking/triggering batch completion
...
we can avoid locking to access batch states in these cases by just using a semaphore
to fast-forward the gpu to the batch we need completed
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9963 >
2021-04-01 13:25:51 +00:00
Mike Blumenkrantz
9a13add12e
zink: hook up timeline semaphore signalling during batch submission
...
just basic parts, no waiting on semaphores yet
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9963 >
2021-04-01 13:25:51 +00:00
Mike Blumenkrantz
2d38fb7e61
zink: handle expired deferred fences more reasonably
...
now that there's some tracking for the last-finished batch id, this can
be used to detect when an application holds onto a sync object for way too long,
to the point that the sync object has expired so far into the past that we
no longer have any record of it existing
fixes things like unigine superposition
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9963 >
2021-04-01 13:25:51 +00:00
Mike Blumenkrantz
a4e34f40a3
zink: track last completed batch id to optimize checking states
...
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9963 >
2021-04-01 13:25:51 +00:00
Mike Blumenkrantz
122d01e73a
zink: add batch tracking id for program struct
...
this reduces overhead of batch tracking
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9967 >
2021-04-01 13:17:25 +00:00
Mike Blumenkrantz
1fdd906b21
zink: add set_context_param hook
...
for handling PIPE_CONTEXT_PARAM_PIN_THREADS_TO_L3_CACHE
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9970 >
2021-04-01 13:08:19 +00:00
Mike Blumenkrantz
a084d012a9
zink: handle PIPE_MAP_DONTBLOCK for buffer read maps
...
this is mostly used by queries
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9962 >
2021-04-01 12:57:51 +00:00
Rhys Perry
cc7a187411
nir/gather_info: implement partial masking of struct and compact I/O
...
fossil-db (Sienna):
Totals from 138 (0.10% of 138791) affected shaders:
CodeSize: 504060 -> 482136 (-4.35%)
Instrs: 97318 -> 94518 (-2.88%)
Cycles: 389272 -> 378072 (-2.88%)
VMEM: 14397 -> 14614 (+1.51%); split: +1.76%, -0.25%
SMEM: 9088 -> 9024 (-0.70%)
VClause: 2915 -> 2430 (-16.64%)
SClause: 1790 -> 1791 (+0.06%)
PreVGPRs: 5013 -> 4998 (-0.30%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8364 >
2021-04-01 10:15:44 +00:00
Rhys Perry
8731a1beb7
lavapipe: fix initialization of pipe_stream_output with unwritten outputs
...
nir_assign_io_var_locations() does not use outputs_written when assigning
driver locations. Use driver_location to avoid incorrectly guessing what
locations it assigned.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8364 >
2021-04-01 10:15:44 +00:00
Tony Wasserka
47ed5c57df
gitlab: rename RADV bug report template
...
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9923 >
2021-04-01 10:02:39 +00:00
Erik Faye-Lund
22fac1b682
docs: no-op'd -> disabled
...
"Disabled" is a common English word, that perfectly covers this usage.
So let's use that instead of this non-dictionary word.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9947 >
2021-04-01 08:33:41 +00:00
Erik Faye-Lund
a6e62c83ec
docs: spell out freedesktop.org
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9947 >
2021-04-01 08:33:41 +00:00
Erik Faye-Lund
86196fa3c0
docs: spell out environment
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9947 >
2021-04-01 08:33:41 +00:00
Erik Faye-Lund
24db6ee03f
docs: spell out development
...
The "-devel"-suffix is only helpful to RedHat users. Debian based
distros use "-dev" instead. But let's get out of the distro-specific
business, and instead just spell out "development", as this applies
regardless of naming-scheme.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9947 >
2021-04-01 08:33:41 +00:00
Erik Faye-Lund
1f35b05ee5
docs: spell out full name of gitlab instance
...
While we're at it, quote it so it's clear that it's something special.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9947 >
2021-04-01 08:33:41 +00:00
Erik Faye-Lund
69b25cee3b
docs: fix rst-quoting issues in release-notes
...
The first issue is benign, but the other two create rogue, invalid
links.
Fixes: ca79b041cb ("docs: add release notes for 21.0.0")
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9710 >
2021-04-01 08:15:08 +00:00
Erik Faye-Lund
87b83531bf
docs: fix invalid rst
...
We need a single empty line between the code-block state and the text
in the block, otherwise the rST is invalid and the entire block will be
dropped, as is currently the case on the website.
While we're at it, remove some needless colons from these code-blocks as
well. They're not needed, and we usually don't have these in the docs.
Fixes: a2a8c6a36c ("docs: Add some documentation of game GL buffer object mapping behavior.")
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9710 >
2021-04-01 08:15:08 +00:00
Lionel Landwerlin
200e56f84d
intel/fs: implement another copy propagation restriction
...
We are missing an additional restriction on CHV & upcoming Xe-Hp.
v2: Quote BSW PRMs (Curro)
Check source is not a scalar (Curro)
Fix comment (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9929 >
2021-04-01 07:48:06 +00:00
Tapani Pälli
b2af419391
iris: clamp PointWidth in 3DSTATE_SF like i965 does
...
Values match how MinimumPointWidth, MaximumPointWidth is setup. This
fixes assert hit in debug build when packing the struct with too large
value for genxml.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9942 >
2021-04-01 10:18:23 +03:00
Vinson Lee
ddab996589
Remove leftover dead code.
...
Fix defect reported by Coverity Scan.
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return;.
Fixes: bdf93f4e3b ("v3dv/cmd_buffer: return early for draw commands if there is nothing to draw")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9890 >
2021-03-31 21:04:50 -07:00
Timothy Arceri
3d1022382c
glsl: enforce restrictions on builtin functions moved to compat
...
Section 8.9.4 (Compatibility Profile Texture Functions) of the
GLSL 4.20 spec outlines a number of builtin texture functions that
have been moved to compatibility shaders.
This change enforces those restrictions. Note we don't worry about
enforcing restrictions on the EXT_gpu_shader4 extensions of these
functions because EXT_gpu_shader4 should only be enabled for compat
already.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9887 >
2021-04-01 02:41:40 +00:00
Bas Nieuwenhuizen
6dc07a173e
zink: Only set the needed number of scissors.
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9968 >
2021-03-31 20:48:38 -04:00
Bas Nieuwenhuizen
bde2291531
zink: Remove initialization of some arrays
...
We're only using the same number of elements we're writing to.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9968 >
2021-03-31 20:48:34 -04:00
Mike Blumenkrantz
6df7d8d40d
zink: ci updates
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9935 >
2021-03-31 20:16:13 -04:00
Mike Blumenkrantz
d179c5d28e
zink: implement threaded context
...
this includes:
* async buffer mapping/replacement
* async queue submission
* async (threaded) gallium flush handling
the main churn here is from handling async gallium flushes, which involves
creating multiple gallium fences (zink_tc_fence) for each zink fence (zink_fence).
a tc fence may begin waiting for completion at any time, even before the zink_fence
has had its cmdbuf(s) submitted, so handling this type of desync ends up needing
almost a complete rewrite of the existing queue architecture
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9935 >
2021-03-31 20:16:05 -04:00
Charmaine Lee
a442e3ff55
gallivm: increase size of texture target enum bitfield
...
Need to bump up the size of texture target bitfield for MSVC.
Fixes: 0ce7c4a7c9 ("gallivm: Use the proper enum for the texture target bitfield.")
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9928 >
2021-03-31 18:18:13 +00:00
Eric Anholt
0be9a40225
ci/freedreno: Demote a630-asan to a manual test for now.
...
It's flaky in producing Missing results. I've got an uprev that should
avoid the issue (and possibly a followon actual fix), but it's blocked on
being able to rebuild the arm containers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9932 >
2021-03-31 17:15:27 +00:00
Erik Faye-Lund
d448bf8cdd
docs: fix incorrect possessive form
...
When a word ends in an 's', the possessive form ends with a trailing
apostrophe instead.
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9946 >
2021-03-31 16:23:19 +00:00
Erik Faye-Lund
807d86718f
docs: dfsm -> DFSM
...
This abberation is spelled in all-caps other places in this document.
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9946 >
2021-03-31 16:23:19 +00:00
Erik Faye-Lund
ece806d07a
docs: lex / yacc -> Lex / Yacc
...
These are names, so use proper nouns for them.
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9946 >
2021-03-31 16:23:19 +00:00
Erik Faye-Lund
bd6dbbecb4
docs: lod -> LOD
...
While we're at it, fix a few cases of incorrect usage of apostrophes.
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9946 >
2021-03-31 16:23:19 +00:00
Erik Faye-Lund
2988729d1b
docs: nops -> NOPs
...
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9946 >
2021-03-31 16:23:19 +00:00
Erik Faye-Lund
2f42c21221
docs: Xorg -> X.Org
...
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9946 >
2021-03-31 16:23:19 +00:00
Erik Faye-Lund
9c1b8ce7aa
docs: opencl -> OpenCL
...
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9946 >
2021-03-31 16:23:19 +00:00
Erik Faye-Lund
35bf5c4dca
docs: optimisation -> optimization
...
We generally prefer US English in the docs over UK English.
Acked-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8572 >
2021-03-31 18:17:58 +02:00
Samuel Pitoiset
5c8a7fa631
radv: only set WRITE_COMPRESS_ENABLE for storage image descriptors
...
This will allow us to reduce the number of situations where the
compiler workaround is needed on GFX10.3.
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/9924 >
2021-03-31 17:33:16 +02:00
Danylo Piliaiev
00d6ccebf9
ir3/isa: account for randomly set by blob lowest bit of ibo atomics
...
As far as I could see - blob randomly sets the lowest bit of atomic.b.*
instructions.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9841 >
2021-03-31 15:03:35 +00:00
Adam Jackson
f181e61375
ci: Bump the llvmpipe test timeout to 240 seconds
...
lp_test_blend occasionally exceeds this on s390x, but we don't really
want to lose what little (hah) big-endian coverage we have.
Related: mesa/mesa#3437
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9921 >
2021-03-31 10:47:50 -04:00
Erik Faye-Lund
70066fb036
zink: do not request scoped memory barriers
...
While barriers in Vulkan are scoped, we do not handle
nir_intrinsic_scoped_barrier, so we do not support them from NIR.
The reason why this hasn't been a problem seems to be that VTN is the
only place that respects them, so we haven't seen them yet.
But if the GLSL compiler starts respecting the setting, things will
start blowing up. There's WIP patches for this in !3339 already.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9949 >
2021-03-31 14:07:11 +00:00
Mike Blumenkrantz
71e39c79fd
radv: don't reset vertex state params on pipeline bind if reg layout matches
...
this is unnecessary since the locations will match
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
df1c45890d
radv: don't emit baseinstance and drawid if neither is used
...
indirect draw dispatch contributed by Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
d67c1bc74d
radv: reorder vertex shader params
...
put baseinstance last since it's the least updated
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
da7ffc3b97
radv: make vertex param sgpr count more explicit
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
4e0a3c2527
radv: break out vertex shader param emission into separate function
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
0a8b091922
radv: track whether baseinstance is used on the pipeline struct
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
b1b867033e
radv: track whether drawid is used on the pipeline struct
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
eed676c42a
radv: set gfx pipeline vtx_emit_num to the number of sgprs
...
this should always match what we want to be doing
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
65626eba29
radv: simplify vs draw param counting during setup
...
we can just reuse the existing function for this
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
1ffa615444
radv: track whether gl_BaseInstance is used
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
75a2476dfb
radv: refactor draw dispatch
...
this breaks up the monolithic draw path used for all draw calls into
pre/post functions to handle general setup and a couple helper functions
to more directly handle different draw modes in a way that's both more readable
and, potentially, more optimizable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Mike Blumenkrantz
d0ef28d85e
radv: stop zeroing radv_draw_info during draw
...
this is a big struct, and there's only a couple extra members that need
to be initialized to hit the right codepaths
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788 >
2021-03-31 13:54:24 +00:00
Danylo Piliaiev
049f56fc4e
freedreno/a6xx: fix primitive counters debug output
...
Each counter spans two regs: LO and HI
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8228 >
2021-03-31 16:36:09 +03:00
Danylo Piliaiev
4ce7d2138a
freedreno/a6xx: copy full 64bit of primitive counter
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8228 >
2021-03-31 16:36:09 +03:00
Alyssa Rosenzweig
70813c1c13
meson: Remove kmsro from gallium-drivers
...
Automatically include it if we're building with a driver that depends on
it, and don't include it if we're not. Avoids a footgun (building
something like panfrost without kmsro) with minimal effect on code size
in the "kmsro possible but not used" case. (This case primarily affects
Freedreno, but the Freedreno maintainers suggested this, so I think it's
ok.)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Suggested-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8893 >
2021-03-31 13:07:35 +00:00
Juan A. Suarez Romero
4323279984
broadcom/cle: do not leak spec
...
Fixes CID#1474553 "Resource leak (RESOURCE_LEAK)".
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/9944 >
2021-03-31 10:13:33 +00:00
Erik Faye-Lund
b3799a3684
docs: vulkan -> Vulkan
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9945 >
2021-03-31 09:57:23 +00:00
Erik Faye-Lund
a28582a8fe
docs: ie. -> i.e.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9945 >
2021-03-31 09:57:23 +00:00
Erik Faye-Lund
2284937399
docs: sytem -> system
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9945 >
2021-03-31 09:57:23 +00:00
Erik Faye-Lund
08971eaec4
docs: appling -> applying
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9945 >
2021-03-31 09:57:23 +00:00
Erik Faye-Lund
5cd113cb10
zink: document why we're calling pipe_shader_type_from_mesa
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9898 >
2021-03-31 08:31:10 +00:00
Erik Faye-Lund
b25188021d
zink: simplify shader-removal
...
This is so trivial to do, so there's no need for the helper.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9898 >
2021-03-31 08:31:10 +00:00
Erik Faye-Lund
c0609b1585
zink: assert that pstage is within range
...
This makes it clearer that these don't include the compute-stage.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9898 >
2021-03-31 08:31:10 +00:00
Erik Faye-Lund
2de07d1ad2
zink: check base-requirements
...
This one is a bit of a tough nut to deal with gracefully. Zink has a set
of base-requirements that we always require. There's no Gallium caps to
report these missing features, so we're essentially left with two options:
1. Fail to create the screen.
2. Ignore the missing fetures.
Solution 1 will lead to difficulties bringing up a new Vulkan driver on
Zink, and solution 2 will lead to mis-rendering.
Since Zink is mostly an opt-in driver to use when there's no OpenGL driver
available, we should probably do 2 for now. It seems better to have some
mis-rendering than no rendering at all.
But let's at least check, and print a warning. That way people get to
know what's up.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9925 >
2021-03-31 08:19:24 +00:00
Erik Faye-Lund
920ecbefbd
docs: clarify VK_KHR_external_memory requirement
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9925 >
2021-03-31 08:19:24 +00:00
Erik Faye-Lund
4bf238f744
zink: do not enable unused extension
...
While we should probably use this extension at some point, we don't
currently do. So let's remove it, so the code documents the status-quo
instead of some potential future direction.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9925 >
2021-03-31 08:19:23 +00:00
Erik Faye-Lund
3b130ec75d
docs: remove zink incorrect requirement
...
Zink does not require VK_KHR_get_physical_device_properties2; we have
fallback-code in place for when that is lacking.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9925 >
2021-03-31 08:19:23 +00:00
Erik Faye-Lund
1f1e4705af
docs: remove bogus zink-requirement
...
VkPhysicalDeviceFeatures::depthClamp isn't required until GL 3.2, where
we already list it. Remove the extra entry to avoid confusion.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9925 >
2021-03-31 08:19:23 +00:00
Juan A. Suarez Romero
5737cecd45
ci/v3dv: update flaky tests
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9926 >
2021-03-31 07:46:02 +00:00
Tapani Pälli
f8e5f945b8
loader: prefer iris on Android
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9906 >
2021-03-31 06:28:18 +00:00
Iago Toral Quiroga
8f7640293d
broadcom/compiler: try to fill up delay slots after unconditional branch
...
If we have an unconditional branch then we can try to fill up its
delay slots with the initial instructions of its successor block by
copying them into the delay slots and adjusting the branch offset to
skip the copied instructions.
total nops in shared programs: 365640 -> 364471 (-0.32%)
nops in affected programs: 15416 -> 14247 (-7.58%)
helped: 462
HURT: 0
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9918 >
2021-03-31 05:51:22 +00:00
Iago Toral Quiroga
e266e6c634
broadcom/compiler: try to fill up delay slots after a branch instruction
...
For this we do something similar to what we do with thrsw where we try to
move the branch instruction earlier so the previous instructions execute
in the delay slots of the branch.
Generally, we can do this with any instruction except:
- If the instruction reads a uniform: since our branches do as well and
uniforms come from an ordered FIFO stream.
- If the instruction writes flags, since our branch instruction will
probably read them.
- If the instruction is in the delay slots of another thread switch,
branch, or unifa write, which is disallowed.
total instructions in shared programs: 13648140 -> 13613972 (-0.25%)
instructions in affected programs: 2209552 -> 2175384 (-1.55%)
helped: 6765
HURT: 0
Instructions are helped.
total max-temps in shared programs: 2318687 -> 2318436 (-0.01%)
max-temps in affected programs: 5046 -> 4795 (-4.97%)
helped: 152
HURT: 0
Max-temps are helped.
total inst-and-stalls in shared programs: 13680494 -> 13646326 (-0.25%)
inst-and-stalls in affected programs: 2220394 -> 2186226 (-1.54%)
helped: 6765
HURT: 0
Inst-and-stalls are helped.
total nops in shared programs: 399818 -> 365640 (-8.55%)
nops in affected programs: 127311 -> 93133 (-26.85%)
helped: 6765
HURT: 0
Nops are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9918 >
2021-03-31 05:51:22 +00:00
Iago Toral Quiroga
f33ca092da
broadcom/compiler: add a NOP count stat to shader-db
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9918 >
2021-03-31 05:51:22 +00:00
Iago Toral Quiroga
062eee7d33
broadcom/compiler: dump instruction index when failing to pack instructions
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9918 >
2021-03-31 05:51:22 +00:00
Dave Airlie
d62bb8bc0d
lavapipe: fail out if spirv->nir fails
...
Just fail out earlier and assume a feature is missing.
Fixes a crash in validation layer tests
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9937 >
2021-03-31 05:23:57 +00:00
Dave Airlie
a17e10b109
lavapipe: only reference pCounterBuffers if non-NULL
...
Fixes crash in validation layer tests.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9937 >
2021-03-31 05:23:57 +00:00
Vinson Lee
cd222e4a9c
glsl: Initialize parcel_out_uniform_storage members.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member buffer_block_index is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member ubo_byte_offset is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member shader_type is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_bindless_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_bindless_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member next_subroutine is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member field_counter is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member current_var is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member explicit_location is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_array_count is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_bindless_sampler is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member record_next_bindless_image is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member targets is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member shader_samplers_used is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member shader_shadow_samplers is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member num_bindless_samplers is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member num_bindless_images is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7910 >
2021-03-30 21:26:04 -07:00
Mike Blumenkrantz
598dc3dca4
zink: use cached memory for all resources when possible
...
this massively speeds up memory access across the driver, specifically
for pbo-related operations
it does require that mapped memory is manually invalidated/flushed, however, and
we also need to manually align host-visible memory to be able to do that
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9884 >
2021-03-30 17:27:15 -04:00
Mike Blumenkrantz
1998e216b6
zink: track coherent resource objects
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9884 >
2021-03-30 17:11:43 -04:00
Adam Jackson
4daef7ffe3
mesa: Remove redundant gl_config::sampleBuffers
...
This is just !!samples.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
4fbe1cbe4c
mesa: Stop tracking visual rating in gl_config
...
We never create non-conformant configs, and we can predict slow-or-not
purely from the accum-buffer-ness of the config.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
d21b8afa3d
mesa: Remove the pretense of aux buffer support
...
This might be nice to hook up at some point, but it's doing nothing at
the moment and it's not clear to me that it belongs as GL state instead
of winsys state.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
78dfab95b8
mesa: Remove unused gl_config::level
...
This is the (GLX) framebuffer overlay level, and it's never set to
anything interesting.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
c17d35b402
mesa: Remove transparency state from struct gl_config
...
We never set this to anything interesting, and this is really winsys
state not GL state anyway.
Nota bene: __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE is set to GLX_NONE
instead of the GLX_DONT_CARE we looked like we were doing before. This
is to preserve backward compatibility with older (technically, all
current) X servers, which when building their fbconfigs initialize a
field named 'transparentPixel' _twice_, and the second time from
__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, but then uses 'transparentPixel's
value for GLX_TRANSPARENT_TYPE. Which, GLX_DONT_CARE isn't a valid value
for that, so glx-fbconfig-sanity fails among much else.
This is harmless, in that I don't think any DRI driver has ever wired
this up (I can't find any evidence in r100 or mga history) and certainly
none that we can currently load have this working.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
c212283ef8
mesa: Remove the texture-from-pixmap state from struct gl_config
...
This never varies at all, let alone per-config. GLX does read these
values out though so hardwire the values in a different place.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
5ffd1ebe6b
mesa: Remove misc pbuffer attributes from struct gl_config
...
pbuffers aren't a first-class object in mesa, they're just funnily-named
framebuffers. It's thus somewhat silly to track this state separately
when it's effectively identical to GL_MAX_RENDERBUFFER_SIZE, and there's
never been a DRI driver that's ever set these values to anything
interesting. Drop them from mesa (but leave the tokens defined for
compatibility).
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
1f626eb6a9
dri: Fold attribMap into the code
...
This table is mostly a mapping into struct gl_config, which is about to
get radically simplified, so we're going to need code to compute values
here instead of just looking up fields in a struct. Keeping the __ATTRIB
bit is somewhat ugly, but we'll expand it back out after the gl_config
changes settle.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Adam Jackson
49fb7f9e5c
dri: Explicitly handle all the config attributes
...
The code is broken elsewhere and requires that the attrib map actually
be large enough.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817 >
2021-03-30 20:33:51 +00:00
Matt Turner
b58fbfa828
Remove Scons leftovers
...
Fixes: 6e6cd7d93c ("scons: Remove.")
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9738 >
2021-03-30 20:17:19 +00:00
Matt Turner
40647fcc3d
ci: Disable panfrost g52
...
The runners appear to be down at the moment.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4538
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9930 >
2021-03-30 19:41:56 +00:00
Tony Wasserka
e5c869c2ee
ci: skip pipeline_barrier tests that currently crash on RADV
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4511
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9893 >
2021-03-30 16:50:49 +00:00
Boyuan Zhang
3c64c090e0
frontends/omx/h265: search entire dpb list
...
When more than 1 idr frames have been added to dpb list, there might be 2
frames with same poc in the dpb list. In this case, driver needs to search
the entire dpb list in order to get newly added reference frame with given poc
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9881 >
2021-03-30 15:47:54 +00:00
Ruijing Dong
eaf197605e
radeon/vcn: release si buffer for encoding at the end.
...
Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9882 >
2021-03-30 15:41:12 +00:00
Erik Faye-Lund
89a04a54c4
compiler/glsl: avoid null-pointer deref
...
When we encounter a bindless image here, lower_deref returns a
NULL-pointer, and calling record_images_used will try to dereference
that NULL-pointer.
So let's dig out the var from the source instruction instead of the
result of the lowering.
Fixes: 5910c938a2 ("nir/glsl: gather bitmask of images used by program")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9895 >
2021-03-30 15:22:17 +00:00
Mike Blumenkrantz
cb580af02a
zink: remove zink_create_fence()
...
merge this down into batch state creation to keep fence file complexity down
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
11926342e3
zink: also check for device lost reset on flush
...
if there's a reset callback available, call that instead of cycling
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
dc5d02ca54
zink: break out queue submit into separate functions
...
to be used with async submission
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
38c5e154df
zink: move VkQueue to batch object
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
ef538e50c8
zink: remove zink_fence_init()
...
contents moved to more correct places
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
95af27f032
zink: make a local screen pointer in zink_flush
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
3a344174dc
zink: store context to batch state
...
this will be used for post-flush device resets when device is lost
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
ba6265a1ff
zink: rename init_batch_state to get_batch_state
...
more sensible, no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
f9ee9c4539
zink: assume fence has already completed if a batch state isn't found
...
we're not going to be waiting on fences from the future, so if we can't
find a fence then it must have completed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
03946bfcdd
zink: explicitly reset a couple more batch state members
...
no functional changes at this time
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
f32079efab
zink: add locking for fence resources
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
0ebc13564a
zink: split fence finish func
...
one part of this will be used to handle tc mechanics, the other part is for
internal use
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
4a736677af
zink: add function for checking whether a batch is done
...
this is like wait_on_batch, but without the waiting
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
6eaaaaa542
zink: add locking for batch states
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
c452c82b98
zink: manually invoke cpu detection during screen init
...
ensure this gets populated before using it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
0731861748
zink: add locking for resource maps
...
vulkan prohibits multiple maps on a resource, so these have to be locked
down
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
e7420c7708
zink: add locking for descriptor pools
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885 >
2021-03-30 15:12:58 +00:00
Juan A. Suarez Romero
1f90d51749
v3dv: fix unused value
...
Do not assign to a variable that won't be used.
Fixes CID#1468098 "Unused value (UNUSED_VALUE)".
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/9910 >
2021-03-30 14:15:43 +00:00
Juan A. Suarez Romero
cc1f070a27
broadcom/compiler: fix unused value
...
Do not assign to a variable that won't be used.
Fixes CID#1451708 and CID#1451710 "Unused value (UNUSED_VALUE)".
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/9910 >
2021-03-30 14:15:43 +00:00
Erik Faye-Lund
d03a9fa50c
docs: do not try to copy missing file
...
This file was removed, but the inclusion in the docs build was missed.
Fixes: 6e6cd7d93c ("scons: Remove.")
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9913 >
2021-03-30 11:48:52 +00:00
Samuel Pitoiset
688dada1a8
radv: do not fixup DCC after compute color resolves if DCC stores enabled
...
With compressed DCC writes supported, the image should still be
compressed after resolving using the compute path.
Fixes various dEQP-VK.api.copy_and_blit.core.resolve_image.*
failures with RADV_DEBUG=forcecompress on GFX10.
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/9908 >
2021-03-30 10:01:12 +00:00
Erik Faye-Lund
8e2f320f36
lavapipe: report correct value for maxTexelBufferElements
...
We already have a pipe_cap for this, so let's use that to report the
correct value.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9891 >
2021-03-30 08:25:05 +00:00
Juan A. Suarez Romero
528d66eaa2
ci/v3d: run full GLES3 and GLES31 testsuite
...
There is margin in the time budget to run the full GLES3 and GLES31 CTS
instead of only 50%.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9899 >
2021-03-30 08:03:16 +00:00
Juan A. Suarez Romero
dc859bb5bb
ci/broadcom: update piglit expected results
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9899 >
2021-03-30 08:03:16 +00:00
Marcin Ślusarz
1df3a00dcd
iris: disable dynamic VAO fastpath on GFX version 9
...
Enabling this fast path, while making CPU side simpler
(and thus reducing driver's CPU overhead), forces us to
generate multiple VERTEX_BUFFER_STATE packets pointing to
the same buffer, but with slightly shifted BufferStartingAddress.
This is fine on GFX version >= 11 and < 8, but on version
8 and 9, thanks to internal details of the VF cache, vertex
data from each VERTEX_BUFFER_STATE is cached separately
and this results in a lot of cache misses.
Disabling this fast path restores previous performance levels.
On my SKL GT2 machine this improves performance in:
- GLB27 Egypt offscreen by 37%
- GLB27 TRex offscreen by 22%
- gfxbench5 Manhattan offscreen by 1.75%
- gfxbench5 Manhattan31 offscreen by 1.9%
- gfxbench5 Aztec Ruins high by 2.3%
In Intel performance CI on GFX version 9 it improves performance in:
- gfxbench5 Manhattan offscreen by 1.65%
- gfxbench5 Aztec Ruins normal offscreen by 1.33%
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3277
Fixes: 42842306d3 ("mesa,st/mesa: add a fast path for non-static VAOs")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9857 >
2021-03-30 07:32:16 +00:00
Marcin Ślusarz
33d87eeb5a
gallium: add PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH
...
Fixes: 42842306d3 ("mesa,st/mesa: add a fast path for non-static VAOs")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9857 >
2021-03-30 07:32:16 +00:00
Mike Blumenkrantz
84ad0feec5
zink: rework memory_barrier hook
...
this is a bit more sensible all around without being too much hammer
and not enough nail
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9886 >
2021-03-30 04:26:28 +00:00
Mike Blumenkrantz
3047c7c77f
zink: rework some includes
...
descriptors.h requires stuff from context.h and vice versa, so there's
a little redefinition here to work around that
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883 >
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
5c1ce2edb8
zink: use GENERAL layout for sampler images that are also bound as shader images
...
we can't have the same image with 2 layouts, so just go with the more global one
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883 >
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
ed0fedf1c2
zink: simplify some descriptor update function parameters
...
just removing unused params
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883 >
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
dd29a7e5b0
zink: move descriptor barrier handling to main update function
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883 >
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
c7f9dc5891
zink: move update_descriptors & related funcs to zink_descriptors.c
...
keep zink_draw.c for draw stuff
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883 >
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
812f7ecb13
zink: rework texture_barrier hook
...
we can be more precise with this and avoid flushing unnecessarily
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9791 >
2021-03-30 00:49:43 +00:00
Alyssa Rosenzweig
8578adeaa6
nir: Unify memory atomics
...
Avoids some copypaste and makes it easier to see how the different types
relate.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8847 >
2021-03-30 00:11:01 +00:00
Mike Blumenkrantz
ee8ea0cf86
lavapipe: ignore unused clearvalues when beginning renderpass
...
according to spec, unused clearvalues aren't accessed
> Only elements corresponding to cleared attachments are used. Other elements of pClearValues are ignored.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9900 >
2021-03-29 23:48:55 +00:00
Bas Nieuwenhuizen
61cf77583a
lavapipe: Free sorted descriptor array.
...
Fixes: abc724e440 ("lavapipe: sort bindings before creating descriptor set")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9880 >
2021-03-29 23:32:50 +00:00
Bas Nieuwenhuizen
83c92a48b7
vulkan: Fix descriptor set creation with zero bindings.
...
MAX2(count * struct size, 1) results in 1 for count=0, not the size of a struct.
Since this MAX only seems to exist so we can keep using NULL for error reporting,
just refactor to return a VkResult.
Fixes: ad241b15a9 ("vk: consolidate dynamic descriptor binding sorting")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4522
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9880 >
2021-03-29 23:32:50 +00:00
Icecream95
80b90a0f2b
panfrost: Implement panfrost_set_global_binding
...
This is enough OpenCL support to pass the Piglit test
cl-custom-run-simple-kernel with PAN_MESA_DEBUG=deqp.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9380 >
2021-03-29 23:15:48 +00:00
Icecream95
27b5ee5d7a
pipe-loader: Stop trying to use kmsro for vgem
...
Fixes two OpenCL devices being created for a single kmsro-using GPU
when vgem is enabled in the kernel.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9380 >
2021-03-29 23:15:48 +00:00
Icecream95
06a883cfe5
pipe-loader,gallium/drm: Fix the kmsro pipe_loader target
...
Include drm_helper.h to define the driver descriptor again, but with a
new define GALLIUM_KMSRO_ONLY to disable defining descriptors for the
drivers that kmsro uses.
Fixes clinfo on Panfrost.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4002
Fixes: 9ec28b8d22 ("gallium/drm: Deduplicate screen creation for the dynamic (clover) pipe loader.")
Acked-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9380 >
2021-03-29 23:15:48 +00:00
Lionel Landwerlin
aa53665fda
intel/fs/copy_prop: check stride constraints with actual final type
...
In some cases we will change the type of the destination register of
an instruction. This is the type we should use to verify that we're
allow to do the replacement.
Otherwise we can hit restrictions on CHV and upcoming Xe-Hp for
instance where the copy propagation transforms this :
send(16) (mlen: 2) vgrf10:UD, 0u, 0u, vgrf35:D, null:UD
mov(16) vgrf11:UW, vgrf10<2>:UW
mov(16) vgrf12:UW, vgrf10+0.2<2>:UW
mov(16) vgrf15:HF, |vgrf11|:HF
mov(16) vgrf16:HF, |vgrf12|:HF
mov(8) vgrf41<2>:UW, vgrf15+0.0:UW group0
mov(8) vgrf42<2>:UW, vgrf15+0.16:UW group8
mov(8) vgrf45<2>:UW, vgrf16+0.0:UW group0
mov(8) vgrf46<2>:UW, vgrf16+0.16:UW group8
into this :
send(16) (mlen: 2) vgrf10:UD, 0u, 0u, vgrf35:D, null:UD
mov(8) vgrf41<2>:HF, |vgrf10+0.0|<2>:HF group0
mov(8) vgrf42<2>:HF, |vgrf10+1.0|<2>:HF group8
mov(8) vgrf45<2>:HF, |vgrf10+0.2|<2>:HF group0
mov(8) vgrf46<2>:HF, |vgrf10+1.2|<2>:HF group8
Because of the floating point use, stride and offets should be the
same.
v2: Fix final destination type selection (Curro)
v3: constify (Curro)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9832 >
2021-03-29 22:14:45 +00:00
Matt Turner
0b35987895
tu: Skip tu_tiling_config_update_tile_layout() if not using gmem
...
Otherwise pass->tile_align_w will be 0, leading to a divide by zero and
undefined behavior. In practice, I saw this lead to an infinite loop in
tests like
dEQP-VK.draw.instanced.draw_indexed_indirect_vk_primitive_topology_line_list_attrib_divisor_0_multiview
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9606 >
2021-03-29 21:58:24 +00:00
Eric Anholt
0fbf453689
freedreno/a5xx: Use VALIDREG/CONDREG like a6xx do.
...
Fewer magic numbers and less to diff between the two.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9870 >
2021-03-29 21:24:16 +00:00
Eric Anholt
99838513ae
freedreno/a5xx: Add support for clip distances and use them for userclip.
...
A little low-stakes RE effort as I unwind from fighting CI all day. Comes
from diffing dEQP-VK.clipping.user_defined.clip_distance.vert.* on the
blob and comparing to a6xx behavior. (My blob doesn't do tess, so if
there are equivalent tess fields for some of these, I didn't find them)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9870 >
2021-03-29 21:24:16 +00:00
Dave Airlie
115ba959dc
lavapipe: enable KHR_shader_atomic_int64
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9591 >
2021-03-29 20:32:09 +00:00
Dave Airlie
8c1d5fcb7c
gallivm: add 64-bit atomic global support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9591 >
2021-03-29 20:32:09 +00:00
Dave Airlie
92eafe42af
gallivm: add 64-bit atomic support for ssbo/shared.
...
This just fixes things up to handle bit-size
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9591 >
2021-03-29 20:32:09 +00:00
Samuel Pitoiset
fa712d9e17
ac/surface: do not allocate FMASK or CMASK for stencil-only surfaces on GFX9+
...
FMASK/CMASK make no sense with depth/stencil or stencil-only surfaces.
gfx9_compute_miptree() was called twice for stencil-only surfaces,
and the first call was allocating FMASK/CMASK.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9612 >
2021-03-29 20:18:29 +00:00
Kenneth Graunke
da45f3f35c
ci: Enable iris testing in meson-release
...
This should catch any build breaks in release mode. iris was already
build tested in debug builds, but not release mode.
Suggested by Michel Dänzer.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9862 >
2021-03-29 20:02:09 +00:00
Kenneth Graunke
d67b343aa0
intel: Mark an otherwise unused variable in intel_dump_gpu as ASSERTED
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9862 >
2021-03-29 20:02:09 +00:00
Samuel Pitoiset
1df4f11eb5
radv: require DRM 3.35+
...
Linux Kernel 4.15+ is now required for RADV, this kernel has been
released 3 years ago and should be in most modern distros.
This allows us to remove a lot of legacy code for fence/semaphore.
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/9800 >
2021-03-29 19:48:19 +00:00
Bas Nieuwenhuizen
fb6814cd91
radv: Only set WRITE_COMPRESS_ENABLE on supported HW.
...
Fixes: a7c0cf500b ("radv: Enable DCC for image stores on GFX10.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9876 >
2021-03-29 19:36:45 +00:00
Gert Wollny
c7039575da
r600/sfn: allocate number of VS outputs based on max driver_location
...
It seems that when the linker optimized the IO it might leave gaps
in the driver output locations, therefore set the size of the output
array based on the highest driver location occupied by a store_output.
Fixes #4520
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9879 >
2021-03-29 17:49:28 +00:00
Gert Wollny
00a1521529
r600: Don't advertise support for scaled int16 vertex formats
...
They are not supported by the hardware.
Fixes:
dEQP-GLES2.functional.vertex_arrays.single_attribute.strides.buffer_0_32_short3_vec4_dynamic_draw_quads_1
dEQP-GLES2.functional.vertex_arrays.single_attribute.strides.buffer_0_32_short3_vec4_dynamic_draw_quads_256
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9877 >
2021-03-29 17:42:12 +00:00
Gert Wollny
acdf1a1234
r600: don't set an index_bias for indirect draw calls
...
The indirect draw call already encodes the index bias so that no
additional encoding in the hardware is needed in this case.
This fixes a regression with a number of tests from
dEQP-GLES31.functional.draw_indirect.random.*
Fixes: c6c532faa8
"gallium/u_vbuf: use updated pipe_draw_start_count while using draw_vbo"
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9877 >
2021-03-29 17:42:12 +00:00
Gert Wollny
2440488677
r600: Fix texture buffer offset alignment
...
It seems that this has to be 4 (radeonsi also sets this value to 4)
Fixes deqp-gles31:
functional.texture.texture_buffer.modify.bufferdata.offset_1_alignments
functional.texture.texture_buffer.modify.bufferdata.offset_7_alignments
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9877 >
2021-03-29 17:42:12 +00:00
Vinson Lee
a5d5cbdf08
freedreno: Fix file descriptor leak.
...
Fix defect reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_handle: Handle variable fd going out of scope leaks the handle.
Fixes: 5a13507164 ("freedreno/perfcntrs: add fdperf")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9889 >
2021-03-29 17:08:56 +00:00
Erik Faye-Lund
ee14bec09a
zink: use pre-populated shader-locations
...
This is the final step of this little journey, which allows us to no
longer deal with the shader-slot mapping inside the NIR to SPIR-V
translation.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9836 >
2021-03-29 15:16:17 +00:00
Erik Faye-Lund
6037f535d3
zink: do not depend on shader_slots_reserved for xfb
...
This will be helpful in ripping this out later on.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9836 >
2021-03-29 15:16:17 +00:00
Erik Faye-Lund
2d98efd323
zink: pre-populate locations in variables
...
These locations should match what we get out of the pre-existing pass,
and are currently unused. They will be used in a later commit in this
series, but is left like this because this code is fairly fragile.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9836 >
2021-03-29 15:16:17 +00:00
Erik Faye-Lund
904b5eb2af
zink: handle errors in nir_to_spirv
...
We already have some appropriate error-handling further down here.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9836 >
2021-03-29 15:16:17 +00:00
Rhys Perry
e76531ea7b
aco/tests: fix isel.sparse.clause for LLVM 12+
...
Seems disassembly of this instruction was fixed in LLVM 12.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Tested-by: Vinson Lee <vlee@freedesktop.org >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4154
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9694 >
2021-03-29 15:05:33 +00:00
Erik Faye-Lund
837f76edb8
frontends/va: correct check for invalid format
...
We need to check against the correct define, DRM_FORMAT_INVALID.
Checking an uint32_t against DRM_FORMAT_MOD_INVALID will always produce
false anyway.
Caught by Coverity.
Fixes: b85c6531f6 ("frontends/va: add support for VA_EXPORT_SURFACE_COMPOSED_LAYERS")
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9897 >
2021-03-29 14:08:25 +00:00
Mauro Rossi
f891c78a14
android: panfrost: Use the blend shader cache attached to the device
...
pan_blend_shaders.{c,h} files are removed from Makefile.sources
in order to avoid the following building error:
FAILED: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_panfrost_intermediates/pan_blend_shaders.o
...
clang: error: no such file or directory: 'external/mesa/src/gallium/drivers/panfrost/pan_blend_shaders.c'
clang: error: no input files
Fixes: 7994929e84 ("panfrost: Use the blend shader cache attached to the device")
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9894 >
2021-03-29 15:49:25 +02:00
Danylo Piliaiev
2087168a30
turnip,ir3: account for dispatch group offsets
...
Fixes tests:
dEQP-VK.compute.device_group.dispatch_base
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9339 >
2021-03-29 14:31:44 +03:00
Lionel Landwerlin
68bfb6ca49
etnaviv/drm: only print out fence error on non timeout
...
While looking at the traces emitted by chromium, I saw a lot of those
errors. But looking at the value of ns, it is 0, so it's probably just
the application checking whether work is done or not. Not much point
in printing out an error.
v2: check ret value (Christian)
check both timeout codes (Lionel)
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9875 >
2021-03-29 11:54:59 +02:00
Dave Airlie
11d2db17c5
util: rework AMD cpu L3 cache affinity code.
...
This changes how the L3 cache affinity code works out the affinity
masks. It works better with multi-CPU systems and should also be
capable of handling big/little type situations if they appear in
the future.
It now iterates over all CPU cores, gets the core count for each
CPU, and works out the L3_ID from the physical CPU ID, and
the current cores L3 cache. It then tracks how many L3 caches
it has seen and reallocate the affinity masks for each one.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4496
Fixes: d8ea509965 ("util: completely rewrite and do AMD Zen L3 cache pinning correctly")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9782 >
2021-03-29 08:31:09 +00:00
Dave Airlie
f7acdb1d1d
st/glthread: allow for invalid L3 cache id.
...
If we get 0xffffffff consider L3 cache info invalid and
don't continue.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4496
Fixes: d8ea509965 ("util: completely rewrite and do AMD Zen L3 cache pinning correctly")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9782 >
2021-03-29 08:31:09 +00:00
Dave Airlie
b03cfad77a
llvmpipe: fix cube image size query
...
The 3rd coord wasn't being handled properly
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9746 >
2021-03-29 08:04:59 +00:00
Timothee Chabat
b3ff9a02a4
llvmpipe: increase PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE value
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4237
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9750 >
2021-03-29 07:53:21 +00:00
Mike Blumenkrantz
c77fc0b6f4
llvmpipe: stop flattening multidraws
...
these are now handled in the draw module
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Mike Blumenkrantz
65ef79be7a
aux/draw: pass full draw params to draw_pt_arrays()
...
multidraw depth maximum: loop directly around the llvmpipe call
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Mike Blumenkrantz
ce0b1f23c3
aux/draw: track increment_draw_id value from draw info
...
need this in order to accurately update drawid
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Mike Blumenkrantz
8b9d454cef
aux/draw: move draw param sanitization to end of function
...
this triggers more work if sanitizing no-ops the draw, but the rest of the
time it won't matter
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Mike Blumenkrantz
33f832e079
aux/draw: pass the full draw params through to draw_pt_arrays_restart()
...
multidraw depth 1.5: loop in draw_pt_arrays_restart()
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Mike Blumenkrantz
3ab15f3901
aux/draw: pass the full draw params through to draw_instances()
...
multidraw depth 1: loop in draw_instances()
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Mike Blumenkrantz
3abeb0afe0
aux/draw: rewrite PRIM_RESTART_LOOP macro as a function
...
this was a bit too intense to work with
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Mike Blumenkrantz
182c7da6b4
aux/draw: stop copying draw params unnecessarily
...
resolve_draw_info() is only for drawing from streamout, so this check
can be moved forward to avoid overwriting draw params when not necessary
no functional changes at this time
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9844 >
2021-03-29 07:37:06 +00:00
Boris Brezillon
7994929e84
panfrost: Use the blend shader cache attached to the device
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9831 >
2021-03-29 06:53:50 +00:00
Boris Brezillon
bbff09b952
panfrost: Move the blend shader cache at the device level
...
So we can re-use it in the Vulkan driver.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9831 >
2021-03-29 06:53:50 +00:00
Iago Toral Quiroga
c3c251d98f
broadcom/compiler: flag TMU reads with a read dependency on last TMU config
...
We were using a write dependency to ensure ordering since LDTMUs sequences
are ordered, but by using a write dependency with TMU config we were also
preserving ordering with TMU config writes that are not a sequence
terminator, which is not required and reduces scheduling flexibility.
Instead, use a write dependency to ensure strict ordering of TMU reads,
but only a read depdency with TMU config.
With this change we also need to update CS barriers to also have a write
dependency with TMU reads to ensure that we don't move TMU reads around
CS barriers.
total instructions in shared programs: 13602500 -> 13597851 (-0.03%)
instructions in affected programs: 2681428 -> 2676779 (-0.17%)
helped: 6567
HURT: 4960
Instructions are helped.
total max-temps in shared programs: 2317927 -> 2317914 (<.01%)
max-temps in affected programs: 13861 -> 13848 (-0.09%)
helped: 355
HURT: 300
Inconclusive result (value mean confidence interval includes 0).
total sfu-stalls in shared programs: 32074 -> 32247 (0.54%)
sfu-stalls in affected programs: 848 -> 1021 (20.40%)
helped: 160
HURT: 327
Inconclusive result (%-change mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13634574 -> 13630098 (-0.03%)
inst-and-stalls in affected programs: 2703041 -> 2698565 (-0.17%)
helped: 6558
HURT: 5020
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9856 >
2021-03-29 06:21:22 +00:00
Iago Toral Quiroga
cbf9a7c3c1
broadcom/compiler: flag TMU read dependencies against last TMU config
...
Instead of last TMU write. According to the documentation, the entries
in the output FIFO are pushed with the *final* input write for the
lookup, which is the one terminating the sequence. We flag these
with last_tmu_config.
This will allow us to move all TMU register writes for a lookup except
the last one ahead of the LDTMUs for the previous lookup, possibly
allowing us to pair up these writes the wrtmuc instructions for the
same lookup, turning code like this:
nop ; nop ; wrtmuc (tex[0].p0 | 0x3)
nop ; nop ; wrtmuc (tex[2].p1 | 0x1)
nop ; nop ; ldunif (ubo[2]+0xe0)
fadd r4, rf33, rf51 ; mov unifa, r5 ; ldunif (ubo[2]+0x110)
fmax rf34, 0, r4 ; nop
nop ; mov tmut, rf11
nop ; mov tmus, rf0
into:
nop ; mov tmut, rf11 ; wrtmuc (tex[0].p0 | 0x3)
nop ; nop ; wrtmuc (tex[2].p1 | 0x1)
nop ; nop ; ldunif (ubo[2]+0xe0)
fadd r4, rf33, rf51 ; mov unifa, r5 ; ldunif (ubo[2]+0x110)
fmax rf34, 0, r4 ; nop
nop ; mov tmus, rf0
total instructions in shared programs: 13648140 -> 13602500 (-0.33%)
instructions in affected programs: 3497402 -> 3451762 (-1.30%)
helped: 12044
HURT: 3484
Instructions are helped.
total max-temps in shared programs: 2318687 -> 2317927 (-0.03%)
max-temps in affected programs: 17234 -> 16474 (-4.41%)
helped: 615
HURT: 198
Max-temps are helped.
total sfu-stalls in shared programs: 32354 -> 32074 (-0.87%)
sfu-stalls in affected programs: 1462 -> 1182 (-19.15%)
helped: 461
HURT: 188
Sfu-stalls are helped.
total inst-and-stalls in shared programs: 13680494 -> 13634574 (-0.34%)
inst-and-stalls in affected programs: 3514405 -> 3468485 (-1.31%)
helped: 12062
HURT: 3486
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9856 >
2021-03-29 06:21:22 +00:00
Mike Blumenkrantz
afc82113d1
lavapipe: refactor indexed draw dispatch to handle multidraws
...
each indexed direct draw cmd now contains n draws (though right now n=1)
indexed draws now also have a flag used to avoid recalculating start index if
a cmdbuf is submitted multiple times
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9843 >
2021-03-29 04:01:57 +00:00
Mike Blumenkrantz
e92931f6c4
lavapipe: refactor base draw dispatch to handle multidraws
...
each direct draw cmd now contains n draws (though right now n=1)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9843 >
2021-03-29 04:01:57 +00:00
Mike Blumenkrantz
a42b2f11cb
zink: ci updates
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
c962980725
zink: remove explicit fencing for query results
...
now that the results are automatically being copied to internal buffers,
mapping the buffers will handle any fencing that's required
the only caveat is that the query still needs to be flushed for a result
to be returned
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
726e2eb8f9
zink: reorder availability handling for (user) qbos
...
if the shortcut method without a staging buffer fails, falling back
to the staging buffer is more sane than silently failing
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
3b5f345e9b
zink: don't use PARTIAL bit for query results with time queries
...
this is illegal
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
70b1251587
zink: bump pools up to 5k queries each
...
50 is very small and triggers constant stalls; this should probably be
tuned more at some point in the future since even this value is small in
some scenarios
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
93190be1b9
zink: rewrite query internals
...
this adds internal qbos to each query which record the results of queries incrementally,
meaning that any time we want the result of a query we just have to read the
buffer back
in particular this opens up some possibilities for further optimization, specifically with
actual qbos where we can now pass the internal qbo off to a compute shader to
mimic the check_query_results() handling and avoid having to actually sync or
do a cpu read
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
313407672c
zink: remove special casing for occlusion qbos
...
this seems fine now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
2f81d6fbf0
zink: manually handle more bool query types for copying
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
35b899c2a2
zink: remove flush from query buffer copy
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
a9f6e6d606
zink: create result buffers for all query streams
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
5c25ca55f0
zink: clean up query creation failure paths
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811 >
2021-03-29 02:50:53 +00:00
Mike Blumenkrantz
36f4e61403
zink: rework border color handling
...
we should be matching the format type here to the underlying surface type
for int/float
also we can avoid using a custom border color if the color can be reduced to
a non-custom color
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9793 >
2021-03-29 02:37:14 +00:00
Mike Blumenkrantz
4c9b987146
zink: ralloc shader cache and keys
...
hash table keys (keybox) are allocated, so we can avoid leaking them by
allocating everything on a single ralloc context
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9794 >
2021-03-29 02:28:09 +00:00
Mike Blumenkrantz
00dc0036bb
zink: flatten out buffer creation usage flags codepath
...
GL doesn't know what it's doing, so we just need all the flags all the time
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
c96b20970f
zink: toggle between linear/optimal tiling during image creation
...
if we would be creating an unusable image, don't
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
aac88f49e5
zink: check image format props before creating image
...
ensure that these attrs are viable before failing silently later on
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
7edc3f50c1
zink: add color output bit and/or use linear tiling for sampled images
...
these need to have some way to get data onto them
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
0a0fb85fbe
zink: incrementally add image usage flags based on device caps
...
these should be provided, but if not...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
69cdb6b776
zink: create separate vk image/buffer objects for shader image use
...
the STORAGE_TEXEL and STORAGE_IMAGE bits can't be accurately applied due
to opengl allowing all resources to be used everywhere, so instead we can
create a separate object on demand which is used only by shaders and gets
extra barriers inferred along with the base object to avoid desync whenever
it is used
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
475c1bda8e
zink: break out barrier struct initializing into helper funcs
...
make this and the no-op handling reusable for future extension
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
86e1e1dafd
zink: reorder barrier util functions to set up barrier struct before batch
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
7cee75f143
zink: make descriptor state invalidate public
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
d922850e36
zink: break out image/buffer create info structs into helper funcs
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:57 -04:00
Mike Blumenkrantz
cde60ab179
zink: fix format support detection for storage texel buffers and shader images
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788 >
2021-03-28 22:17:56 -04:00
Mike Blumenkrantz
b741e270cd
zink: reset all fences when waiting on batch state
...
at this point we know all the states are available, so we can shortcut
future state-finding
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9787 >
2021-03-29 01:38:09 +00:00
Mike Blumenkrantz
34a2f96f59
zink: stall when we start getting a lot of uncompleted batches
...
temporary oom handling, though it's unrealistic for this to be hit
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9787 >
2021-03-29 01:38:09 +00:00
Mike Blumenkrantz
c39295a24b
zink: use correct surface ref function for context destroy
...
the regular surface reference function can never be used in the driver
if it is possible that a surface may be destroyed, as this may reference
a previously-destroyed context
Fixes: 92a5ea13fc ("zink: implement a global framebuffer cache")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9787 >
2021-03-29 01:38:09 +00:00
Mike Blumenkrantz
cbe9e95a96
zink: only do shader updates when relevant stages are dirty
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9792 >
2021-03-29 01:22:53 +00:00
Mike Blumenkrantz
dfe9bfef9b
lavapipe: fix array texture region copies
...
these need to use different struct members for copying array textures
the buffer2image variants are already doing the right thing
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9761 >
2021-03-28 22:32:05 +00:00
Mike Blumenkrantz
2f8453cf56
zink: also fix image buffer layer copying
...
this differs based on image type
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9759 >
2021-03-28 22:23:06 +00:00
Mike Blumenkrantz
191a8e0778
zink: fix handling for image types in resource_copy_region hook
...
different image types are supposed to use different members of this struct
to indicate layer copies, and this can't necessarily be inferred by checking
array_size
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9759 >
2021-03-28 22:23:06 +00:00
Mike Blumenkrantz
cca3d1d9a9
lavapipe: remove lvp_descriptor_update_template::descriptor_set_layout
...
this wasn't used and caused crashes when running with validation enabled
due to violating spec:
This parameter is ignored if templateType is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9861 >
2021-03-28 19:31:35 +00:00
Mike Blumenkrantz
71ebcf30e4
lavapipe: ignore templateType when descriptor template isn't for push descriptors
...
spec compliance requires this and validation may crash without it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9853 >
2021-03-28 19:20:46 +00:00
Gert Wollny
c3bf3e8d43
r600/sfn: make allocate_temp_register private to valuepool
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
bf60ffd0cd
r600/sfn: use get_temp_vec4 directly when fetching
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
6da330ece7
r600/sfn: clean up value pool interface usage in emit_stream
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
36fa612228
r600/sfn: clean up multi-sample texture load
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
2362986e79
r600/sfn: remove find_msb lowering in driver
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
6bcc2defa9
r600/sfn: force dual source blend output handling in some cases
...
If an output has a dual source index > 0 then we need to emit both
outputs, even if the number of outputs is larger than the number
of active outputs.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
40fdf1be46
r600/sfn: remove old deref code
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
84f5b15978
r600/sfn: lowered FS output IO
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
3bbc078025
r600/sfn: lower VS IO and drop old deref code
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
65bec7ab0a
r600/sfn: drop the local register mep
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
46beb625b9
r600/sfn: switch assembler creation to use visitor
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
d45c8bf8d9
r600/sfn: fix some formatting
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
56e4a46510
r600/sfn: remove extra parameter from alu assemebly emission
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
a976a50958
r600/sfn: Add skelton for visitor pattern
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Gert Wollny
829028babc
r600/sfn: Make some value pool functions private
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874 >
2021-03-28 09:27:48 +00:00
Rob Clark
ea2c47390a
util/primconvert: Handle indirect and multi-draw
...
Indirect handling was completely missing. And even though we have to
emulate multi-draw, this pushes it out of the fast/hot path in the
driver's draw_vbo()
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
180ca32bb2
freedreno: Don't handle multi-draw in indirect case
...
num_draws is only applicable to direct draws, so we can simplify things
a bit.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
0254e513f2
virgl: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
6a2634e9be
v3d: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
fc0c3e22c9
vc4: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
c9137bd118
tegra: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
dc0140dd60
svga: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
ed1ac41887
softpipe: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
9407126313
r600: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
0634abbeb7
r300: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
e200da1f02
nouveau: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
c6ecf1ce65
llvmpipe: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
c75838de66
lima: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
615cff4fa0
iris: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
bd46ef14eb
i915: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
e6148a2724
etnaviv: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
935f2c0ba4
d3d12: Use util_draw_multi() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742 >
2021-03-27 19:30:04 +00:00
Rob Clark
3afde83c41
freedreno/a6xx: Fix obsolete comment
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9864 >
2021-03-27 19:13:45 +00:00
Rob Clark
c14e059d9f
freedreno/a6xx: Fix indirect+patches draws
...
Without TC, we'd get draw->count==0.. which is obviously not correct.
With TC we get random garbage for draw->count. Which turns into
exciting things like trying to allocate multi-gigabyte buffers for
tess param/factor buffers.
But we can just tell the CP to split up large tess draws, and put an
upper bound on the tess param/factor buffer sizes.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9864 >
2021-03-27 19:13:45 +00:00
Rob Clark
c6fbbbbf70
ci: Disable panfrost t760
...
The runners appear to be down at the moment.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9872 >
2021-03-27 18:16:48 +00:00
Tapani Pälli
10cdfce14e
intel/common: disable batch decoder on Android platform
...
when building with Meson. It requires libexpat that is not available
on Android and we want to avoid it.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9848 >
2021-03-27 19:26:22 +02:00
Gert Wollny
4b1217146d
r600: Handle negate of second operator in TGSI_OPCODE_UADD
...
nir_to_tgsi lowers nir_op_isub to UADD and the negate source mod
on the second operator. Since r600 doesn't support source mods
for integers but support SUB_INT we switch the opcode and clear the
negate flag.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9579 >
2021-03-27 16:25:23 +00:00
Erik Faye-Lund
b307927303
zink: remove no-longer-needed clipdist1 patching
...
Since the last round of enhanced layout packing, it seems like this code
is no longer needed. This allows us to use the HANDLE_EMIT_BUILTIN()
macro, which simplifies things further.
It would have been incorrect anyway, because it's the only code that
uses the location directly as an index. All other locations multiplies
it by four first.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9860 >
2021-03-27 08:39:00 +00:00
Mauro Rossi
b95c62545a
android: amd/addrlib: define endianess to build
...
Fixes the following building error:
In file included from external/mesa/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp:36:
external/mesa/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h:43:2: error: "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
^
NOTE: Android ABI specifies Little Endian for arm and x86 targets
Fixes: 3616e02ef3 ("amd/addrlib: define endianess differently")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9869 >
2021-03-27 01:54:49 +01:00
Mike Blumenkrantz
ba8ddc0c68
zink: ci updates
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9852 >
2021-03-26 21:34:50 +00:00
Mike Blumenkrantz
90632ae7b3
lavapipe: stop tracking draw start/count on rendering state
...
this is garbage data for indirect draws and irrelevant for the rest
Fixes: 448e60314a ("lavapipe: add transform feedback support")
Fixes: 1cd455b17b ("gallium: extend draw_vbo to support multi draws")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9852 >
2021-03-26 21:34:50 +00:00
Eric Anholt
1e8792ea5f
freedreno/a6xx: Use the frontend userclip lowering.
...
This ends up being way more piglit-conformant than our backend lowering.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9815 >
2021-03-26 20:51:18 +00:00
Eric Anholt
683d3972a6
nir: Update clip_distance_array_size in clip lowering.
...
If we've added the array, then we should update the info. This is the
value that gallium drivers setting !PIPE_CAP_CLIP_PLANES have to use in
place of rasterizer->clip_planes_enabled.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9815 >
2021-03-26 20:51:18 +00:00
Lionel Landwerlin
6d72f404df
intel/nullhw: fix build
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4507
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9849 >
2021-03-26 20:12:40 +00:00
Lionel Landwerlin
5e1f5f6a7b
gitlab-ci: fix vulkan build layer enabling
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 54fe5b0482 ("meson: switch vulkan layer to list of choices")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9858 >
2021-03-26 19:53:39 +00:00
Bas Nieuwenhuizen
a7c0cf500b
radv: Enable DCC for image stores on GFX10.
...
Since image stores can now compress and we can't track image stores
this also stops using predication for DCC decompression.
In GFX10 this was benchmarked to be faster. For GFX10.3 the microbenchmarks
are not as possible though I haven't tested any games, so this is not enabled
there yet.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6796 >
2021-03-26 16:16:24 +00:00
Bas Nieuwenhuizen
6c92bf2951
radv: Use 8x8 meta compute workgroups.
...
For 16x16 we get 4 16x4 waves, which is bad for DCC image stores.
The workgroup size doesn't really matter for speed, the important
part is the number of waves, which should stay constant here.
(Though some optimization would be nice, but out of scope for this
patch)
The compute DCC compress shader still uses 16x16 due to functional
requirements (and we're sure it won't write with DCC compression ...)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6796 >
2021-03-26 16:16:24 +00:00
Alejandro Piñeiro
ce98967274
v3dv: define a default attribute values with float type
...
We are providing a BO with the default attribute values for the
GL_SHADER_STATE_RECORD, that contains 16 vec4. Such default value for
each vec4 is (0, 0, 0, 1). As the attribute format could be int or
float, the "1" value needs to take into account the attribute format.
But in the practice, the most common case is all floats. So we create
one default attribute values BO assuming that all attributes will be
floats, and we store it at v3dv_device and only create a new one if a
int format type is defined. That allows to reduce the amount of BOs
needed.
Note that we could still try to reduce the amount of BOs used by the
pipelines if we create a bigger BO, and we just play with the
offsets. But as mentioned, that's not the usual, and would add an
extra complexity,so it is not a priority right now.
This makes the following test passing when disabling the pipeline
cache support:
dEQP-VK.api.object_management.max_concurrent.graphics_pipeline
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9845 >
2021-03-26 15:00:05 +00:00
Tony Wasserka
8557ac9a12
aco/isel: Add documentation for (u)int64->f16 conversion
...
The upper 32 bits are truncated before converting, which still produces
correct results since they never meaningfully contribute to the result.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9597 >
2021-03-26 14:39:23 +00:00
Tony Wasserka
b5be03f39f
aco/isel: Fix large inputs being truncated in int32->f16 conversions
...
The previous code produced incorrect results for inputs outside the
range [INT16_MIN, INT16_MAX].
A problematic case is e.g. i2f16 32768, which previously would be
converted to -32768.0 instead of returning the exactly representable
floating point result.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9597 >
2021-03-26 14:39:23 +00:00
Tony Wasserka
4ce8e422e3
aco/isel: Add documentation and asserts for convert_int
...
This function has evolved to be a generic helper function used throughout
the file, so having those assumptions written down explicitly and document
unsupported edge cases should help prevent incorrect use.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9597 >
2021-03-26 14:39:23 +00:00
Tony Wasserka
1e03796fa4
aco/isel: Don't request sign extension when truncating signed integers
...
This doesn't change semantics but allows us to reject this potentially
ambiguous configuration in convert_int in a later change.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9597 >
2021-03-26 14:39:23 +00:00
Tony Wasserka
3a2b055726
aco/isel: Fix i64/u64->float32 conversion for large inputs
...
Previously, inputs such as 0x100000000 would have their upper 32-bits
ignored despite being representable by 32-bit floats.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9597 >
2021-03-26 14:39:23 +00:00
Tony Wasserka
436922c84a
aco/isel: Don't emit unsupported i16<->f16 conversion opcodes on GFX6/7
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: b86305bb57 ("nir/algebraic: collapse conversion opcodes (many patterns)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4357
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9597 >
2021-03-26 14:39:23 +00:00
Erik Faye-Lund
3463b8bf41
zink: tighten emitted image spir-v caps
...
We might only need to emit a read or write cap for a given image. This
could provide the Vulkan driver with the chance to optimize things
slightly.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9855 >
2021-03-26 14:30:46 +00:00
Samuel Pitoiset
a3ee818b79
radv: report that degenerated triangles are not culled
...
I don't think the hw culls these primitives and NGG culling isn't
yet a thing. This also matches PAL.
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/9691 >
2021-03-26 12:52:40 +01:00
Simon Ser
1d349a6484
Revert "egl: Don't add hardware device if there is no render node v2."
...
This reverts commit 5743a36b2b .
Now that _eglAddDevice is always called with the correct software
hint, no need to bail out if the device doesn't have a render node.
On split render/display SoCs, the DRM device won't have a render
node, yet rendering is hardware-accelerated (via kmsro).
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 5743a36b2b ("egl: Don't add hardware device if there is no render node v2.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4178
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9697 >
2021-03-26 10:32:31 +00:00
Simon Ser
e39d72aec2
egl: only take render nodes into account when listing DRM devices
...
We don't want to expose an EGL device for a display-only DRM devices
(like VKMS). For these DRM devices we have a separate software-rendering
device (the first in the list, always present).
There is a similar check in _eglAddDRMDevice, however it will be
removed in a future commit to allow split render/display devices
to be properly added. We can't figure out whether we're on a split
render/display system before loading the driver.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 5743a36b2b ("egl: Don't add hardware device if there is no render node v2.")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9697 >
2021-03-26 10:32:31 +00:00
Simon Ser
08a51770bd
egl: fix software flag in _eglAddDevice call on DRM
...
On the EGL DRM platform, call _eglAddDevice with the software flag
set if GBM has loaded a software driver. This allows _eglAddDevice
to make the difference between llvmpipe and kmsro.
This is important on split render/display SoCs: we don't want to
advertise EGL_MESA_device_software on these systems.
Completely drop disp->Options.ForceSoftware, because GBM is
responsible for choosing software rendering and doesn't take this
hint into account.
Signed-off-by: Simon Ser <contact@emersion.fr >
Fixes: 5743a36b2b ("egl: Don't add hardware device if there is no render node v2.")
References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4178
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9697 >
2021-03-26 10:32:31 +00:00
Pierre-Eric Pelloux-Prayer
6298347ec7
mesa/st: fix lower_tex_src_plane in multiple samplers scenario
...
"plane[0].i32" is the plane being lowered, it's not the sampler we're looking
for.
It worked when there's a single sampler because, eg for NV12, plane[0].i32 for
the UV plane would be 1 and the added ":uv" sampler would also land at binding
point 1.
Fixes: 079e5f73d7 ("mesa/st: rewrite src var when lowering tex_src_plane")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9812 >
2021-03-26 10:21:35 +01:00
Boris Brezillon
3fe3aebd63
panfrost: Get rid of panfrost_pool_alloc()
...
This one is no longer used.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9827 >
2021-03-26 08:46:15 +01:00
Boris Brezillon
f23a023a7e
panfrost: Use the descriptor allocators where appropriate
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9827 >
2021-03-26 08:46:10 +01:00
Boris Brezillon
58747cd2f5
panfrost: Emit surface descriptors with pan_pack()
...
Now that we have surface descriptors defined in midgard.xml we can use
pan_pack() to emit them.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9827 >
2021-03-26 08:46:06 +01:00
Boris Brezillon
7c08bb5ad0
panfrost: Define the Surface and Surface-with-stride descriptors
...
Right now the code manipulates mali_ptr, but having surface descriptors
properly defined will allow us to use the descriptors allocator when
allocating a midgard texture.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9827 >
2021-03-26 08:46:01 +01:00
Boris Brezillon
a1c0cc3fdd
panfrost: Provide various helpers to simplify descriptor allocation
...
Got the alignment wrong a few times, so I figured it would be good to
have helpers that take care of the alignment requirements based on
the midgard.xml definitions.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9827 >
2021-03-26 08:45:57 +01:00
Boris Brezillon
724045aff2
panfrost: Specify descriptor alignment requirements
...
Once we have that in place, we can provide macros to simplify descriptor
allocation.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9827 >
2021-03-26 08:45:51 +01:00
Boris Brezillon
65931ffa27
pan/gen_pack: Parse alignment requirements
...
This will help us simplify descriptor allocation.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9827 >
2021-03-26 08:45:32 +01:00
Iago Toral Quiroga
e790c20403
broadcom/compiler: try to fill up delay slots after a thrsw
...
The way we handle thrsw instructions is that we try to merge them
back into previously scheduled instructions to fill up its delay
slots. This is generally safe, because the thrsw won't happen until
after the delay slots, so we are not really changing the execution
order of the instructions and we just need to make sure we don't
violate a few specific restrictions.
If we have not managed to fill up all delay slots after doing this,
then we emit as many NOPs as needed to fill them. This is to ensure
that we don't schedule an instruction that needs to execute after the
thread switch before the thread switch happens. However, doing this
can lead to inefficient code, since some times the instructions we
schedule after a thrsw are indepdent of the thrsw and could be safely
executed in its delay slots.
This change removes the fixed NOP emission after a thrsw to fill
delay slots and instead adds code to ensure that our instruction
scheduling is aware of when it is scheduling instructions in the
delay slots of a previous thrsw to avoid selecting conflicting
instructions.
The only case were we still emit fixed NOPs is for the thread end that
we emit to terminate the program after scheduling all instructions
because we can't end the instruction stream before the thread end
is properly executed.
total instructions in shared programs: 13691004 -> 13648140 (-0.31%)
instructions in affected programs: 4345951 -> 4303087 (-0.99%)
helped: 19645
HURT: 652
Instructions are helped.
total max-temps in shared programs: 2319317 -> 2318687 (-0.03%)
max-temps in affected programs: 10510 -> 9880 (-5.99%)
helped: 532
HURT: 9
Max-temps are helped.
total sfu-stalls in shared programs: 31752 -> 32354 (1.90%)
sfu-stalls in affected programs: 840 -> 1442 (71.67%)
helped: 7
HURT: 467
Sfu-stalls are HURT.
total inst-and-stalls in shared programs: 13722756 -> 13680494 (-0.31%)
inst-and-stalls in affected programs: 4335590 -> 4293328 (-0.97%)
helped: 19453
HURT: 758
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9825 >
2021-03-26 07:13:07 +00:00
Iago Toral Quiroga
f68f209e39
broadcom/compiler: add a v3d_qpu_writes_accum helper
...
We have helpers to check if an instruction writes to specific
accumulators. This one will check if it writes any of the general
purpose accumulators, which will come in handy in a follow-up
patch.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9825 >
2021-03-26 07:13:07 +00:00
Kenneth Graunke
640e8cb3dc
Half-revert "gallium/dri2: Pass the resource that corresponds to the plane"
...
This reverts the resource_get_param changes from Tomeu's commit
ab7744b280 . It breaks every single
program run on iris (such as wflinfo -a gl -p glx).
iris's I915_FORMAT_MOD_Y_TILED_CCS modifier reports two planes - one for
the main surface, and a second one for the CCS surface. However, there
is only one underlying pipe_resource. We only use pipe_resource::next
for modifier information when importing buffers from elsewhere; there is
no res->next for internally allocated resources created with modifiers.
resource_get_param() is not supposed to chase res->next pointers. The
hook is intended to take the base image, and the plane, as parameters.
The driver can then walk its own data structures however it sees fit
in order to find the appropriate plane, rather than enforcing a linked
list of resources.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9847 >
2021-03-25 18:24:53 -07:00
Marek Olšák
f903a4be9f
amd: update addrlib
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9668 >
2021-03-25 19:23:40 -04:00
Marek Olšák
3616e02ef3
amd/addrlib: define endianess differently
...
This removes a Mesa-specific change.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9668 >
2021-03-25 19:23:38 -04:00
Marek Olšák
1d69c0419b
amd/addrlib: prevent defining regparm differently
...
Define it in meson, so addrlib won't define it.
This is adding back the addrlib original code.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9668 >
2021-03-25 19:23:36 -04:00
Marek Olšák
59912cd4cf
amd/addrlib: add back the incorrect original DCC checking
...
This reduces Mesa-specific changes.
is_dcc_supported_by_CB() should protect against getting there.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9668 >
2021-03-25 19:23:34 -04:00
Iván Briano
042d24971e
anv: use helper function to get the buffer size
...
This ensures we get a properly aligned size for the buffer so we don't
trip over HW limits for push constants.
Closes #3703
Fixes dEQP-VK.robustness.image_robustness.push.* on HSW
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9699 >
2021-03-25 15:22:20 -07:00
Iván Briano
54b848b245
anv: move buffer size alignment into helper function
...
And use ANV_UBO_ALIGNMENT for it instead of a magic number.
This increases the alignment to 64B, but that ought to be good for
everyone.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9699 >
2021-03-25 15:20:53 -07:00
Vasily Khoruzhick
bff7fa3fe3
lima: compute nir_sha1 for shader key even if disk cache is disabled
...
We're using it for in-memory cache as well, so it needs to be computed
unconditionally.
Fixes: bf09ba5385 ("lima: implement shader disk cache")
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9838 >
2021-03-25 21:58:57 +00:00
Lionel Landwerlin
8b586d9ed6
intel: Add null hw layer
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2832 >
2021-03-25 19:10:03 +00:00
Lionel Landwerlin
54fe5b0482
meson: switch vulkan layer to list of choices
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2832 >
2021-03-25 19:10:03 +00:00
Jason Ekstrand
82b25a1d75
anv: Align inline uniform data to ANV_UBO_ALIGNMENT
...
If we're going to have a #define for UBO alignments, it's probably a
good idea to make sure everything is aligned to that. This increases
the alignment from 32B to 64B but that shouldn't hurt anyone.
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9837 >
2021-03-25 19:01:24 +00:00
Kenneth Graunke
5ae276f7e0
intel: Fix release build breakage
...
We missed changing one instance of debug_flag to debug_enabled in a
release-only ifdef branch.
Fixes: 758eb18c6f ("intel/compiler: Make vec4 generator take debug_enabled as a parameter")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9839 >
2021-03-25 11:36:58 -07:00
Danylo Piliaiev
243724031b
turnip: clamp to zero negative upper left corner of viewport
...
We cannot send negative viewport coordinates to the hardware,
so clamp them since negative min.x/y is valid per spec.
The negative origin still counts in calculations of guardband.
Fixes crash in 3DMark's "Sling Shot Extreme" test.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9629 >
2021-03-25 17:57:59 +00:00
Matt Turner
efd1d5cc59
ci: Use CI_PROJECT_ROOT_NAMESPACE
...
Currently, the template in e.g. .gitlab-ci/deqp-runner.sh containing
See https://$CI_PROJECT_NAMESPACE.pages.freedesktop.org/-/ ...
will print an invalid URL. Copied from .gitlab-ci/piglit/run.sh which
already uses CI_PROJECT_ROOT_NAMESPACE in its template.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9821 >
2021-03-25 17:31:25 +00:00
Erik Faye-Lund
422ad76cca
docs: Add 21.0.0 hashes
...
This was missed from the normal 21.0.0 release MR, so here's the hash
added retroactively.
Acked-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9826 >
2021-03-25 17:26:54 +00:00
Eric Anholt
b1e64a7771
ci/freedreno: Mark a630 as flaky on arb_draw_indirect-transform-feedback
...
This looks like a new one. Unclear cause -- appeared in a large branch
with potential impact, but I had also been doing TF work around that time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9819 >
2021-03-25 16:25:24 +00:00
Daniel Schürmann
8e43abcd2c
aco/ra: remove exec handling for phis
...
These are not temporaries anymore.
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9763 >
2021-03-25 15:12:19 +00:00
Daniel Schürmann
3284f755a3
aco/ra: allow m0 in get_reg_specified()
...
Totals from 1 (0.00% of 136546) affected shaders (Navi10):
CodeSize: 12788 -> 12776 (-0.09%)
Instrs: 2441 -> 2438 (-0.12%)
Latency: 29713 -> 29731 (+0.06%)
InvThroughput: 14857 -> 14866 (+0.06%)
Copies: 354 -> 353 (-0.28%)
Branches: 66 -> 65 (-1.52%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9763 >
2021-03-25 15:12:19 +00:00
Daniel Schürmann
4bfbd4de84
aco/ra: iterate backwards when coalescing phis
...
Aligning the phi definition with the operand from
the else- block can reduce the number of branches
if the else- block is otherwise empty.
Totals from 16 (0.01% of 136546) affected shaders (Navi10:
CodeSize: 707848 -> 707312 (-0.08%); split: -0.09%, +0.01%
Instrs: 126534 -> 126400 (-0.11%); split: -0.13%, +0.02%
Latency: 6399306 -> 6395082 (-0.07%)
InvThroughput: 6134374 -> 6132119 (-0.04%); split: -0.04%, +0.00%
SClause: 1879 -> 1871 (-0.43%)
Copies: 36316 -> 36219 (-0.27%); split: -0.37%, +0.10%
Branches: 4154 -> 4127 (-0.65%); split: -0.67%, +0.02%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9763 >
2021-03-25 15:12:19 +00:00
Daniel Schürmann
7c64623e94
aco/ra: refactor SSA repairing during register allocation
...
The previous approach attempted to construct phi nodes
on-demand and on-the-fly. Due to several bugs, it became
necessary to always create incomplete phis for all live-in
variables on loop headers, which is highly inefficient.
The new approach assumes that live-in variables on loop-
headers don't get renamed, and afterwards does one renaming
pass per loop nest. This greatly simplifies the code and
reduces the memory footprint.
Totals from 37 (0.03% of 136546) affected shaders (Navi10):
CodeSize: 588148 -> 588020 (-0.02%); split: -0.03%, +0.01%
Instrs: 111793 -> 111761 (-0.03%); split: -0.04%, +0.01%
Latency: 4546013 -> 4545611 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 2806217 -> 2805730 (-0.02%); split: -0.03%, +0.01%
VClause: 2044 -> 2046 (+0.10%)
SClause: 3889 -> 3884 (-0.13%)
Copies: 17730 -> 17700 (-0.17%); split: -0.23%, +0.06%
Branches: 3282 -> 3280 (-0.06%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9763 >
2021-03-25 15:12:19 +00:00
Daniel Schürmann
3ea2c05b32
aco/ra: split register_file initialization into separate function
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9763 >
2021-03-25 15:12:19 +00:00
Daniel Schürmann
e4902d4574
aco/ra: split affinity creation into separate function
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9763 >
2021-03-25 15:12:19 +00:00
Erik Faye-Lund
cf4ed05417
zink: follow spir-v 1.0 spec
...
OpEntryPoint is only supposed to include the Input and Output storage
classes prior to SPIR-V 1.4.
Since we're always emitting SPIR-V 1.0, we should simply omit these from
OpEntryPoint for now. If we start emitting SPIR-V 1.4 or later, we
should add these back in.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9828 >
2021-03-25 14:29:48 +00:00
Erico Nunes
ab71c0ba44
lima/ppir: rework liveness data structures to bitset
...
The liveness code in ppir can be a bottleneck in complicated shaders
with multiple spills, and the use of the mesa set data structure is one
of the main reasons it is expensive to run.
With some changes, it can be adapted to using bitsets which makes it run
substantially faster.
ppir liveness can't run with a regular bitset for registers since we
need to track inviditual component masks for non-ssa registers, but we
can switch to using a separate packed bit array just for the masks,
rather than a full blown hash set. This also makes operations such as
liveness propagation much more straightforward.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9745 >
2021-03-25 14:17:26 +00:00
Erico Nunes
2b83d99538
lima/ppir: remove use of live_out
...
The live_out set was serving mostly as a temporary storage of data
propagated from the next instructions.
If we do an early copy to preserve the instruction live_in set and
propagate the liveness information directly to the live_in set, we can
skip having a live_out set entirely.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9745 >
2021-03-25 14:17:26 +00:00
Erico Nunes
55b1dbb1c1
lima/ppir: remove liveness info from blocks
...
liveness information was stored in blocks so that the algorithm doesn't
have to find a valid instruction to inherit liveness information from.
It turns out this part of the code can be a performance bottleneck in
applications loading with complicated shaders, so skip the liveness
information in blocks to reduce the number of times we have to copy
liveness information.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9745 >
2021-03-25 14:17:26 +00:00
Danylo Piliaiev
56909868cd
turnip: implement VK_KHR_pipeline_executable_properties
...
Loosely based on ANV implementation.
For executable's internal representation we output:
- Initial NIR after spirv_to_nir
- Final optimized NIR
- IR3 disassembly
Note, that vkGetPipelineExecutablePropertiesKHR is required to
return executable properties even if pipeline was not created with
CAPTURE_STATISTICS or CAPTURE_INTERNAL_REPRESENTATIONS bits set.
So the executables array is unconditionally populated, however
NIR and IR3 disassemlies are filled only when
CAPTURE_INTERNAL_REPRESENTATIONS is set.
Passes dEQP-VK.pipeline.executable_properties.*
Works with RenderDoc.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8877 >
2021-03-25 13:53:33 +00:00
Danylo Piliaiev
2bff8fd53b
nir: add nir_shader_as_str function
...
It would be later used by Turnip in implementation of
VK_KHR_pipeline_executable_properties.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8877 >
2021-03-25 13:53:33 +00:00
Icecream95
616394cf31
pan/mdg: Use appropriate sizes for global loads/stores
...
When always using 128-bit operations, an access at the end of an SSBO
could spill over to the next page and cause a GPU fault. To avoid
this, pick the smallest instruction that fits.
The if ladder might need extending for sizes of less than 32 bits, but
those currently fail in other parts of the compiler so are untested.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9747 >
2021-03-25 13:23:47 +00:00
Icecream95
2f78ed8f0a
pan/mdg: Rename load/store operations
...
Use the actual bit sizes the instructions deal with.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9747 >
2021-03-25 13:23:47 +00:00
Rhys Perry
b7fb5450ef
ac: invalidate metadata after hs_emit_write_tess_factors()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9804 >
2021-03-25 10:46:21 +00:00
Iago Toral Quiroga
22a979be65
broadcom/compiler: convert add to mul when possible to allow merge
...
Integer add/sub can be implemented as either an add or a mul instruction
but we always emit them as add instructions at VIR level. We can use this
flexibility to improve our QPU scheduling so we can be more effective
at instruction merging by converting these to mul instructions when we
are attempting to merge them with another add instruction.
total instructions in shared programs: 13721549 -> 13691004 (-0.22%)
instructions in affected programs: 3340493 -> 3309948 (-0.91%)
helped: 12805
HURT: 1656
Instructions are helped.
total max-temps in shared programs: 2319528 -> 2319317 (<.01%)
max-temps in affected programs: 5285 -> 5074 (-3.99%)
helped: 195
HURT: 3
Max-temps are helped.
total sfu-stalls in shared programs: 31616 -> 31752 (0.43%)
sfu-stalls in affected programs: 469 -> 605 (29.00%)
helped: 52
HURT: 161
Sfu-stalls are HURT.
total inst-and-stalls in shared programs: 13753165 -> 13722756 (-0.22%)
inst-and-stalls in affected programs: 3340383 -> 3309974 (-0.91%)
helped: 12782
HURT: 1666
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9769 >
2021-03-25 09:51:42 +00:00
Alejandro Piñeiro
bdf93f4e3b
v3dv/cmd_buffer: return early for draw commands if there is nothing to draw
...
So for example, on v3dv_CmdDrawIndexed we can return early if
instanceCount is 0.
This fixes failures when using the simulator with tests with the
following pattern:
dEQP-VK.draw.instanced.draw_indexed_vk_primitive_topology*
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9820 >
2021-03-25 09:38:04 +00:00
Iago Toral Quiroga
bb201733ac
v3dv/pipeline_cache: fix assert
...
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Fixes: e354c5280 ('3dv/pipeline: try to get the shader variant directly from the cache')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9824 >
2021-03-25 09:25:27 +00:00
Erik Faye-Lund
e87ff43fb3
zink: do not open-code vector-compares
...
We already have code to lower away these to something we don't need so
much special-case code to handle.
The sad part here is that we generate slightly worse code; trees of
OpLogicalAnd / OpLogicalOr instead of OpAny OpAll. But I would imagine
that for any GPU where this matters, these would be easy to combine
back, so I'm not losing a lot of sleep over this.
But this makes things simpler. And if we *really* care about OpAny or
OpAll, we should add NIR ALU instructions for them so we can optimize
them on other places as well, not open-code all places where it could
improve things.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9797 >
2021-03-25 09:15:13 +00:00
Erik Faye-Lund
296a2fb350
zink: drop bool attempt in float vector compares
...
There's no such thing as a 1-bit float, so remove the special-case. It's
not going to trigger.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9797 >
2021-03-25 09:15:13 +00:00
Erik Faye-Lund
9b52ac694c
zink: fix vector comparison
...
This should have been using unordered compares all along.
This fixes a dEQP failure.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9797 >
2021-03-25 09:15:13 +00:00
Vasily Khoruzhick
bf09ba5385
lima: implement shader disk cache
...
Wire up disk cache routines and change fs and vs keys to use nir_sha1
instead of pointer to uncompiled shader to be able to reuse them for
disk cache.
Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9672 >
2021-03-25 06:31:41 +00:00
Vasily Khoruzhick
3099ce7d02
lima: rename lima_{fs,vs}_bind_state to lima_{fs,vs}_uncompiled_shader
...
Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9672 >
2021-03-25 06:31:41 +00:00
Vasily Khoruzhick
1261c06c68
lima: rename *_shader_state to *_compiled_shader
...
Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9672 >
2021-03-25 06:31:41 +00:00
Tapani Pälli
5c7dd85e4f
android: add some more stub functions for cross compilation
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9796 >
2021-03-25 06:06:16 +00:00
Simon Ser
e10a094e0a
gbm: add gbm_bo_get_fd_for_plane
...
This commit adds a new gbm_bo_get_fd_for_plane function, which does the
same as gbm_bo_get_fd but allows specifying the plane.
v2: - Rename to gbm_bo_get_fd_for_plane (Emil)
Signed-off-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5442 >
2021-03-25 05:48:00 +00:00
Tomeu Vizoso
ab7744b280
gallium/dri2: Pass the resource that corresponds to the plane
...
Previously, we were calling resource_get_handle for the first plane in
the image, regardless of what plane was being requested.
v2: - Add assert (Simon)
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5442 >
2021-03-25 05:48:00 +00:00
Tapani Pälli
382e5f2737
anv/android: fix image creation with external format
...
This fixes crashes seen with following group of tests:
android.graphics.cts.BasicVulkanGpuTest
Fixes: 6fa56273be ("anv/image: Drop duplicate 'format' in anv_image_create()")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9799 >
2021-03-25 07:33:38 +02:00
Jesse Schwartzentruber
02492bea5f
glcpp: Fix undefined behaviour in glcpp
...
Specifically, fix this error (which is covered in existing tests):
../src/compiler/glsl/glcpp/pp.c:198:28: runtime error: applying non-zero offset 1 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/compiler/glsl/glcpp/pp.c:198:28 in
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9669 >
2021-03-25 00:23:43 +00:00
Dylan Baker
95c58aacf8
docs: update calendar and link releases notes for 21.0.1
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9818 >
2021-03-25 00:18:57 +00:00
Dylan Baker
38bce7238c
docs: Add 21.0.1 hashes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9818 >
2021-03-25 00:18:57 +00:00
Dylan Baker
e26906ce93
docs: add release notes for 21.0.1
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9818 >
2021-03-25 00:18:57 +00:00
Dylan Baker
3e9d753cb9
docs: update calendar and link releases notes for 20.3.5
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9818 >
2021-03-25 00:18:57 +00:00
Dylan Baker
8463066078
docs: Add hashes for 20.3.5
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9818 >
2021-03-25 00:18:57 +00:00
Dylan Baker
930d2a92a3
docs: add release notes for 20.3.5
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9818 >
2021-03-25 00:18:57 +00:00
Mike Blumenkrantz
e20aebb83c
lavapipe: use the passed offset for CmdCopyQueryPoolResults
...
this avoids overwriting buffer[0] on every copy
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9813 >
2021-03-25 00:07:03 +00:00
Mike Blumenkrantz
4ad5bfd1bd
lavapipe: fix CmdCopyQueryPoolResults for partial pipeline statistics queries
...
if this isn't a query for all pipeline statistics, the bits that are
set need to be individually copied in increasing order
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9813 >
2021-03-25 00:07:03 +00:00
Mike Blumenkrantz
5ecad3cb44
util/set: stop leaking u32 key sets which pass a mem ctx
...
Fixes: 10a7682413 ("util: add _mesa_set_create_u32_keys where keys are not pointers")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9810 >
2021-03-24 23:32:40 +00:00
Caio Marcelo de Oliveira Filho
e93c8ab023
intel/compiler: Use a struct for brw_compile_cs parameters
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
05933fb0f7
intel/compiler: Use INTEL_DEBUG=blorp to dump blorp shaders
...
Make INTEL_DEBUG=blorp dump the blorp shaders instead using the
general INTEL_DEBUG=fs,vs, which is now reserved to the actual FS and
VS shaders used by the pipeline.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
7fb1e58651
intel/compiler: Make visitors take debug_enabled as a parameter
...
The callers already have this value, and we would like to make it
follow different rules other than stage that might not be visible to
the helper function, so just pass explicitly.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
758eb18c6f
intel/compiler: Make vec4 generator take debug_enabled as a parameter
...
The callers already have this value, and we would like to make it
follow different rules other than stage that might not be visible to
the helper function, so just pass explicitly.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
244d2daa00
intel/compiler: Make brw_postprocess_nir take debug_enabled as a parameter
...
The callers already have this value, and we would like to make it
follow different rules other than stage that might not be visible to
the helper function, so just pass explicitly.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
82d77f0ea8
intel/compiler: Refactor the shader INTEL_DEBUG checks
...
Make the check once in a variable, that can be reused for other parts.
Also add `unlikely` to the various conditionals depending on it
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
57d664245e
intel/compiler: Use a struct for brw_compile_vs parameters
...
Makes calling code more explicit about what is being set, and allows
take advantage of zero initialization for the ones the callsite don't
care.
Besides moving to the struct, two extra "ergonomic" changes were done:
- Add a new shader_time boolean, so shader_time_index is ignored when
unused -- this allow taking advantage of the zero initialization of
unset fields.
- Since we have a struct, provide space for the error_str pointer.
Both iris and i965 were using it, and the extra rstrdup in case of
failure shouldn't be a burden for the others.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
f5e1765f98
intel/compiler: Use a struct for brw_compile_fs parameters
...
Makes calling code more explicit about what is being set, and allows
take advantage of zero initialization for the ones the callsite don't
care.
Besides moving to the struct, two extra "ergonomic" changes were done:
- Add a new shader_time boolean, so shader_time_index is ignored when
unused -- this allow taking advantage of the zero initialization of
unset fields.
- Since we have a struct, provide space for the error_str pointer.
Both iris and i965 were using it, and the extra rstrdup in case of
failure shouldn't be a burden for the others.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Caio Marcelo de Oliveira Filho
84c3d68344
intel/compiler: Make vue_map parameter const for brw_compile_fs
...
Just a documentation hint that the VUE map is not modified.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9779 >
2021-03-24 23:18:46 +00:00
Tony Wasserka
893aab57a8
aco/ra: Avoid unnecessary copying of std::vectors
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9801 >
2021-03-24 22:20:25 +00:00
Eric Anholt
9be24c89c8
freedreno: Clamp TF prims written to buffer size pre-a6xx.
...
I thought based on some previous debug this was going to fix a pile of
dEQPs, but no luck. Still, one less TODO in the driver.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9687 >
2021-03-24 21:22:01 +00:00
Eric Anholt
538e5059d0
freedreno: Don't count SW TF queries on a6xx.
...
On a6xx, since we have GS and tess, we do this counting in hardware. The
next fix is going to use some functions that don't work with GS prims.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9687 >
2021-03-24 21:22:01 +00:00
Eric Anholt
2e002675db
freedreno: Move the primitives generated/written updates after the draw.
...
If we're going to clamp the written value, we need the max vtx update from
the draw's state emit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9687 >
2021-03-24 21:22:01 +00:00
Eric Anholt
b02d52459f
freedreno: Move max-tf-vtx calculation to just the HW that needs it.
...
a3xx-a4xx use it in in-shader TF code, and all of a3xx-a5xx will need it
shortly for fixing the SW TF queries.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9687 >
2021-03-24 21:22:01 +00:00
Eric Anholt
4af6fbb965
freedreno/ir3: Move max-tf-vtx calculation to a .c file
...
This much code should probably be a function.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9687 >
2021-03-24 21:22:01 +00:00
Eric Anholt
c29c7f5042
freedreno: Assert that TF prims generated can ignore active_queries.
...
We won't ever be in a meta path with transform feedback enabled, so we
don't need to pay attention to the flag here.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9687 >
2021-03-24 21:22:01 +00:00
Erik Faye-Lund
a95912e9af
zink: check for mirror-clamp extension
...
This cap depends on a device extension.
Fixes: b59d98ae5f ("zink: enable PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9803 >
2021-03-24 21:12:00 +00:00
Erik Faye-Lund
2644835f03
zink: add missing required feature
...
We check for this feature in zink_is_format_supported, so VK drivers
need to expose it to get BC textures working. Let's document the
reality.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9803 >
2021-03-24 21:12:00 +00:00
Erik Faye-Lund
a466c2a783
zink: check for stores and atomics features
...
These limits depens on feature-bits.
Fixes: 322a3d4fb0 ("zink: partially enable SSBO pipe cap")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9803 >
2021-03-24 21:12:00 +00:00
Erik Faye-Lund
215ff8246f
zink: check for depth-bias-clamp feature
...
This cap depends on a feature-bit.
Fixes: 3d7d55c2cf ("zink: enable PIPE_CAP_POLYGON_OFFSET_CLAMP")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9803 >
2021-03-24 21:12:00 +00:00
Erik Faye-Lund
f6f2cbeb44
zink: check for pipeline statistics feature
...
This cap depends on a feature-bit.
Fixes: cb5957e13d ("zink: enable pipeline statistics cap")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9803 >
2021-03-24 21:12:00 +00:00
Tomeu Vizoso
f64ef064de
ci/fdo: Use trimmed traces for Valve games
...
Now that we have trimmed versions of them, we can run them in a more
reasonable amount of time.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9771 >
2021-03-24 20:54:58 +00:00
Eric Anholt
57e00aed8e
iris: Flag for resolves when stencil enable changes, too.
...
The watcher of this dirty flag looks at this state, so it sure seems like
it needs it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9768 >
2021-03-24 20:38:38 +00:00
Mike Blumenkrantz
bbe5eb43c7
zink: don't generate sampled image type for non-sampled images
...
this creates validation errors
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9802 >
2021-03-24 19:54:20 +00:00
Mike Blumenkrantz
674132dee8
compiler/spirv: use undefs when extending image coords
...
we need 4 components for the nir ops, but swizzling one value to multiple
channels like this gets confusing when trying to debug image ops that don't
require 4 channels
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9723 >
2021-03-24 19:07:19 +00:00
Eric Anholt
52e7297f9c
ci/android: Build the v3dv driver.
...
We want to make sure that this keeps working on Android.
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9764 >
2021-03-24 17:25:07 +00:00
Eric Anholt
6d43955941
ci/android: Make sure we don't detect system libexpat.
...
There may be some more elegant way to do things, but the important thing
is that android builds don't have any .pc files we should be using, other
than what our CI generated for zlib.
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9764 >
2021-03-24 17:25:07 +00:00
Eric Anholt
3cc390bf7d
broadcom: Disbale CLIF dumping when libexpat isn't available.
...
Given what a niche developer tool CLIF dumps are, no sense requiring
libexpat just for that.
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9764 >
2021-03-24 17:25:07 +00:00
Eric Anholt
6eee6769e9
turnip: Fix KGSL build since common dispatch rework.
...
Fixes: 59d70c47c7 ("turnip: Use the common dispatch framework")
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9764 >
2021-03-24 17:25:07 +00:00
Mike Blumenkrantz
de9f04ca66
zink: add more rp cache asserts
...
ensure that any discrepencies are immediately detected
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9784 >
2021-03-24 17:14:59 +00:00
Mike Blumenkrantz
7892b18acf
zink: remove unnecessary flush during image maps
...
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9786 >
2021-03-24 16:45:41 +00:00
Mike Blumenkrantz
6c35b4c771
zink: remove handling for resource flushing between compute/gfx batches
...
this is no longer a thing
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9786 >
2021-03-24 16:45:41 +00:00
Mike Blumenkrantz
9871c883cc
zink: avoid unnecessary resource refs during descriptor update
...
this was necessary if resources could be on both gfx and compute batches,
but now there's only one type of batch
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9786 >
2021-03-24 16:45:41 +00:00
Tapani Pälli
87de6c3c7d
mesa: check cube completeness for cube fbo attachments
...
When checking framebuffer completeness, we must verify that each cube
attachment is cube complete, e.g. format and size needs to match.
This fixes upcoming CTS framebuffer completeness tests for cubemaps.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9748 >
2021-03-24 16:20:20 +00:00
Mike Blumenkrantz
3d94144d38
zink: add buffer_subdata hook
...
this just sets some flags to help optimize mapping
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9790 >
2021-03-24 16:11:30 +00:00
Mike Blumenkrantz
8dd8754238
zink: explicitly use stream uploader for staging buffers
...
this requires adding an offset member to the transfer struct
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9789 >
2021-03-24 16:00:28 +00:00
Mike Blumenkrantz
a3c65ffa3f
zink: create separate upload mgr for constants
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9789 >
2021-03-24 16:00:28 +00:00
Rhys Perry
a6b367a5af
aco/tests: add tests for denormal-aware propagation
...
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/9079 >
2021-03-24 14:02:41 +00:00
Rhys Perry
e3c283e0bc
aco: use -1.0*x and 1.0*|x| for fneg/fabs
...
Besides -1.0*x being 1 dword smaller than x^0x80000000, this commit also
improves generated code when the application requires that denormals are
flushed.
Future versions of DXVK will require that 32-bit denormals are flushed.
fossil-db (GFX8):
Totals from 21021 (14.22% of 147787) affected shaders:
SGPRs: 1288960 -> 1288944 (-0.00%); split: -0.01%, +0.01%
VGPRs: 792672 -> 792848 (+0.02%); split: -0.01%, +0.03%
CodeSize: 62439228 -> 62403552 (-0.06%); split: -0.11%, +0.05%
MaxWaves: 136182 -> 136181 (-0.00%); split: +0.00%, -0.00%
Instrs: 12230882 -> 12239927 (+0.07%); split: -0.01%, +0.08%
fossil-db (GFX10.3):
Totals from 20191 (13.80% of 146267) affected shaders:
VGPRs: 799992 -> 800032 (+0.01%)
CodeSize: 59763656 -> 59715484 (-0.08%); split: -0.12%, +0.03%
MaxWaves: 525378 -> 525376 (-0.00%)
Instrs: 11511082 -> 11517419 (+0.06%); split: -0.00%, +0.06%
fossil-db (GFX8, d3d float controls):
Totals from 87160 (58.98% of 147787) affected shaders:
SGPRs: 5395072 -> 5408480 (+0.25%); split: -0.06%, +0.31%
VGPRs: 3596716 -> 3581592 (-0.42%); split: -0.55%, +0.13%
CodeSize: 271347396 -> 266814460 (-1.67%); split: -1.67%, +0.00%
MaxWaves: 539669 -> 540400 (+0.14%); split: +0.15%, -0.02%
Instrs: 53395194 -> 52257505 (-2.13%); split: -2.13%, +0.00%
fossil-db (GFX10.3, d3d float controls):
Totals from 82306 (56.27% of 146267) affected shaders:
VGPRs: 3572312 -> 3558848 (-0.38%); split: -0.44%, +0.06%
CodeSize: 273494748 -> 269648968 (-1.41%); split: -1.41%, +0.00%
MaxWaves: 2007156 -> 2009950 (+0.14%); split: +0.15%, -0.01%
Instrs: 52251568 -> 51356424 (-1.71%); split: -1.71%, +0.00%
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/9079 >
2021-03-24 14:02:41 +00:00
Rhys Perry
561fcfb50f
aco: don't optimize min(a*1.0, ...) to min(a, ...) on GFX8
...
fossil-db (GFX8):
Totals from 2 (0.00% of 147787) affected shaders:
VMEM: 662 -> 642 (-3.02%)
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/9079 >
2021-03-24 14:02:41 +00:00
Mike Blumenkrantz
5313ad8e45
zink: handle gallium multi draws more effectively
...
there's no need to actually call through the whole function, only the
draw calls need to be looped
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9785 >
2021-03-24 12:46:32 +00:00
Mike Blumenkrantz
0daacd1347
zink: ci updates
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9783 >
2021-03-24 12:35:18 +00:00
Mike Blumenkrantz
40cc265888
zink: toggle conditional render when beginning/ending a renderpass
...
this resumes the same conditional render which was previously active
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9783 >
2021-03-24 12:35:18 +00:00
Mike Blumenkrantz
4e23816243
zink: only update conditional render buffer when it needs to be updated
...
avoid re-fetching data
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9783 >
2021-03-24 12:35:18 +00:00
Mike Blumenkrantz
cc90a0c3da
zink: store conditional render predicate to query and split out start/stop
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9783 >
2021-03-24 12:35:18 +00:00
Mike Blumenkrantz
cce1f22ef3
zink: isolate gfx stage bits when updating shader modules
...
ensure that we don't overflow the array here
Fixes: b2247a3724 ("zink: add compute programs and pipelines")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9798 >
2021-03-24 12:22:56 +00:00
Samuel Pitoiset
50b5a9a4a0
anv: use common entrypoints for VK_KHR_create_renderpass2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9601 >
2021-03-24 11:21:53 +00:00
Samuel Pitoiset
d7c5b7398b
lavapipe: use common entrypoints for VK_KHR_create_renderpass2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9601 >
2021-03-24 11:21:53 +00:00
Samuel Pitoiset
2c2ea54020
turnip: use common entrypoints for VK_KHR_create_renderpass2
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9601 >
2021-03-24 11:21:53 +00:00
Samuel Pitoiset
5cb6999bc3
radv: use common entrypoints for VK_KHR_create_renderpass2
...
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/9601 >
2021-03-24 11:21:53 +00:00
Samuel Pitoiset
0ce6b625a2
vulkan: add common entrypoints for VK_KHR_create_renderpass2
...
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/9601 >
2021-03-24 11:21:53 +00:00
Rhys Perry
453a97b2cf
ci: add expected fail for RADV
...
This fails for me. It looks like it was missed in d8fa93a707 .
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9778 >
2021-03-24 10:58:25 +00:00
Mike Blumenkrantz
12dfba1951
zink: unify gfx and compute batches
...
now that batches aren't limited and flushing is less costly, there's no
reason to keep these separate
the primary changes here are removing the zink_queue enum and collapsing
related arrays which used it as an index, e.g., zink_batch_usage into single
members
remaining future work here will include removing synchronization flushes which
are no longer necessary and (eventually) removing batch params from a number of
functions since there is now only ever a single batch
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9765 >
2021-03-24 03:26:20 +00:00
Mike Blumenkrantz
fcf0eab8a0
zink: call clear() instead of reset() for batch states on context destroy
...
this avoids (future) issues with desync due to long-lived fences which
may not yet have completed at the time the context is destroyed
upcoming changes will not allow resetting uncompleted batch states, so
this avoids any sort of conflict as such changes are introduced
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9765 >
2021-03-24 03:26:20 +00:00
Mike Blumenkrantz
e89f674c83
zink: add wrapper to reset batch state structs
...
this will be useful in the future when we need additional work to handle
resets of states that aren't detected as being "completed"
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9765 >
2021-03-24 03:26:20 +00:00
Vinson Lee
d7f7045108
ac: Fix emit_split_buffer_store modulus operation.
...
Fix defect reported by Coverity Scan.
Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: start_byte % 2 == 2 is always
false regardless of the values of its operands. This occurs as the
logical operand of if.
Fixes: 3185cb7dbf ("ac: Add NIR passes to lower ES->GS I/O to memory accesses.")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9730 >
2021-03-23 19:48:15 -07:00
Bas Nieuwenhuizen
d248c91162
radv: Allow DCC for images with modifiers that are read-only.
...
If we avoid writing anything or decompressing this should be fine,
and allows gamescope to work without nodcc for radeonsi.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817 >
2021-03-24 00:28:26 +00:00
Bas Nieuwenhuizen
b5ecf0748a
radv: Ensure we never decompress or FCE read-only textures.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817 >
2021-03-24 00:28:26 +00:00
Bas Nieuwenhuizen
66e17b410a
radv: Enable sharing with DCC with modifiers.
...
Also disable any heuristics.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817 >
2021-03-24 00:28:26 +00:00
Bas Nieuwenhuizen
85e5bbd11c
radv: Allow extra planes for DCC.
...
plane_count is only the format plane count.
Fixes: 7f7da82dbb ("radv: Add image layout with drm format modifiers.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817 >
2021-03-24 00:28:25 +00:00
Jesse Natalie
c022c9603d
d3d12: Use ID3D12Device9::CreateCommandQueue1 when available
...
This lets us provide a creator ID, which lets us tag GLOn12 work
and separate it from other D3D12 work on the same singleton device.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3859
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9776 >
2021-03-23 22:11:19 +00:00
Eric Anholt
8120871b8d
freedreno/a5xx: Switch to using ir3_cache for looking up our VS/FS
...
Saves the lock/unlock to get the variants for VS/BS/FS programs, gives us
a place we could hang future linked program state, and gives us safe
constlen handling that fixes a couple of our piglits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698 >
2021-03-23 19:55:38 +00:00
Eric Anholt
ce36e60b18
freedreno/a4xx: Switch to using ir3_cache for looking up our VS/FS
...
Saves the lock/unlock to get the variants for VS/BS/FS programs, and gives
us a place we could hang future linked program state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698 >
2021-03-23 19:55:38 +00:00
Eric Anholt
b44d52f62b
freedreno/a3xx: Switch to using ir3_cache for looking up our VS/FS.
...
Saves the lock/unlock to get the variants for VS/BS/FS programs, and gives
us a place we could hang future linked program state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698 >
2021-03-23 19:55:38 +00:00
Eric Anholt
6941cd5c98
freedreno: Move the ir3 linked shader cache to the context.
...
The other ir3 backends would love to have it to reduce lookups and to be
able to cache linked-program state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698 >
2021-03-23 19:55:38 +00:00
Mauro Rossi
cd1d8b4371
android: vulkan/util: add vk_descriptors.{c,h} to Makefile.sources
...
Fixes the following building errors:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.radv_intermediates/LINKED/vulkan.radv.so
...
ld.lld: error: undefined symbol: vk_create_sorted_bindings
>>> referenced by radv_descriptor_set.c:158 (external/mesa/src/amd/vulkan/radv_descriptor_set.c:158)
...
ld.lld: error: undefined symbol: vk_create_sorted_bindings
>>> referenced by radv_descriptor_set.c:340 (external/mesa/src/amd/vulkan/radv_descriptor_set.c:340)
Fixes: ad241b15a9 ("vk: consolidate dynamic descriptor binding sorting")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9766 >
2021-03-23 20:29:55 +01:00
Mauro Rossi
cd135b877d
android: r600/sfn: fix sfn_nir_algebraic.c gen rules
...
Changelog:
- Correct typo in generator name which is sfn_nir_algebraic.py
- Rename variables for the gen rules according to meson rules
- Align python command and options according to meson rules
Fixes the following building error:
FAILED: ninja: 'external/mesa/src/gallium/drivers/r600/sfn/r600_nir_algebraic.py',
needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_pipe_r600_intermediates/sfn_nir_algebraic.c',
missing and no known rule to make it
Fixes: 195952786b ("r600/sfn: Add algebraic lowering for fsin and fcos")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9766 >
2021-03-23 20:29:55 +01:00
Erik Faye-Lund
ccb50f8ad3
zink: emit all interpolation modes
...
It's not just flat-shading that matters in the case of fragment outputs.
Let's play nicely and emit any interpolation mode instead.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9775 >
2021-03-23 17:22:09 +00:00
Erik Faye-Lund
80c3a53927
zink: factor out interpolation to helper
...
We actually need to set all of these for fragment inputs as well, so
let's make a helper for this that we can reuse.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9775 >
2021-03-23 17:22:09 +00:00
Mike Blumenkrantz
277ea7a015
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726 >
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz
116811e963
zink: trigger pending clears during flush
...
this applies all pending fb clears at the time of flush to handle the scenario
of start -> clear() -> flush() properly
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726 >
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz
6d138b5f92
zink: refactor clears a little to track a bitfield of enabled clears on the context
...
this makes the state of 'are there clears pending?' more accessible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726 >
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz
a1d03cd031
zink: simplify some queue-related query code
...
we can collapse these conditionals now that things are more unified
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726 >
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz
01790bfd45
zink: always flag xfb barrier on gfx flush when appropriate
...
we need this to be set for internal flushes too
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726 >
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz
e7362a9cbd
zink: move zink_flush_compute() users to zink_flush_queue()
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726 >
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz
fec07a664e
zink: rework public batch flush function to be useful again
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726 >
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz
67b20bff09
zink: relax unreachable() to debug_printf when waiting on batch
...
I forgot that this was a reachable case pre-tc, but if there's no longer
a record of a batch_id then that just means it completed in the distant
past
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9772 >
2021-03-23 12:50:37 -04:00
Jesse Natalie
e3f48ac829
wgl: Fix wglCreatePbufferARB pixel format lookup
...
All other call sites of stw_pixelformat_get_info pass iPixelFormat as-is,
and stw_pixelformat_get_info also subtracts one internally, so I think
this was just an error.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9760 >
2021-03-23 16:17:48 +00:00
Mike Blumenkrantz
e6955d440f
zink: ci updates
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607 >
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz
9ea9b852a2
zink: emulate PIPE_FORMAT_R8G8B8X8_UNORM
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607 >
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz
3bb138ce3e
zink: handle blitting of color formats with ignored alpha channels
...
for e.g., R8G8B8X8 -> R8G8B8A8, we have to force a u_blitter call in order to use
a sampler which ignores alpha, otherwise we end up with broken rendering
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607 >
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz
fc23ddc22a
zink: force PIPE_SWIZZLE_1 for X channels in samplerviews
...
this is generic handling for RGBX-type formats
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607 >
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz
62ab64c276
zink: fix multisampled shader image load/store
...
I didn't ever have a driver to test on which could handle multisampled shader
images while writing this, but need to actually pass the sample id here
Fixes: 9cd2aff1a3 ("zink: add handling for all basic image ops in ntv")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9724 >
2021-03-23 15:48:14 +00:00
Mike Blumenkrantz
3adc4c41e1
zink: fix spirv image operand ordering
...
image operands are ordered by their operand's spirv value, meaning that
the availability operands need to go last here
Fixes: 882ab6afb7 ("zink: add spirv builder functions for image ops")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9724 >
2021-03-23 15:48:14 +00:00
Mike Blumenkrantz
e696596f86
zink: move batch-tracked resources to fence object
...
these are effectively managed by the fence, so it makes sense to store
them there
the set is ralloc-allocated, so explicitly destroying it isn't needed
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753 >
2021-03-23 15:29:42 +00:00
Mike Blumenkrantz
a8d925f52e
zink: always reset batch states when finding a new one
...
this is a bit safer
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753 >
2021-03-23 15:29:42 +00:00
Mike Blumenkrantz
d54688f1e8
zink: make batch usage unsetting function public
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753 >
2021-03-23 15:29:42 +00:00
Mike Blumenkrantz
a315e8ce3e
zink: move 'batch_id' and 'is_compute' members to fence
...
prep for future work, no functional changes
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753 >
2021-03-23 15:29:42 +00:00
Tomeu Vizoso
93e19b8b40
ci: Fix visibility property of LAVA jobs
...
LAVA expects a different syntax for this property:
https://docs.lavasoftware.org/lava/glossary.html#term-visibility
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Fixes: 84f91dfea5 ("CI: Change LAVA job visibility")
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9770 >
2021-03-23 15:01:53 +00:00
Tomeu Vizoso
75951a44ee
Revert "CI: Disable Panfrost T760"
...
The machines should be stable now.
This reverts commit fc2814417e .
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/9770 >
2021-03-23 15:01:53 +00:00
Tomeu Vizoso
573c8196e4
Revert "ci/panfrost: Disable t860/radeonsi testing while the runners are struggling."
...
Infrastructure should be more stable now.
This reverts commit 0a1c533c6e .
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/9770 >
2021-03-23 15:01:53 +00:00
Tomeu Vizoso
666966969f
Revert "ci/panfrost: disable the rest of these jobs temporarily"
...
Infrastructure should be more stable now.
This reverts commit 806c612131 .
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/9770 >
2021-03-23 15:01:53 +00:00
Mike Blumenkrantz
051460b3c9
softpipe: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741 >
2021-03-23 14:44:48 +00:00
Mike Blumenkrantz
f9c83782f7
st/glsl_to_nir: lower indirect derefs of builtins in non-packed uniform case
...
the builtin lowering can't handle dynamic array indexing, so this requires
that all indirect derefs be lowered any time this pass is invoked in order
to avoid crashing
fixes #4132
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741 >
2021-03-23 14:44:48 +00:00
Mike Blumenkrantz
6900498faa
nir: add nir_lower_indirect_builtin_uniform_derefs()
...
this is a special version of indirect deref lowering which is used by
mesa/st to remove dynamic indexing from builtin uniforms for the lowering
pass in non-packed uniform case
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741 >
2021-03-23 14:44:48 +00:00
Mike Blumenkrantz
11ea1d1777
zink: unify clear color conversion code
...
at some point this will get fixed to work for format conversions
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9712 >
2021-03-23 14:34:19 +00:00
Mike Blumenkrantz
e4e753333b
zink: cache transfer maps
...
vk spec disallows mapping memory regions more than once, but we always
map the full memory range, so we can just refcount and store the pointer
onto the resource object for reuse to avoid issues here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9725 >
2021-03-23 14:23:17 +00:00
Mike Blumenkrantz
230748d614
zink: break out buffer mapping part of zink_transfer_map
...
no functional changes, but this is going to get much more complex in
the near future
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9725 >
2021-03-23 14:23:17 +00:00
Mike Blumenkrantz
63fe1dc65b
ci: update xfails for ppc64le and s390x
...
tests are passing now
Acked-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9773 >
2021-03-23 14:01:49 +00:00
Samuel Pitoiset
d8fa93a707
ci: update list of expected CTS failures for RADV
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9756 >
2021-03-23 10:19:20 +01:00
Jose Fonseca
2a50ab8571
gitlab-ci: Build meson-mingw32-x86_64 w/o zlib.
...
To prevent hard requirement of zlib from creeping in, as
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9727 >
2021-03-23 05:55:07 +00:00
Mauro Rossi
cb4287608a
android: anv: add libcutils shared dependency
...
My previous patch merged as 2b1930a50a was incomplete
Fixes the following building error:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.anv_intermediates/LINKED/vulkan.anv.so
...
ld.lld: error: undefined symbol: property_get
>>> referenced by os_misc.c:193 (external/mesa/src/util/os_misc.c:193)
>>> os_misc.o:(os_get_option) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_util_intermediates/libmesa_util.a
Cc: 21.0 <mesa-stable@lists.freedesktop.org >
Fixes: eeecc21d93 ("util: Add property_get() fallback for android")
Fixes: 2b1930a50a ("android: radv: add libcutils shared dependency")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9744 >
2021-03-22 22:52:13 +01:00
Rob Clark
e7202e889b
freedreno: Split out devicetree helpers
...
The freedreno pps datasource is going to need the same, so split out
helpers that can be re-used.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9758 >
2021-03-22 20:46:17 +00:00
Rob Clark
9479ae9761
freedreno/fdperf: Use os_read_file()
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9758 >
2021-03-22 20:46:17 +00:00
Rob Clark
5871f4177c
freedreno: Make headers C++ happy
...
We'll need a few of these for the C++ based gfx-pps performance counter
collector datasource.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9758 >
2021-03-22 20:46:17 +00:00
Eric Anholt
e4e393a65c
freedreno/a6xx: Disable sample averaging on depth/stencil resolves.
...
From the GLES 3.2 spec:
"If the source formats are integer types or stencil values, a single
sample’s value is selected for each pixel. If the source formats are
floating-point or normalized types, the sample values for each pixel are
resolved in an implementation-dependent manner. If the source formats are
depth values, sample values are resolved in an implementation-dependent
manner where the result will be between the minimum and maximum depth
values in the pixel."
For Z24S8 we were doing an average, which would be invalid for the stencil
data, and apparently the CTS didn't catch that. For Z32F, our averaging
was technically legal, but given the Vulkan spec's requirement of sample 0
support but not sample average support for depth and stencil resolves, it
suggests that our averaging behavior was unusual. Let's not spend power
on producing surprising results.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9661 >
2021-03-22 19:07:08 +00:00
Eric Anholt
431b0ef9ee
freedreno/a6xx: Rename the RB_BLIT_INFO.INTEGER field to SAMPLE_0.
...
As @samuelig found, this is the field for disabling sample averaging and
using sample 0 instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9661 >
2021-03-22 19:07:08 +00:00
Kenneth Graunke
a30d091a10
iris: Delete stale comment in iris_lost_context_state
...
Hasn't been necessary since b338bb70e0 .
Caught by Dave Airlie.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9752 >
2021-03-22 18:58:27 +00:00
Daniel Schürmann
05fb5e85f2
.mailmap: fix email for Daniel Schürmann
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9755 >
2021-03-22 18:56:22 +00:00
Danylo Piliaiev
a5b37c64d1
turnip: expose several already implemented extensions
...
They were promoted to Vulkan 1.1 and we already support them.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9757 >
2021-03-22 18:20:57 +00:00
Connor Abbott
d8a2abe348
freedreno/computerator: Add script for finding reg file size
...
This helps with finding the various parameters introduced in the last
commit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498 >
2021-03-22 18:03:16 +00:00
Connor Abbott
50d5ed1e5e
freedreno: Report max_waves in shaderdb output
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498 >
2021-03-22 18:03:16 +00:00
Connor Abbott
d274649799
freedreno/computerator: Use threadsize calculated by ir3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498 >
2021-03-22 18:03:16 +00:00
Connor Abbott
2ecb9700e8
freedreno: Use threadsize calculated by ir3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498 >
2021-03-22 18:03:16 +00:00
Connor Abbott
7ecc70b31c
turnip: Use threadsize calculated by ir3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498 >
2021-03-22 18:03:16 +00:00
Connor Abbott
fd7960e191
ir3: Calcuate max_waves and threadsize
...
max_waves is just for shader-db stats for now, but threadsize will
replace the various mechanisms used to determine threadsize across the
different gen's. Calculating these correctly entails adding a bunch of
details about the sizes of various things to ir3. In the future we will
use the guts of the max_waves calculation to inform RA decisions as
well, which is why the max_waves calculation is broken up into register
dependent/independent pieces.
Something should be said about the units of reg_size_vec4. These units
were chosen for two reasons:
1. As said in the comment, it makes some calculations easier.
2. For a4xx/a5xx, where we don't know as much because we haven't done
the same sorts of experiments to probe for the HW configuration, it
corresponds more directly to things that are known. The existing code
switches to the smaller threadsize when r24.x or higher is used,
which translates directly to a reg_size_vec4 of 48. If we chose
different units (e.g. multiplying by wave_granularity and/or
threadsize_base), then to match the same behavior we'd have to set
reg_size_vec4 based on some other parameters that aren't 100% known.
If someone comes along and updates them, they might inadvertantly
break it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498 >
2021-03-22 18:03:16 +00:00
Connor Abbott
cbc68c79a5
freedreno: Add local_size to ir3_shader_variant
...
We want to use the local_size when available to calculate the threadsize
in ir3, and we need it to work with e.g. computerator where we don't
have a nir shader. Add a local_size field and use that in computerator
instead of of a separate structure that's inaccessable to core ir3.
Also set a dummy local_size in the tests to avoid a divide-by-zero.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498 >
2021-03-22 18:03:16 +00:00
Alejandro Piñeiro
74785346b4
v3dv: Add support for the on-disk shader cache
...
Quoting Jason's commit message (afa8f5892 ), that also applies here:
"The Vulkan API provides a mechanism for applications to cache their
own shaders and manage on-disk pipeline caching themselves.
Generally, this is what I would recommend to application developers
and I've resisted implementing driver-side transparent caching in the
Vulkan driver for a long time. However, not all applications do this
and, for some use-cases, it's just not practical."
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
cf71280d74
v3dv/device: avoid unused-result warning with asprintf
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
2bee6ffec3
v3dv/pipeline: compute sha1 for no-op fragment shaders correctly
...
We should use the nir shader, as with internal vkShaderModule, instead
of just the name.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
9a4099858b
v3dv/pipeline: don't create a variant if compilation failed
...
Also return the proper Vulkan result for this case, that is somewhat
tricky. Technically Create[Graphics/Compute]Pipeline only allow OOM
errors. So for this case, there is only the alternative of the generic
VK_ERROR_UNKNOWN, even if we known the cause of the error. From spec:
"VK_ERROR_UNKNOWN will be returned by an implementation when an
unexpected error occurs that cannot be attributed to valid behavior
of the application and implementation. Under these conditions, it
may be returned from any command returning a VkResult"
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
e354c52801
v3dv/pipeline: try to get the shader variant directly from the cache
...
Until now we were always doing a two-step cache lookup, as we were
using the NIR shaders to fill up the key to lookup for the compiled
shaders. But since we were already generating the sha1 key with the
original SPIR-V shader (or its internal NIR representation) any info
we were collecting from from NIR is already implicit in the original
shader, so we can avoid using the NIR in most cases.
Because the v3d_key that is used to compile a shader is populated with
data coming directly from the NIR shader or produced during NIR
lowerings, we can't use it directly as part of the pipeline cache
entry. We could split them, but that would be confusing, so we add a
new struct, v3dv_pipeline_key used specifically to search for the
compiled shaders on the pipeline cache. v3d_key would be still used to
compile the shaders.
As we are using the same sha1 key for all compiled shaders in a
pipeline, we can also group all of them in the same cache entry, so we
don't need a lookup for each stage. This also allows to cache pipeline
data shared by all the stages (like the descriptor maps).
While we are here, we also create a single BO to store the assembly
for all the pipeline stages.
Finally, we remove the link to the variant on the pipeline stage
struct, to avoid the confusion of having two links to the same
data. This mostly means that we stop to use the pipeline stage
structures after the pipeline is created, so we can freed them.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
6afb8a9fec
v3dv/pipeline: use broadcom_shader_stage as pipeline/variant stage type
...
So we could avoid using gl_shader_stage plus a is_coord boolean, that
only applies to VERTEX.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
0b98f20310
v3dv: define broadcom shader stages
...
Mostly the same that main mesa gl_shader_stage, but including the
coordinate shader. This would allow to loop over all the available
stages (for example if we need to free them, compute the max spill
size, etc).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
d7f4038374
v3dv/pipeline: remove v3d_key from shader_variant and pipeline stage
...
We stopped to re-use them after pippeline creation long ago, so let's
reduce the size of both structs, and avoid serialize/deserialize for
the variant case.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
b8c73c512a
v3dv/pipeline: remove compiled_variant_count field
...
We are not really compiling several variants, or at least not on the
same pipeline.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
ebb2297a91
v3dv/pipeline: move topology to pipeline
...
So now we only store it once per pipeline, instead of once per
pipeline stage.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
dd72c99d77
v3dv/pipeline: use driver_location_map instead of nir utilities
...
If we were able to get a shader variant from the pipeline cache, we
will not have the nir shader available.
Note that this is what we were doing on the driver before the nir io
helpers were available.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
b71fd5587e
broadcom/compiler: add driver_location_map at vs prog data
...
This maps the nir shader data.location to its final
data.driver_location. In general we are using the driver location as
index (like vattr_sizes on the same struct), so having this map is
useful if what we have is the data.location, and we don't have
available the original nir shader.
v2: use memset instead of for loop, and nir_foreach_shader_in_variable
instead of nir_foreach_variable_with_modes (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
2be0c36775
broadcom/compiler: add local_size in v3d_compute_prog_data
...
As we plan to try to get directly the compiled variant from the cache,
it would be possible to not have available the nir shaders, so we add
this info on prog data.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
ab252d73a9
v3dv/pipeline: remove pipeline->use_push_constants
...
In the past we used this boolean for several things, it is really
superfluous right now.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
f276efb2f8
v3dv/pipeline: remove pregenerate_variant
...
Right now we were not pre-generating several variants, but we decided
to let this method, just in case we need that idea back. This ended
being a bad idea. Several months have passed without that need, so
having that method just adds confusion. Also, if we need to add a
multiple-variant in the future, perhaps we would need to do it
different, so let's not template in advance.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
098816fc9a
v3dv/pipeline_cache: add more details when dumping debug info
...
We tweak a little some of the individual messages, and add a new
option to dump the stats when the pipeline destroy.
As we are here we also we also tweak the names of the global options
to make it more clear.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403 >
2021-03-22 17:10:47 +00:00
Mike Blumenkrantz
ad241b15a9
vk: consolidate dynamic descriptor binding sorting
...
this code was duplicated across several drivers
Reviewed-by: Adam Jackson <ajax@redhat.com >
turnip changes Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9480 >
2021-03-22 16:51:55 +00:00
Dylan Baker
b992b38de6
docs: Add calendar entries for 21.1 release candidates.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9605 >
2021-03-22 16:46:38 +00:00
Dylan Baker
4a2d123aaf
docs: Extend calendar entries for 21.0 by 1 releases.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9605 >
2021-03-22 16:46:38 +00:00
Michel Zou
97e2d96e22
docs: missing lvp win32surface ext in features.txt
...
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9702 >
2021-03-22 15:37:28 +00:00
Ilia Mirkin
cf58debf63
nvc0: fix reported driver queries for Pascal and later GPUs
...
We haven't added the sm/metric info post-GM200. So make sure we don't
report available queries there. Additionally, fix the group retrieval to
take into account that either driver stats or SM stats may not be
available.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740 >
2021-03-22 15:20:45 +00:00
Ilia Mirkin
8604cc8101
nvc0: ensure sufficient push space for indirect data
...
There may be up to 3 pushbuf data's submitted in this function, make
sure that we allocate enough room for these.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740 >
2021-03-22 15:20:45 +00:00
Ilia Mirkin
ee3920b215
nv50: add appropriate space check before adding new pushbuffer
...
nouveau_pushbuf_data does not check that there are available pushes in
the current batch. So add a space check for this. Avoids crashes with
the HUD and glxspheres.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740 >
2021-03-22 15:20:45 +00:00
Ilia Mirkin
3e39d059df
nv50,nvc0: remove explicit target argument from view creation
...
Before texture views were supported, this was needed in some cases.
However with texture views (added eons ago), there is now a target
attribute in the template. Use it and remove the explicit argument.
Should help prevent bugs with inconsistencies between the stored
template target and the one that's used to create the view.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740 >
2021-03-22 15:20:45 +00:00
Ilia Mirkin
38371ff628
nv50: initialize target for blit source surfaces
...
This target is used to determine whether MS scaling factors are to be
uploaded.
Fixes: 1288ac7632 ("nv50: don't try to upload MSAA settings for BUFFER textures")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740 >
2021-03-22 15:20:45 +00:00
Danylo Piliaiev
208250b376
ir3: update info about applicability of saturation modifier
...
On a6xx saturation doesn't work on cat4 and on bary.f
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9751 >
2021-03-22 15:02:14 +00:00
Gert Wollny
5942a0f1ac
r60/sfn: don't lower scomp
...
The backend has the corresponding ops.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452 >
2021-03-22 15:19:46 +01:00
Gert Wollny
ca270207bb
r600/sfn: lower find_msb variants to find_msb_rev
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452 >
2021-03-22 15:19:46 +01:00
Gert Wollny
befda5ba1b
r600/sfn: optimize comp+csel using fused ops
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452 >
2021-03-22 15:19:46 +01:00
Gert Wollny
195952786b
r600/sfn: Add algebraic lowering for fsin and fcos
...
* fsin and fcos require normalization of the input
* bitfield_insert requires an additional shift of the insert value
v2: drop bitfield_insert lowering code, it is already avaibable as
compiler option (Rhys Perry)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452 >
2021-03-22 15:19:46 +01:00
Gert Wollny
318701b803
nir: Add r600 specific sin and cos variants
...
r600 expect the input values to be normalited by divinding by 2 *PI, so
add an opcode to be able to lower this in nir.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452 >
2021-03-22 15:19:46 +01:00
Gert Wollny
0f5b3c37c5
nir: Add opcodes for fused comp + csel and optimizations
...
Some backends, like r600 support a fused version of int and float compare
against zero and and csel. Adding these opcodes here makes it possible to
optimize this in nir.
v2: Add rules for float compare + csel
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452 >
2021-03-22 15:19:46 +01:00
Gert Wollny
a5747f8ab3
nir: add opcodes for *find_msb_rev and lowering
...
Some hardware supports a version of find_msb where the bits are counted
starting at the high bit, and this needs some lowering to obtain the
value that is expected by *find_msb
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452 >
2021-03-22 15:19:46 +01:00
Rhys Perry
28d116c889
radv: lower view_index to zero if multiview is disabled
...
Apparently, gl_ViewIndex can be used if multiview is disabled.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/4446
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9718 >
2021-03-22 13:38:43 +00:00
Mike Blumenkrantz
92a5ea13fc
zink: implement a global framebuffer cache
...
this uses the same mechanics as surface caching, but it
also requires that surfaces keep refs of the framebuffers they're
attached to so that they can invalidate the fb object upon destruction,
as, similar to program objects, the fb objects are "owned" by their attachments
loosely based on patches by Antonio Caggiano
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9665 >
2021-03-22 08:49:26 -04:00
Mike Blumenkrantz
9b544c1fe7
zink: use a custom surface referencing function whenever unrefing a surface
...
pipe_surface_reference uses surface->context, which is not reliable when sharing
surfaces between contexts. since a surface will never be destroyed outside of
zink if its context is dead, forcing surfaces to go directly to the screen object
prevents accessing dead contexts
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9665 >
2021-03-22 08:49:26 -04:00
Mike Blumenkrantz
a9ab5b4f16
zink: break out surface destroy function into a screen function
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9665 >
2021-03-22 08:49:26 -04:00
Mike Blumenkrantz
c56fe22064
zink: use surface references for fb attachments
...
this guarantees the lifetimes of framebuffer surfaces
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9665 >
2021-03-22 08:49:26 -04:00
Mike Blumenkrantz
17ef151f62
zink: add explicit surface/bufferview batch-tracking functions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9665 >
2021-03-22 08:49:26 -04:00
Mike Blumenkrantz
73fa8c2bdb
zink: make fb ref func return bool on free
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9665 >
2021-03-22 08:49:26 -04:00
Iago Toral Quiroga
cbe24a0e9c
broadcom/compiler: use nir_lower_undef_to_zero
...
total instructions in shared programs: 13731663 -> 13721549 (-0.07%)
instructions in affected programs: 98242 -> 88128 (-10.29%)
helped: 191
HURT: 131
Instructions are helped.
total threads in shared programs: 412272 -> 412296 (<.01%)
threads in affected programs: 24 -> 48 (100.00%)
helped: 12
HURT: 0
Threads are helped.
total uniforms in shared programs: 3780693 -> 3779137 (-0.04%)
uniforms in affected programs: 10564 -> 9008 (-14.73%)
helped: 114
HURT: 7
Uniforms are helped.
total max-temps in shared programs: 2319942 -> 2319528 (-0.02%)
max-temps in affected programs: 4191 -> 3777 (-9.88%)
helped: 113
HURT: 22
Max-temps are helped.
total sfu-stalls in shared programs: 31584 -> 31616 (0.10%)
sfu-stalls in affected programs: 217 -> 249 (14.75%)
helped: 51
HURT: 54
Inconclusive result (value mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13763247 -> 13753165 (-0.07%)
inst-and-stalls in affected programs: 98719 -> 88637 (-10.21%)
helped: 187
HURT: 134
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9681 >
2021-03-22 12:17:13 +00:00
Iago Toral Quiroga
1c987f5db3
broadcom/compiler: optimize constant vfpack
...
total instructions in shared programs: 13733627 -> 13731663 (-0.01%)
instructions in affected programs: 174140 -> 172176 (-1.13%)
helped: 1597
HURT: 310
Instructions are helped.
total uniforms in shared programs: 3784601 -> 3780693 (-0.10%)
uniforms in affected programs: 58678 -> 54770 (-6.66%)
helped: 2886
HURT: 3
Uniforms are helped.
total max-temps in shared programs: 2322714 -> 2319942 (-0.12%)
max-temps in affected programs: 15729 -> 12957 (-17.62%)
helped: 2189
HURT: 1
Max-temps are helped.
total spills in shared programs: 6010 -> 6012 (0.03%)
spills in affected programs: 61 -> 63 (3.28%)
helped: 0
HURT: 1
total fills in shared programs: 13494 -> 13497 (0.02%)
fills in affected programs: 89 -> 92 (3.37%)
helped: 0
HURT: 1
total sfu-stalls in shared programs: 31521 -> 31584 (0.20%)
sfu-stalls in affected programs: 328 -> 391 (19.21%)
helped: 30
HURT: 94
Inconclusive result (%-change mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13765148 -> 13763247 (-0.01%)
inst-and-stalls in affected programs: 174237 -> 172336 (-1.09%)
helped: 1551
HURT: 316
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9681 >
2021-03-22 12:17:13 +00:00
Iago Toral Quiroga
b189409a46
broadcom/compiler: handle implicit uniform loads when optimizing constant alu
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9681 >
2021-03-22 12:17:13 +00:00
Samuel Pitoiset
92764abc82
radv: add RADV_DEBUG=novrsflatshading option
...
To easily debug if enabling VRS for flat shading is broken.
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/9515 >
2021-03-22 12:36:26 +01:00
Samuel Pitoiset
f5540209ab
radv: enable VRS 2x2 coarse shading for flat shading on GFX10.3+
...
This should safe to enable and shouldn't degrade the quality.
It decreases the number of PS invocations by 4 when 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/9515 >
2021-03-22 12:36:26 +01:00
Samuel Pitoiset
cf54ff3ea6
radv: determine if a pipeline is candidate for flat shading
...
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/9515 >
2021-03-22 12:36:25 +01:00
Samuel Pitoiset
abc64caef9
radv: gather if the FS uses perspective or linear interpolations
...
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/9515 >
2021-03-22 12:35:35 +01:00
Samuel Pitoiset
b2c1ed262d
radv: restore previous MRT CB_SHADER_MASK logic
...
It was moved to the shader info pass to compute MRTs from the shader
outputs to fix some CTS failures but this is actually unnecessary.
The CTS failures were actually CTS bugs.
This reverts 70cc80805c ("radv: compute CB_SHADER_MASK from the
fragment shader outputs") and 76ee45d3a8 ("radv: adjust CB_SHADER_MASK
for dual-source blending in the shader info pass").
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/9703 >
2021-03-22 11:32:49 +00:00
Tony Wasserka
2fb71504f0
radv: Skip 0-sized index buffers only when necessary
...
This workaround is only needed on Navi10 and Navi14.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9429 >
2021-03-22 11:47:25 +01:00
Tony Wasserka
ec34a9a889
ac: Add has_zero_index_buffer_bug to ac_gpu_info
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9429 >
2021-03-22 11:47:22 +01:00
Tony Wasserka
dad3cda66c
radv: Fix improper max_index_count argument for indexed draws
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3598
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9429 >
2021-03-22 11:46:59 +01:00
Samuel Pitoiset
35816188b7
radv: initialize CMASK with correct clear codes
...
From AMDVLK.
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/9650 >
2021-03-22 10:23:05 +01:00
Samuel Pitoiset
fdc0009962
radv: fix clearing CMASK layers on GFX9+
...
The driver was clearing all layers.
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/9650 >
2021-03-22 10:23:03 +01:00
Samuel Pitoiset
74a3f48987
ac/surface: init CMASK slice size on GFX9+
...
It was only set for GFX6-8.
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/9650 >
2021-03-22 10:23:00 +01:00
Marcin Ślusarz
b0452f150e
intel/aub_viewer: fix decoding of sampler states
...
There's only 1 sampler state behind
3DSTATE_SAMPLER_STATE_POINTERS[_VS|_HS|_DS|_GS|_PS] and
3DSTATE_SAMPLER_STATE_POINTERS.[PointertoVSSamplerState|PointertoPSSamplerState|PointertoGSSamplerState].
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
186301a232
intel/aub_viewer: drop bogus check
...
state_addr == bo.addr, bo.size==0 is handled by another check
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
2b5f9602b7
intel/aub_viewer: catch invalid sampler state pointer
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
08f8677b29
intel/batch_decoder: assert on invalid sampler pointer
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
56cd91bc7c
intel/batch_decoder: fix decoding of sampler states
...
There's only 1 sampler state behind
3DSTATE_SAMPLER_STATE_POINTERS[_VS|_HS|_DS|_GS|_PS] and
3DSTATE_SAMPLER_STATE_POINTERS.[PointertoVSSamplerState|PointertoPSSamplerState|PointertoGSSamplerState].
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
cd0f9cdb6e
intel/batch_decoder: drop bogus check
...
state_addr == bo.addr, bo.size==0 is handled by another check
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
bb8ee5f52d
intel/batch_decoder: catch invalid sampler state pointer
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
31178db610
i965: fix decode_get_bo
...
Similar fix to the iris one.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
f33852e268
iris: fix decode_get_bo
...
It tries to be helpful by returning BO metadata matching exactly
the requested address, but it "forgets" to fix the remaining size.
The only caller of this function (ctx_get_bo) already deals with
raw BO metadata, so return it as such instead of fixing size too.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Vasily Khoruzhick
5762aa4e56
lima: relax checks of imported BO
...
We don't need stride of imported buffer to be equal to calculated
stride if the buffer is linear.
Fixes #3070
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9646 >
2021-03-22 04:23:23 +00:00
Dave Airlie
b06f121fcc
lavapipe: enable 8/16-bit storage extensions
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:17:36 +10:00
Dave Airlie
27822a6f0b
gallivm: use fp16 casts lowering
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:17:31 +10:00
Dave Airlie
48080e5bdf
nir: lower 64-bit floats to 32-bit first.
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:17:14 +10:00
Dave Airlie
01dfd65a2d
nir: port fp16 casting code from dxil
...
This moves the dxil pass to common code and makes dxil
use the new code.
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:16:59 +10:00
Dave Airlie
224069cefd
gallivm/nir: handle bool registers.
...
lowering to 32-bit bools doesn't get rid of register stores,
so handle those.
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:16:45 +10:00
Dave Airlie
2a9e98130b
gallivm: fix non-32bit ubo loads
...
8/16-bit storage requires ubo loads for the smaller types,
fix the ubo loading and bounds checking.
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:16:14 +10:00
Arno Messiaen
07080fd4c9
lima/ppir: increase usage of pipeline regs
...
It's possible to increase usage of ppir_pipeline_reg_fmul and
ppir_pipeline_reg_vmul by reordering arguments in some cases, so let's
do that.
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Arno Messiaen <arnomessiaen@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3232 >
2021-03-22 01:31:11 +00:00
Jesse Natalie
55d153b9f5
nir: Temporarily disable optimizations for MSVC ARM64
...
There's currently an MSVC optimizer bug which causes a stack overflow
in the compiler if it attempts to optimize fsat.
Acked-by: Rob Clark <robdclark@chromium.org >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9700 >
2021-03-21 21:41:41 +00:00
Ilia Mirkin
3e68e7f90d
gallium,st: add missing viewport swizzles
...
Viewports must be initialized with the appropriate swizzles (for
hardware that supports this feature).
Fixes: 90fcb3fef2 (st/mesa: add NV_viewport_swizzle support)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9732 >
2021-03-21 18:29:50 +00:00
Rob Clark
befd9fbbba
freedreno/a6xx: Fix typo
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535 >
2021-03-21 16:01:01 +00:00
Rob Clark
5b96689fa0
freedreno: Autotune bypass vs GMEM rendering decision
...
In some cases, like gl_driver2, we have all the characteristics that
make our current simplistic bypass vs GMEM decision pick GMEM (ie. batch
starts with a clear, has blend enabled, has a high draw count, etc),
but each draw touches very few pixels and the per-tile state-change
overhead leaves us CP limited. We would be better in this case picking
the bypass path.
So use feedback from # of samples-passed in previous render passes to
the same FBO to give us a bit more information to make better choices.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2798
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535 >
2021-03-21 16:01:01 +00:00
Rob Clark
0610c7ba84
freedreno/a6xx: Fix sRGB/snorm vs sysmem clear path
...
This shows up when, thanks to the next patch, we decide to start doing
bypass instead of GMEM for some dEQP's
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535 >
2021-03-21 16:01:01 +00:00
Rob Clark
2e529ed7ef
freedreno: Add gmem_reason_mask
...
Older gens had more restrictions about GMEM bypass which do not apply to
newer generations. Add a bitmask so we know which bits are not a hard
requirement for using GMEM.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535 >
2021-03-21 16:01:01 +00:00
Rob Clark
1c24e9500b
freedreno/batch: Add a way to clone a batch key
...
For autotune, the lifetime of it's hashtable keys doesn't match the
batch, so we'll need to clone the key before inserting into the
hashtable.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535 >
2021-03-21 16:01:01 +00:00
Rob Clark
aa7dd6ff43
freedreno/batch: Export key/hash fxns
...
We are going to re-use these for autotune.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535 >
2021-03-21 16:01:01 +00:00
Rob Clark
4f3c16ec05
freedreno: Add draw cost estimation
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9535 >
2021-03-21 16:01:01 +00:00
Mike Blumenkrantz
a1d80c6d96
zink: more accurately check samplecount caps for shader images
...
lavapipe can only do up to 4bits, so this isn't just a binary check
Fixes: 0daa61553d ("zink: check if multisample support exists for shader image formats")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9713 >
2021-03-21 10:15:13 -04:00
Rob Clark
fd4a742cc3
freedreno/a6xx: Emit streamout state on every draw
...
If stream-output is active, we can't skip it's state-emit, even if the
SO buffer(s) have not changed.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 13:29:05 -07:00
Rob Clark
03cf083dba
freedreno: Push multi-draw closer to backend
...
It will take some more extensive work to plumb this through the backends
(although that should increase the benefit further), but this is already
worth a nearly 4x speedup in piglit drawoverhead tests with no state
change, so this seems like a useful intermediate step.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 13:29:05 -07:00
Rob Clark
68e752652c
freedreno: Handle multi-draw edge cases
...
Use the multi-draw emulation helper in the edge cases where we don't
handle multi-draw.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 13:29:05 -07:00
Rob Clark
5765932375
freedreno: Use multi-draw helper
...
In the normal case, we'll be pushing multi-draw (eventually) down into
the backend, but there are still a few remaining edge cases where we
can't deal with it.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 13:29:05 -07:00
Rob Clark
27ab249c9a
u_draw: Add helper to emultate multi-draw
...
No need to duplicate this in every driver.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 13:29:05 -07:00
Rob Clark
7b1505d165
freedreno: Drop u_trim_pipe_prim() from fast-paths
...
Not sure if we need this for a2xx. For a3xx and a4xx we need it for sw
xfb which needs to know the trimmed # of vertices in the VS. We do not
need it on a6xx, and unlikely need it for anything a5xx+.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 13:29:05 -07:00
Rob Clark
9947f950fb
freedreno/a6xx/vsc: Be more tolerate of degenerate prims
...
Before we drop u_trim_pipe_prim(), we need to be more tolerant of the
edge cases it was protecting us from.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:14:34 -07:00
Rob Clark
4e82c5da73
freedreno: Only collect sw stats when required
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:14:34 -07:00
Rob Clark
e9652630c7
freedreno: Split out helper for updating sw stats
...
And while we're at it, handle the num_draws > 1 case, to prepare for
plumbing num_draws further down.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:14:34 -07:00
Rob Clark
66985973aa
freedreno: Don't ignore geom/tess stage resources
...
The draw resource-tracking logic looks like it never was updated to
account for HS/DS/GS stages. Add it bitmask of bound stages so we only
have to loop over the bound stages.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:14:32 -07:00
Rob Clark
8cb51ba30e
freedreno: Add dirty bit for state that needs rsc tracking
...
aa1ddb6fe3 skipped the tracking for the
!dirty case, but we can do a bit better and track at bind time whether
the state change is one that requires resource tracking.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
66cbe66090
freedreno: Small dirty flag re-org
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
9401d5bf1a
freedreno/a6xx: Convert to dirty_groups
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4106
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
32bc809a08
freedreno: Add mapping to generation specific dirty state
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
0cb989d71f
freedreno: Add helpers to mark dirty state
...
Doesn't change anything yet, but this will let us more easily add
mapping from dirty gallium state to dirty gen-specific state-groups.
Note that the mapping from shader-state to global state in
fd_context_dirty_shader() optimizes out for release builds. This
is kind of important, in the next patch we'll want ffs(SOME_CONST)
to optimize away even more.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
9aef029635
freedreno/ir3: Precompute whether we need driver-params
...
To save a bit of extra math in the draw-path.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
b5e1e99da1
freedreno/drm: Inline iova calculation
...
The shift/or are frequently zero, so this lets the compiler optimize out
some draw-overhead hotpath.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
93d5349fa5
freedreno/drm: Move emit_reloc_tail to head
...
Get this out of the way first to avoid some register push/pop. Only
reloc->bo is needed after writing the address into cmdstream, so this
turns msm_submit_append_bo() into a tail call.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
684586b96e
freedreno/drm: Split 64b vs 32b paths
...
No need to 'if (gpu_id >= 500)' on every reloc
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:09 -07:00
Rob Clark
9168d9cbfb
freedreno/drm: Split softpin "reloc" functions
...
"OBJECT" rb's are long lived, and generating them is not a hotpath, but
relocs to "STREAMING" rb's are a hot path. But we can decouple these.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9581 >
2021-03-20 12:13:08 -07:00
Jason Ekstrand
731ea06758
intel/tools: Handle BINDING_TABLE_POOL_ALLOC in batch decoding
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
79d9c914ae
intel/genxml: Make BindingTablePoolEnable a bool
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
05e133a84a
intel/tools: Handle GT_MODE in the batch decoder
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
b2421f7b44
intel/tools: Handle milti-LRI in the batch decoder
...
Context batches tend to have a lot of multi-LRI and, if we want to be
able to parse those registers nicely, we really handle it.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:33:18 -05:00
Jason Ekstrand
65077cdf57
intel/genxml: Binding table pointers are 15 bits on GFX version 12.5+
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:33:16 -05:00
Kenneth Graunke
6fb93465bd
intel/genxml: Add a partial GT_MODE definition for Gen11+.
...
I chose to drop "HW" from the name of this field because on Gen11
it applies to both HW and SW binding tables, so it's a bit of a
misnomer.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:32:55 -05:00
Jose Fonseca
6e6cd7d93c
scons: Remove.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9720 >
2021-03-20 10:38:55 +00:00
Jose Fonseca
85c1770044
appveyor: Remove integration.
...
It's only testing SCons w/ MSVC at this moment.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9720 >
2021-03-20 10:38:55 +00:00
Christian Gmeiner
09117357b7
etnaviv: rename struct members
...
As the structs are used for TE and NTE change the naming of the
struct members to be more generic.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103 >
2021-03-20 10:51:21 +01:00
Christian Gmeiner
53b51a1037
etnaviv: add support for NTE
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103 >
2021-03-20 10:51:15 +01:00
Christian Gmeiner
a9494a8b9c
etnaviv: factor out TS state emitting
...
Will be reused in NTE path.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103 >
2021-03-20 10:51:12 +01:00
Christian Gmeiner
ec91456952
etnaviv: etnaviv: put sampler limit determination into own function
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103 >
2021-03-20 10:51:06 +01:00
Vinson Lee
1fe20aa7d9
clover: Add constructor for sampler_argument.
...
Fix defects reported by Coverity Scan.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize s.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8657 >
2021-03-20 02:04:23 +00:00
Bas Nieuwenhuizen
3257ab9f23
radv: Dedupe winsyses per device.
...
The heap usage/budget needs to be tracked per process instead
of per device.
Fixes: 7bef192018 ("radv: add support for VK_EXT_memory_budget")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9651 >
2021-03-20 01:31:50 +00:00
Lepton Wu
921dafc98b
virgl: Use atomic operation directly.
...
This make sure we don't trigger assert in pipe_reference
Signed-off-by: Lepton Wu <lepton@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: John Bates <jbates@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9722 >
2021-03-19 23:57:58 +00:00
Eric Anholt
25c002bae9
ci/freedreno: Mark glx-swap-copy as a flake on a630.
...
Just flaked on a post-merge pipeline.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715 >
2021-03-19 22:07:57 +00:00
Eric Anholt
1af7be02d7
ci/bare-metal: Move the db820c lockup detect to the right boot script.
...
Fixes: 2407952ec9 ("ci/bare-metal: Restart a run on intermittent kernel lockups.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715 >
2021-03-19 22:07:57 +00:00
Eric Anholt
4eb7c4d60c
ci/freedreno: Mark all of dEQP TF as flaky.
...
I keep working on stabilizing it, but no luck yet. Stop blocking CI on
our flakes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715 >
2021-03-19 22:07:57 +00:00
Mike Blumenkrantz
60ea60ec4d
zink: rewrite queue dispatch to use monotonic batch ids instead of hardcoded ones
...
historically zink has been bound to 4 gfx batches and then a separate compute batch
was added. this is not ideal for a number of reasons, the primary one being that if
an application performs 5 glFlush commands, the fifth one will force a gpu stall
this patch aims to do the following, all of which are necessarily done in the same patch
because they can't be added incrementally and still have the same function:
* rewrite batch tracking for resources/views/queries/descriptors/...
|originally this was done with a single uint32_t as a bitmask, but that becomes cumbersome
to track as batch counts increase, not to mention it becomes doubly-annoying
when factoring in separate compute batches with their own ids. zink_batch_usage gives
us separate tracking for gfx and compute batches along with a standardized api for
managing usage
* flatten batch objects to a gfx batch and a compute batch
|these are separate queues, so we can use an enum to choose between an array[2] of
all batch-related objects
* switch to monotonic batch ids with batch "states"
|with the flattened queues, we can just use monotonic uints to represent batch ids,
thus freeing us from constantly using bitfield operations here and also enabling
batch counts to scale dynamically by allocating/caching "states" that represent a batch
for a given queue
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9547 >
2021-03-19 20:16:02 +00:00
Mike Blumenkrantz
a06958278f
zink: split off a bunch of batch struct members to new batch state struct
...
this is just a cosmetic patch intended for review, skip this in bisects
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9547 >
2021-03-19 20:16:02 +00:00
Mike Blumenkrantz
62335d7bc5
llvmpipe/setup: use bigger hammer to force fs constant updating correctly
...
this race condition between destroying ubo backing memory in lavapipe and
performing descriptor updates can be triggered from more than just queries,
so forcing the update just before the Problem Area seems like the best way to
permanently resolve the issue
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9711 >
2021-03-19 16:04:39 -04:00
Jesse Natalie
012bc2fc77
meson, util: Make zlib optional again
...
This adds a HAVE_COMPRESSION macro, which is undefined if neither zlib
nor zstd are present, and is used to no-op compress.h/c. This also has
a side effect of fixing SCons, since it won't define this macro.
Fixes: d7ecbd5bf8 ("util: create some standalone compression helpers")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689 >
2021-03-19 19:33:59 +00:00
Jesse Natalie
28bf06f350
panfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler
...
Fixes: 2d4597de ("pan/bi: Use autogenerated modifiers")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9719 >
2021-03-19 19:22:29 +00:00
Lepton Wu
c54fb6ef3d
virgl: Don't destroy resource while it's in use.
...
This is the race condition: thread 1 check reference count of resource
and then find out out it's zero and then it begin to destroy it. Around
the same time, thread 2 gets the lock and get the resource from the hash
table and plan to use it. Then this resource gets destroyed while it's
still in use.
Signed-off-by: Lepton Wu <lepton@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9701 >
2021-03-19 18:58:01 +00:00
Michel Zou
bf549e4c88
lavapipe: Fix type narrowing
...
On win32 long size is 4 and narrows down pointer size on i686
Fixes: a986d1ed (lavapipe: add support for KHR_buffer_device_address.)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9706 >
2021-03-19 18:15:50 +00:00
Rhys Perry
854b33de2f
radv: lower variables to ssa before nir_propagate_invariant
...
Variables make the propagation more conservative than it needs to be.
fossil-db (GFX10.3, based on !8056 ):
Totals from 22102 (15.86% of 139391) affected shaders:
SGPRs: 1103833 -> 1104265 (+0.04%); split: -0.06%, +0.10%
VGPRs: 851316 -> 849396 (-0.23%); split: -0.58%, +0.35%
CodeSize: 34422452 -> 34206052 (-0.63%); split: -0.72%, +0.09%
MaxWaves: 291050 -> 291186 (+0.05%); split: +0.23%, -0.18%
Instrs: 6749188 -> 6662804 (-1.28%); split: -1.37%, +0.09%
Cycles: 63456312 -> 62995828 (-0.73%); split: -0.92%, +0.20%
fossil-db (GFX10.3):
Totals from 841 (0.60% of 139391) affected shaders:
VGPRs: 44444 -> 44500 (+0.13%)
CodeSize: 3985604 -> 3987188 (+0.04%); split: -0.11%, +0.15%
Instrs: 748847 -> 749174 (+0.04%); split: -0.13%, +0.18%
Cycles: 35801628 -> 35825676 (+0.07%); split: -0.23%, +0.30%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8493 >
2021-03-19 18:04:00 +00:00
Danylo Piliaiev
9efec45b0c
ir3: disallow .sat on SEL instructions
...
Saturation is unsupported on SEL instructions.
Fixes main menu rendering in Genshin Impact.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9666 >
2021-03-19 17:09:07 +00:00
Mike Blumenkrantz
6cff8ec5a6
ci/lavapipe: split out lavapipe ci into lavapipe dir
...
there's no need to run llvmpipe jobs if only lavapipe has changed
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9695 >
2021-03-19 16:21:26 +00:00
Marek Olšák
e5ea9a3baa
radeonsi: add a fast path for MSAA resolving with RGB -> BGR swizzling
...
When we encounter a situation when we need to swizzle, which the CB can't
resolve in one pass, swap the channel order on the next clear, so that we
don't have to swizzle.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615 >
2021-03-19 16:05:03 +00:00
Marek Olšák
88e0e4f70e
radeonsi: select the optimal micro tile mode at clear regardless of fast clear
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615 >
2021-03-19 16:05:03 +00:00
Marek Olšák
e3e66e1fab
util: add new helper util_format_rgb_to_bgr
...
We have BGR formats for all RGB formats where it matters except
USCALED/SSCALED. radeonsi will use it.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615 >
2021-03-19 16:05:02 +00:00
Marek Olšák
5a29a55aa3
util: fail assertion in util_format_linear if it can't translate SRGB format
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615 >
2021-03-19 16:05:02 +00:00
Marek Olšák
aff4c790ea
util: add most missing formats with reversed RGB channel order
...
This will be used for RGB->BGR enum translation.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615 >
2021-03-19 16:05:02 +00:00
Adam Jackson
9064d801a9
glx/drisw: Implement WaitX and WaitGL
...
My goodness.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9696 >
2021-03-19 15:43:49 +00:00
Mike Blumenkrantz
63bed3d55b
zink: correctly clamp samplerview surface types
...
this fixes a bunch of cube stuff, e.g., spec@oes_texture_view@sampling-2d-array-as-cubemap-array
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685 >
2021-03-19 15:31:45 +00:00
Mike Blumenkrantz
3ab99ad14b
zink: improve surface viewtype clamping
...
a cube array can still work with a nonzero first layer
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685 >
2021-03-19 15:31:45 +00:00
Mike Blumenkrantz
813a7e64bd
zink: break out surface viewtype clamping into util function
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685 >
2021-03-19 15:31:45 +00:00
Adam Jackson
70d87dd41d
glx: Remove windows' stub {bind,release}_text_image context hooks
...
All this could have done is make GLX_EXT_texture_from_pixmap appear to
be supported when it won't work.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690 >
2021-03-19 11:13:07 -04:00
Adam Jackson
621b3a4041
glx: Pull get_proc_address out of the context vtable
...
One, only applegl needs this. Two, this isn't a function of the context
in any way so it doesn't belong in the context vtable. Just special-case
applegl for now, we can revisit applegl's dispatch later.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690 >
2021-03-19 11:13:07 -04:00
Adam Jackson
cba1d6de22
glx: Pull use_x_font out of the context vtable
...
The client-side implementation of this operates entirely in terms of the
GL and X client APIs. There's nothing DRI-specific about it, evidenced
by apple and windows using it unchanged. Save a little code size by
handling the direct/indirect difference directly.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690 >
2021-03-19 11:13:07 -04:00
Simon Ser
a6cd30333c
egl/wayland: avoid unnecessary roundtrip when authenticated
...
When the compositor advertises a render node, we don't need to
perform DRM authentication. Skip the unnecessary roundtrip in this
case.
Signed-off-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9704 >
2021-03-19 14:45:33 +00:00
Erik Faye-Lund
b416ae2023
docs: simplify format requirements
...
When I initially started writing these lists, I expected the lists to be
much less uniform in what bits were required. Turns out I was wrong, and
this ended up really neat and orderly.
I'm sure we're missing some defacto requirements here and there,
especially for the early versions. This list is based on what we check
for in version.c, and it's better than nothing.
Suggested by Mike Blumenkrantz.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Erik Faye-Lund
5deac5c156
docs: document zink GL 4.6 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Erik Faye-Lund
62a27bb091
docs: document zink GL 4.5 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Erik Faye-Lund
529d5f38c3
docs: document zink GL 4.4 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Erik Faye-Lund
29f8f21bff
docs: document zink GL 4.3 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Erik Faye-Lund
73ebfcccca
docs: remove excessive quoting
...
Triple backticks doesn't mean anything in RST, so this becomes quoted
strings containing backticks. That's not what I meant here...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Erik Faye-Lund
5d0509e367
docs: remove excessive wrapping
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Erik Faye-Lund
025d707903
docs: remove stray newline
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602 >
2021-03-19 14:07:42 +00:00
Rhys Perry
e2cdbb25c7
aco: add ACO_DEBUG=liveinfo
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599 >
2021-03-19 11:27:05 +00:00
Rhys Perry
8e409abf96
docs: document ACO_DEBUG=perfinfo
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599 >
2021-03-19 11:27:05 +00:00
Rhys Perry
22af492b01
aco: add aco_print_program() flags to print live_out and register demand
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599 >
2021-03-19 11:27:05 +00:00
Rhys Perry
8748b1c24f
aco: add aco_print_program() flag to print kill flags
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599 >
2021-03-19 11:27:05 +00:00
Rhys Perry
27e2f82f17
aco: implement image_deref_samples
...
It used to be that this intrinsic was never created and texture
instructions were always used.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: 50881d59e6 ("compiler/spirv: fix image sample queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9686 >
2021-03-19 10:31:46 +00:00
Jordan Justen
16d453da7f
genxml/gen12: 3D_MODE bits 31:16 are no longer must-be-one
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9505 >
2021-03-19 09:07:37 +00:00
Jordan Justen
b9a7f9314b
i965/gen11: Fix must-be-ones bit positions in 3D_MODE
...
Fixes: f0d29238df ("i965/gen11: Emit SLICE_HASH_TABLE when pipes are unbalanced.")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9505 >
2021-03-19 09:07:37 +00:00
Michel Dänzer
5057f14cba
Revert "glsl/test: Don't run whitespace tests in parallel"
...
This reverts commit c60cea0daa .
Didn't have the intended effect, and slowed down the meson test run.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:38 +00:00
Michel Dänzer
d8911a0ae8
Revert "meson: add enable-glcpp-tests option"
...
This reverts commit f9ae947e72 .
Not needed anymore.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:38 +00:00
Michel Dänzer
fc0d1aab50
Revert "ci: disable glcpp tests for now"
...
This reverts commit e25a3e21f8 .
The test timeouts should be fixed now.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:38 +00:00
Michel Dänzer
7fedf51b95
glsl/tests: Use exit code 126 to detect valgrind errors
...
valgrind returns exit code 126 if it can't write to the file passed to
--log-file. Hopefully it'll be the same for any other invalid valgrind
command line parameters or internal errors as well.
Using a different exit code (31) for this was hiding the fact that the
valgrind test wasn't actually working.
v2:
* Use exit code 126; can't treat any non-0 exit code as failure because
glcpp is expected to exit with non-0 for some of the input we feed it
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com > # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:38 +00:00
Michel Dänzer
4cc8c25d56
glsl/tests: Don't use tempfiles
...
Use pipes for direct communication between child & parent process.
Using tempfiles sometimes resulted in hitting the meson timeout if there
was high filesystem pressure (I saw a single unlink system call take as
long as 4 seconds; attempts to re-use a single tempfile just shifted the
delays to truncate/close systems calls).
As a bonus, this gets the valgrind test actually working as intended.
It wasn't working because the tempfile passed to --log-file didn't exist
(due to the earlier os.close(fd)?).
v2:
* Wrap .read() in "with open()" (Dylan Baker)
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:37 +00:00
Michel Dänzer
deb654cdd0
glsl/tests: Bump glcpp valgrind test timeout to 240 seconds
...
Once it's actually working as intended again, it may need that much
time.
v2:
* Bump to 240 seconds, still hit timeouts with 180.
* Don't change test priority.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com > # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:37 +00:00
Michel Dänzer
26e139c776
ci: Disable valgrind in some build jobs
...
Once the glcpp valgrind test works as intended again, it would delay
the dependent test jobs by ~1-4 minutes.
The meson-clover job would run the glcpp valgrind test multiple times
and take more than 10 minutes to finish.
valgrind can't work in the meson-android job, would need an ARM backend.
v2:
* Disable in meson-clover as well.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com > # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:37 +00:00
Michel Dänzer
37855fd59d
glcpp: Fully initialize struct gl_context
...
valgrind flagged members of gl_ctx->Extensions being used uninitialized:
==23417== Conditional jump or move depends on uninitialised value(s)
==23417== at 0x112642: _glcpp_parser_handle_version_declaration.part.0 (glcpp-parse.y:2493)
==23417== by 0x11A515: glcpp_lex_update_state_per_token (glcpp-lex.l:132)
==23417== by 0x11A515: glcpp_lex (glcpp-lex.l:547)
==23417== by 0x114D46: glcpp_parser_lex (glcpp-parse.y:2302)
==23417== by 0x114D46: glcpp_parser_parse (glcpp-parse.c:1871)
==23417== by 0x11ADC6: glcpp_preprocess (pp.c:238)
==23417== by 0x111384: main (glcpp.c:174)
==23417== Uninitialised value was created by a stack allocation
==23417== at 0x111295: main (glcpp.c:136)
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:37 +00:00
Michel Dänzer
1eb3a2d8da
Revert "ci: Restrict meson-gallium job to gstreamer runners"
...
This reverts commit 4b4bddcd99 .
Not needed anymore with the previous fix.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:37 +00:00
Michel Dänzer
05bf12ccb6
intel/tools: Use subprocess.Popen to read output directly from a pipe
...
Instead of using tempfiles to communicate between child & parent
process. The latter sometimes resulted in hitting the meson timeout if
there was high filesystem pressure.
Fixes: ccaa5b034f "intel/tools: rewrite run-test.sh in python"
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528 >
2021-03-19 08:50:37 +00:00
Mike Blumenkrantz
f0c8c6581c
llvmpipe/setup: force fs constant updating upon beginning queries
...
this flushes any pending updates and avoids trying to access constant buffers
which have been unset (and are also potentially deleted)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692 >
2021-03-18 23:15:53 -04:00
Mike Blumenkrantz
6d995d3fe2
lavapipe: force state updates when beginning queries
...
the full state update is maybe not entirely necessary since this is just
to address descriptor use, but probably it won't hurt
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692 >
2021-03-18 23:15:53 -04:00
Mike Blumenkrantz
007bf1d1dc
lavapipe: rewrite cmdbufs to always do descriptor binds/pushes first
...
llvmpipe has some crazy dependency ordering with constant buffers that
I don't want to mess with, so instead this ensures that descriptors are
always updated as early in the command stream as possible, avoiding any
use-after-free scenarios which might result from lavapipe freeing memory
in a still-bound descriptor that's pending an update
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692 >
2021-03-18 23:15:53 -04:00
Timothy Arceri
4feb26f647
glsl: add compilation errors for attribute and varying qualifiers
...
These qualifiers were removed in GLSL 4.20 and GLSL ES 3.00. For
desktop GL they are now only allowed if the shader is declared as
a compatibility shader.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9552 >
2021-03-19 01:13:17 +00:00
Mike Blumenkrantz
1ab309377e
lavapipe: support VK_KHR_copy_commands2
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9693 >
2021-03-18 17:14:58 -04:00
Mike Blumenkrantz
f7597e7d4f
zink: flatten 2d_array surfaces when necessary
...
same as cube types, if this is a single layer then it's not an array
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9684 >
2021-03-18 16:29:09 -04:00
Icecream95
ae62fb3737
panfrost: Disable early-z when alpha test is used
...
Fixes rendering artefacts in Minetest on Midgard.
Fixes: 275277a2b4 ("panfrost: Implement alpha testing natively")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9676 >
2021-03-18 20:22:55 +00:00
Lionel Landwerlin
9d947127d3
anv: use the device size of CS prefetch to pad secondary buffer calls
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9679 >
2021-03-18 20:08:45 +00:00
Lionel Landwerlin
33bc2977e5
intel/mi_builder: use device info to use the right CS prefetch size
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9679 >
2021-03-18 20:08:45 +00:00
Lionel Landwerlin
beb680aae4
intel/dev: store size of CS prefetch
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9679 >
2021-03-18 20:08:45 +00:00
Dave Airlie
833847603b
lavapipe: fix templated descriptor updates
...
The template path was buggy but CTS only tested it with Vulkan 1.1 enabled.
It was just missing the dstArrayElement offset.
Fixes: 41f7fa273d ("lavapipe: add support for VK_KHR_descriptor_update_template")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675 >
2021-03-18 19:57:34 +00:00
Dave Airlie
a04921d687
lavapipe: drop unused vk_format in image struct
...
This wasn't used at all.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675 >
2021-03-18 19:57:34 +00:00
Dave Airlie
a9b79c8c09
lavapipe: add missing device group api
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675 >
2021-03-18 19:57:34 +00:00
Dave Airlie
6cb676d169
lavapipe: add missing sampler minmax properties
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675 >
2021-03-18 19:57:34 +00:00
Dave Airlie
42b325f398
lavapipe: fix image format properties
...
Fix the sample counts for compressed + non-renderable + cube compatible
Fix the mip levels max calcs
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675 >
2021-03-18 19:57:34 +00:00
Eric Anholt
5da520cf3d
freedreno/ir3: Demote centroid usage to pixel on non-msaa.
...
Like with the sample qualifier on all GPUs, use pixel on older HW when
MSAA rasterization is disabled to get reliable results. Since I ran many
CI jobs on this, this updates the A530 TF flakes list, though I don't
think that this MR necessarily made it flakier (we were already struggling
on a5xx TF, which was what was motivating me to look at this!)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9641 >
2021-03-18 10:46:09 -07:00
Timur Kristóf
f5717f9f54
ac/llvm: Fix alignment of shared load intrinsics.
...
After some research, I found out that the alignment needs to be set
on the return value of the load, rather than on the pointer.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Tested-by: Michel Dänzer <mdaenzer@redhat.com >
Fixes: 14ad82b4e9 "ac/llvm: Emit more efficient code for load_shared."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9688 >
2021-03-18 17:28:42 +00:00
Daniel Schürmann
3413c48375
aco/ra: allow VCC on SMEM sbase operand on GFX10+
...
Totals from 26 (0.02% of 146267) affected shaders (Navi10):
CodeSize: 324764 -> 324560 (-0.06%)
Instrs: 61090 -> 61039 (-0.08%)
Cycles: 2681952 -> 2668872 (-0.49%)
VMEM: 5773 -> 5769 (-0.07%)
SMEM: 1621 -> 1611 (-0.62%)
SClause: 2546 -> 2543 (-0.12%)
Copies: 4671 -> 4620 (-1.09%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531 >
2021-03-18 17:15:00 +00:00
Daniel Schürmann
fc3606f29c
aco/optimizer: set VCC hint on new v_cmp_* definitions
...
Totals from 11692 (7.99% of 146267) affected shaders (Navi10):
CodeSize: 97419384 -> 97352560 (-0.07%); split: -0.07%, +0.00%
Instrs: 18571138 -> 18570969 (-0.00%); split: -0.00%, +0.00%
Cycles: 1431348400 -> 1431346296 (-0.00%); split: -0.00%, +0.00%
SMEM: 696646 -> 696650 (+0.00%)
SClause: 668511 -> 668490 (-0.00%); split: -0.00%, +0.00%
Copies: 1279475 -> 1279474 (-0.00%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531 >
2021-03-18 17:15:00 +00:00
Juan A. Suarez Romero
8ab6d2b4c4
ci/broadcom: use new piglit runner
...
Switch from the old piglit to the new piglit-runner executor.
Acked-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9680 >
2021-03-18 16:31:45 +00:00
Vasily Khoruzhick
e3f703e464
lima: update dEQP fails and skips lists
...
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9586 >
2021-03-18 16:11:39 +00:00
Eric Anholt
fc6a815401
freedreno/a5xx: Fix stream-output binning handling.
...
This makes it match (to the best I was able) a6xx's behavior, with the
exception of the XXX note in fd5_gmem.c highlighting what I think is an
issue on both a5xx and a6xx.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9295 >
2021-03-18 08:47:48 -07:00
Jesse Natalie
69c2a472c2
u_format: Add restrict to fn pointer and manual format pack/unpack/fetch
...
MSVC warns (loudly) about a mismatch between the generated functions in
u_format_table.c and the definition of util_format_[un]pack_description,
specifically having 'restrict' in the function but not in the pointer
type in the struct.
So, add 'restrict' everywhere - to the function types, and to the rest
of the implementations that are assigned to those structs.
v2: util_format_unpack_description is used in gallium/auxiliary/translate
Fixes: 5785fdac ("u_format: Mark the generated pack/unpack src/dst args as restrict.")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9670 >
2021-03-18 14:53:52 +00:00
Mike Blumenkrantz
3419b16b6d
zink: handle nir_intrinsic_image_deref_samples
...
same as the texop but for images
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682 >
2021-03-18 14:16:35 +00:00
Mike Blumenkrantz
50881d59e6
compiler/spirv: fix image sample queries
...
this was only implemented for textures (I assume because drivers which implement
the corresponding intrinsic don't support multisampled images), but it's also
used for shader images
Fixes: 22fdb2f855 ("nir/spirv: Update to the latest revision")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682 >
2021-03-18 14:16:35 +00:00
Mike Blumenkrantz
861c6a86dc
zink: enable spirv extension for post depth coverage
...
Fixes: 3c72c86742 ("zink: Wire up ARB_post_depth_coverage")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9683 >
2021-03-18 10:01:13 -04:00
Timur Kristóf
89c8e22cc6
aco: Fix constant address offset calculation for ds_read2 instructions.
...
Cc: mesa-stable
Signed-off-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/9678 >
2021-03-18 10:43:41 +00:00
Erik Faye-Lund
0b090d8e67
gallium/st: reserve space in default uniform block for lowered constants
...
If we don't reserve these, we risk these lowering passes eating up more
uniforms than we have available.
This fixes a crash due to an assert in Zink, because we end up trying to
use a too large UBO after lowering.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631 >
2021-03-18 11:17:05 +01:00
Erik Faye-Lund
78de2de8f3
gallium/st: fix shader_has_one_variant
...
I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.
Fixes: 7eb5fd98fd ("mesa/st: handle running nir lower passes for ucp and psiz in tess stage")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631 >
2021-03-18 11:16:06 +01:00
Erik Faye-Lund
bdfe0e3ef4
gallium/st: fix shader_has_one_variant
...
I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.
Fixes: ad0037fcfe ("mesa/st: set lower_point_size for tes/gs during program update")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631 >
2021-03-18 11:16:06 +01:00
Neha Bhende
cc314361e3
nir_to_tgsi: Fix indices for CMP in nir_to_tgsi for nir_op_fcsel
...
nir_to_tgsi utiliy was using wrong src for nir_op_fcsel.
Fixes regression with solidworks2012_viewport.trace and mudbox-2010sp1-basic-head.trace
v2: as per suggested by Brian, instead of relying assumption that
value will be 0.0 or 1.0 all the time, use -abs(src) to make any non-zero
value as negative.
Reviewed-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9658 >
2021-03-18 04:20:16 +00:00
Eric Anholt
4258ab45b7
nir_to_tgsi: Respect PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED.
...
If the driver can't do it, we shouldn't be putting it in the TGSI,
regardless of what the NIR compiler above us decided.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9662 >
2021-03-18 03:35:14 +00:00
Mike Blumenkrantz
5d031d8f31
zink: clear framebuffer state on context destroy
...
ensure we don't leak surface references
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz
321a569656
zink: move fence reset to zink_fence_init()
...
fence stuff goes in fence file
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz
bb90c8b926
zink: remove query batch-tracking init from begin_query()
...
this is always created on startup now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz
cb70132778
zink: use macro to streamline batch struct member init
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz
89dce254d8
zink: move other batch-tracking implementations to unified codepath
...
prep for monotonic batch ids
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz
57021b1d4a
zink: also move batch destructor into zink_batch.c
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
56452230ab
zink: move batch init into zink_batch.c
...
this consolidates more batch code into the batch file
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
fc27594943
zink: move active query pruning to batch reset
...
this didn't ever really need to be on the fence in the first place
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
6aa791f626
zink: split out batch resource-set clearing into separate function
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
ecb50b37a9
zink: return enum zink_queue from zink_batch_reference_resource_rw()
...
this is a little cleaner
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
870e0e73d7
zink: abstract zink_get_resource_usage() and move it to be internal
...
I'll be rewriting how resource tracking works, so abstracting it and removing
direct uses is going to reduce the chances of breaking things as well as code churn
plus it's a bit easier to use
downside is that until that rewrite happens, this will be a (very small) perf hit and
there's some kinda gross macros involved to consolidate code
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
62b10ad1b8
zink: convert ZINK_RESOURCE_ACCESS defines to enum
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
c5390b2ef7
zink: refactor resource_sync_writes_from_batch_usage() to manage batch id internally
...
this is always used the same way, so we can simplify the code a bit for future use
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
304ee56cab
zink: add enum for different queues
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
49efef9d55
zink: add a pipe_context::fence_server_sync hook
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626 >
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz
6d005ba3fc
zink: more consolidation for null sampler/image view hashing
...
by using the new helper functions, this is even more consistent
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9625 >
2021-03-18 02:51:21 +00:00
Mike Blumenkrantz
c22e56f454
zink: ci updates
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9673 >
2021-03-18 02:40:56 +00:00
Mike Blumenkrantz
e02d1eb950
zink: always use requested format for sampler view creation
...
this should be fine and good
Fixes: c768c5297a ("zink: force stencil format for stencil-only samplers and swizzle the right component")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9673 >
2021-03-18 02:40:56 +00:00
Neha Bhende
c6c532faa8
gallium/u_vbuf: use updated pipe_draw_start_count while using draw_vbo
...
new_draw has updated draw count. Stale info in draw caused regression
with piglit gl-3.0-multidrawarrays-vertexid -indirect
fixes piglit test ./gl-3.0-multidrawarrays-vertexid -indirect
Fixes: 1cd455b17b ("gallium: extend draw_vbo to support multi draws")
Reviewed-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9656 >
2021-03-18 02:09:45 +00:00
Mauro Rossi
1b9d8d7fdf
android: util: create some standalone compression helpers
...
Fixes the following building errors:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.android-x86_intermediates/LINKED/vulkan.radv.so
...
ld.lld: error: undefined symbol: util_compress_inflate
>>> referenced by disk_cache_os.c:459 (external/mesa/src/util/disk_cache_os.c:459)
...
ld.lld: error: undefined symbol: util_compress_max_compressed_len
>>> referenced by disk_cache_os.c:614 (external/mesa/src/util/disk_cache_os.c:614)
...
ld.lld: error: undefined symbol: util_compress_deflate
>>> referenced by disk_cache_os.c:622 (external/mesa/src/util/disk_cache_os.c:622)
Fixes: d7ecbd5bf8 ("util: create some standalone compression helpers")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9613 >
2021-03-18 01:31:31 +00:00
Neha Bhende
edbbf4537b
mesa: set states in fast path for restoring light attributes
...
Since states were not updated in fast path for restoring light attributes,
seen darker images in solidworks2012_viewprt.trace
Fixes regression seen with solidworks2012_viewport.trace
Fixes: 7fa9d9d06c ("mesa: add a fast path for restoring light attributes")
Reviewed-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9657 >
2021-03-18 01:06:39 +00:00
Jordan Justen
df5607d2ef
anv: Use fallback paths if DRM_I915_QUERY_ENGINE_INFO fails
...
Anvil can handle if this call fails, but not if we assert. :)
Reported-by: Brian Paul <brianp@vmware.com >
Fixes: 5d84c764fd ("anv: Gather engine info from i915 if available")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9664 >
2021-03-18 00:54:29 +00:00
Jason Ekstrand
91192696e6
intel/fs: Add support for 16-bit A64 float and integer atomics
...
The messages for those 16-bit operations still use 32-bit sources and
destinations, so expand them accordingly when building the payload.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750 >
2021-03-18 00:13:40 +00:00
Jason Ekstrand
a572471edc
spirv: Add support for SPV_EXT_shader_atomic_float_min_max
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750 >
2021-03-18 00:13:40 +00:00
Jason Ekstrand
1ba9c262fd
nir: Add image atomic_fmin/fmax intrinsics
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750 >
2021-03-18 00:13:40 +00:00
Caio Marcelo de Oliveira Filho
302183d635
nir: Handle deref_atomic_fadd in a couple of passes
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750 >
2021-03-18 00:13:40 +00:00
Caio Marcelo de Oliveira Filho
ba8ef1df9b
spirv: Update headers and metadata from latest Khronos commit
...
This corresponds to bcf55210f13a4fa3c3d0963b509ff1070e434c79
("Merge pull request #178 from orbea/datadir") in
https://github.com/KhronosGroup/SPIRV-Headers .
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8750 >
2021-03-18 00:13:40 +00:00
Dave Airlie
23100f3b65
lavapipe: bump maxMemoryAllocationCount
...
not sure why this was so low
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9644 >
2021-03-18 00:01:08 +00:00
Marek Olšák
0bbae3139e
st/mesa: add a driconf option to transcode ETC2 to DXTC
...
for performance analysis
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9357 >
2021-03-17 23:33:09 +00:00
Lionel Landwerlin
8b6d22109f
intel/fs/vec4: add missing dependency in write-on-write fixed GRFs
...
If we load constant data using pull constant SENDS, and we later load
that register with some other data, we can end up in a situation where
we don't track the initial fixed register write and therefore end up
using uninitialized registers.
This tracks write-on-write of fixed GRFs like we do for normal virtual
GRFs.
v2: Fix post_alloc_reg case (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9667 >
2021-03-17 23:25:02 +00:00
Adam Jackson
3c72c86742
zink: Wire up ARB_post_depth_coverage
...
Just a matter of passing the bits through in the right place.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9637 >
2021-03-17 23:15:12 +00:00
Marek Olšák
c49d88f6b2
mesa: fix parameter reservation size
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360 >
2021-03-17 22:43:01 +00:00
Marek Olšák
94f41b8a09
mesa: clear reserved parameter storage because it's stored in the shader cache
...
The elements might not be initialized and we don't want random bytes
in the shader cache.
Discovered by valgrind.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360 >
2021-03-17 22:43:01 +00:00
Marek Olšák
bcc61a01d4
mesa: don't overallocate ParameterValues 4 times (v2)
...
The additional memory was never used.
v2: rework
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360 >
2021-03-17 22:43:01 +00:00
Marek Olšák
e91dec36bc
mesa: fix a oldNum typo in reallocation in _mesa_reserve_parameter_storage
...
oldNum was incorrect. oldValNum is the correct number of elements
to copy inside realloc. (oldNum is for Parameters, not ParameterValues)
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360 >
2021-03-17 22:43:01 +00:00
Marek Olšák
aa748ef7e5
mesa: add assertions for buffer reference counts
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360 >
2021-03-17 22:43:01 +00:00
Marek Olšák
ae0ce3e3ba
mesa: fix Blender crash due to optimizations in buffer reference counting
...
The problem was that I assumed that deleted zombie buffers can't have any
references in the context, so buffers were released sooner than they should
have been.
The fix is to count the non-atomic references in the new field
gl_buffer_object::CtxRefCount. When we detach the context from the buffer,
we can just add CtxRefCount to RefCount to re-enable atomic reference
counting. This also allows removing code that was doing a similar thing.
Fixes: e014e3b6be "mesa: don't count buffer references for the context that created them"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4259
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9360 >
2021-03-17 22:43:01 +00:00
Marek Olšák
a94bd9033d
radeonsi: use pipe_sampler_state::border_color_is_integer to simplify stuff
...
We don't need the separate integer sampler state if we know the border
color type.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9577 >
2021-03-17 22:36:42 +00:00
Michel Dänzer
1f8e4ec7d1
ci: Don't run meson tests in strace for meson-mingw32-x86_64 job
...
There have been repeated timeouts:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3437#note_842273
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9648 >
2021-03-17 21:11:09 +00:00
Axel Davy
ff6f11acdc
radeonsi: fix leak when the in-memory cache is full
...
When the hw_binary is not put in the in-memory
cache it must be freed.
Fixes: 8283ed65cf ("radeonsi: Limit the size of the in-memory shader cache")
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9587 >
2021-03-17 21:05:06 +00:00
Simon Ser
0c4ac28957
gbm: remove fprintf calls in gbm_dri_bo_create
...
These errors can be handled by the caller. The caller can't guess
whether the GBM implementation supports modifiers, for instance.
Signed-off-by: Simon Ser <contact@emersion.fr >
References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7601#note_778845
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8715 >
2021-03-17 20:47:52 +00:00
Simon Ser
00dad26ce2
gbm: fail early when modifier list only contains INVALID
...
The current check only accomodates for a list with a single INVALID
item. However the driver won't be able to pick any modifier if the
list only contains INVALID. This includes the following cases:
- The modifier list is empty (count == 0)
- The modifier list contains more than a single item, but all items
are INVALID
In these cases, also fail early.
Signed-off-by: Simon Ser <contact@emersion.fr >
References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7601#note_778845
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8715 >
2021-03-17 20:47:52 +00:00
Mike Blumenkrantz
d85d780202
zink: switch to deqp-runner for piglit jobs
...
There's a few changes in the expected results. First of all, there's a
few failures that are now interpreted as crashes. These test are:
- glx@glx-visuals-depth
- glx@glx-visuals-depth -pixmap
- glx@glx-visuals-stencil
- glx@glx-visuals-stencil -pixmap
Secondly, and more surprisingly, there's three tests that were
previously passing, but are now failing. These are all EGL-related, so
it's likely that there's some EGL interaction that is different with the
new runner. These tests are:
- spec@egl 1.4@eglterminate then unbind context
- spec@egl_khr_surfaceless_context@viewport
- spec@egl_mesa_configless_context@basic
commit log and skiplist by Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9630 >
2021-03-17 20:15:02 +00:00
Eric Anholt
a917cafdd7
ci/freedreno: Mark the rest of the glx_arb_sync_control@timing as flakes.
...
IIRC I've seen -msc-delta 2 flake set, so just complete the set.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9660 >
2021-03-17 18:10:44 +00:00
Eric Anholt
2b8a73f949
ci/freedreno: Mark an a630 piglit flake from async shader compiling.
...
It seems that right around when we enabled piglit, some timing also
changed so this one started flaking.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9660 >
2021-03-17 18:10:44 +00:00
Jason Ekstrand
4079279051
anv/apply_pipeline_layout: Add support for A64 descriptor access
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
b704d03efd
anv: Do UBO loads with global addresses for bindless
...
This makes UBO loads in the variable pointers or bindless case work just
like SSBO loads in the sense that they use A64 messages and 64-bit
global addresses. The primary difference is that we have an
optimization in anv_nir_lower_ubo_loads which uses a (possibly
predicated) block load message when the offset is constant so we get
roughly the same performance as we would from plumbing load_ubo all the
way to the back-end.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
61749b5a15
anv: Add a pass for lowering A64 UBO access
...
Instead of load_global_constant_offset/bounded, we want to use the
Intel-specific block load intrinsic whenever we can. This way we get
the same wide block loads that we usually use for constant offset UBO
pulls with a binding table.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
c8748771bb
nir/lower_io: Support global addresses for UBOs in nir_lower_explicit_io
...
For nir_address_format_64bit_global_32bit_offset and
nir_address_format_64bit_bounded_global, we use a new intrinsics which
take the base address and offset as separate parameters. For bounds-
checked access, the bound is also included in the intrinsic. This gives
the drive more control over the bounds checking so that UBOs don't
suddenly become massively more expensive.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
bd65e4d199
anv/apply_pipeline_layout: Use the new helpers for images
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
4113a3750c
anv/apply_pipeline_layout: Use the new helpers for early lowering
...
This also means that some of the newly added helpers need to grow a bit
to support VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_DATA_EXT.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
93126b641c
anv/apply_pipeline_layout: Rework the desc_addr_format helper
...
We're about to add a new helper which is more detailed.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
f95134a0fe
anv/apply_pipeline_layout: Refactor all our descriptor address builders
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
42de744155
anv/apply_pipeline_layout: Apply dynamic offsets in load_ssbo_descriptor
...
This function has exactly two call sites. The first is where we had
these calculations before. The second only cares about the size of the
SSBO so all the extra code we emit will be dead. However, NIR should
easily clean that up and this lets us consolidate things a bit better.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
8a61e3a0c0
anv: Zero out the last dword of UBO/SSBO descriptors in the shader
...
This way, NIR can constant fold it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
422798caef
anv: Rework the 64bit_bounded_global resource index format
...
Instead of packing the descriptor offset into the packed portion, use
that unused channel we have lying around. This potentially allows for
larger descriptor sets. We also re-arrange the components a bit to make
it more like the 64bit_bounded_global memory address format.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
e06144a818
anv: Use 64bit_global_32bit_offset for SSBOs
...
This has the advantage of giving us cheaper address calculations because
we can calculate in 32 bits first and then do a single 64x32 add. It
also lets us delete a bunch of code for dealing with descriptor
dereferences (vulkan_resource_reindex, and friends) because our bindless
SSBO pointers are now vec4s regardless of whether or not we're doing
bounds checking. This also unifies UBOs and SSBOs. The one down-side
is that, in certain variable pointers cases, it may end up burning more
memory and/or increasing register pressure. This seems like a worth-
while trade-off.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
93a3f18719
nir: Add a new 64+32-bit address format
...
This is a global address format where you have a 64-bit base pointer and
a 32-bit offset. It's intentionally identical to 64bit_bounded_global
except nir_lower_explicit_io does no bounds checking with it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
e13246e053
anv/apply_pipeline_layout: Add some switch statements
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
f872a26991
anv/apply_pipeline_layout: Plumb through a UBO address format
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
2b8f76b128
anv/apply_pipeline_layout: Move bounds checking later for index/offset
...
Instead of doing the array check at the load_vulkan_resource_index
intrinsic, stuff it in the vec2 and handle it at load_vulkan_descriptor
time. This allows the bounds check to take any re-index intrinsics into
account. This only affects variablePointers + SSBOs + Gen7.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
2beba9dd5a
anv/apply_pipeline_layout: Run DCE between the early and late passes
...
This allows us to ignore UBOs in the late code going forward.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
a7fe687bde
anv/apply_pipeline_layout: Lower UBO loads in the early pass
...
We're about to enable bindless UBOs via A64 memory access like we do for
SSBOs. In order to prevent 100% of UBOs from hitting that path, we
enable them in the early lowering. This way we'll still get binding
table-based UBO access for any non-bindless ones. In particular, we
need this for UBO pushing to work.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:59 +00:00
Jason Ekstrand
799a931d12
anv/apply_pipeline_layout: Rework the early pass index/offset helpers
...
Rewrite them all to work on an index/offset vec2 instead of some only
returning the index. This means SSBO size handling is a tiny bit more
complicated but it will also mean we can use them for descriptor buffers
properly.
This also fixes a bug where we weren't bounds-checking re-index
intrinsics because we applied the bounds check at the tail of the
recursion and not at the beginning.
Fixes: 3cf78ec2bd "anv: Lower some SSBO operations in..."
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:58 +00:00
Jason Ekstrand
cdb88f67dc
anv/apply_pipeline_layout: Refactor descriptor chasing code
...
This makes things a bit more generic for use in the next commit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:58 +00:00
Jason Ekstrand
0aa3d68206
anv: Use nir_shader_instructions_pass in apply_pipeline_layout
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:58 +00:00
Jason Ekstrand
bfe92b83db
anv: Use load_global_constant for shader constants
...
NIR can do a bit better job optimizing this version.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:58 +00:00
Jason Ekstrand
1ce3660a5a
intel/fs,rt: Add a predicate to load_global_const_block
...
This allows us to do bounds checked A64 block load without the it being
counted as control-flow by NIR. This means that NIR optimizations like
CSE will be able to work on these the same as a regular load.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8635 >
2021-03-17 17:49:58 +00:00
Eric Anholt
2407952ec9
ci/bare-metal: Restart a run on intermittent kernel lockups.
...
Since enabling SMP on db820c and cranking up how many tests we run, we've
been seeing lockups like this a couple of times a week.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9655 >
2021-03-17 17:13:22 +00:00
Rob Clark
5d2c9fd161
freedreno/drm: Avoid unitialized timestamp in submit fail
...
Saw a flood of "waiting on invalid fence" with a completely bogus
looking fence # in a log of a rather strange low-memory crash. Not
sure if it is coming from memory corruption in userspace, but if a
submit ioctl is failing due to failed allocation (or other reason)
we would get left with random stack garbage as the fence #. Let's
not have that as a potential problem.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9638 >
2021-03-17 16:36:37 +00:00
Rhys Perry
5bc100eb2d
aco: use a single instruction for uadd32_sat() on GFX8
...
fossil-db (GFX8):
Totals from 8 (0.01% of 147787) affected shaders:
SGPRs: 352 -> 368 (+4.55%)
CodeSize: 49576 -> 48788 (-1.59%)
Instrs: 9487 -> 9318 (-1.78%)
Latency: 49935 -> 49607 (-0.66%)
InvThroughput: 138493 -> 137443 (-0.76%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9598 >
2021-03-17 15:33:34 +00:00
Rhys Perry
3decb52c82
aco: use uadd32_sat() helper for nir_op_uadd_sat
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9598 >
2021-03-17 15:33:31 +00:00
Rhys Perry
590de30093
aco: implement 64-bit VGPR {u,i}find_msb
...
This can be created by subgroupBallotFindMSB().
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4458
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9598 >
2021-03-17 15:33:22 +00:00
Marek Olšák
32eb74e1e1
ac/gpu_info: fix more non-coherent RB and GL2 combinations
...
It ignored non-harvested chips with a non-power-of-two memory bus.
Fixes: abed921ce7 - amd: add support for Navy Flounder
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9568 >
2021-03-17 14:40:54 +00:00
Erik Faye-Lund
d4bcb58caf
zink: fix free of ralloced pointer
...
When we alloc with ralloc, we also need to free with it.
But let's take a step back here; we don't just need to use ralloc, we
also need to destroy all other screen-resources. So let's call the
destructor here instead.
Fixes: 2643f9ed28 ("zink: ralloc screen objects")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9647 >
2021-03-17 13:08:10 +00:00
Erik Faye-Lund
539036a990
zink: fix emulation of no mipfilter
...
This approach is taken from the Vulkan spec[1], where a robust maxLod
of 0.25 is proposed instead of 0.0.
This has the effect of allowing room for both minification and
magnification filters, yet still rounding down to the right miplevel in
the end.
[1]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerCreateInfo.html#_description
Fixes: 8d46e35d16 ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9649 >
2021-03-17 12:58:12 +00:00
Timur Kristóf
ed7c6e46e7
aco: Delete superfluous tess and ESGS I/O code.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
08fb6904ec
radv/llvm: Delete superfluous tess and ESGS I/O code.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
16021e3bae
radv/llvm: Only store TCS outputs where they are really needed.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
540168fd15
radv: Use new, NIR-based I/O lowering.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
1958381c9a
radv: Reorder some NIR optimizations in preparation for the I/O changes.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
b3a16c0e19
radv: Fill some tess shader info earlier.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
52219ad3a0
radv: Determine tcs_in_out_eq in radv_pipeline instead of the compiler.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
e1ee17249a
radv: Calculate tess patches and LDS use outside the backend compilers.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
a736ea5dc6
radv: Save I/O usage data to both shader infos for merged stages.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
c564a452fc
radv: Lower IO and set driver locations earlier.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
3185cb7dbf
ac: Add NIR passes to lower ES->GS I/O to memory accesses.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
bf966d1c1d
ac: Add NIR passes to lower VS->TCS->TES I/O to memory accesses.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
14ad82b4e9
ac/llvm: Emit more efficient code for load_shared.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
d5a79dbcf8
ac/llvm: Add constant offset to load/store_shared.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
00c014aab2
ac/llvm: Make sure to always emit integer comparison for nir_op_ieq.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
252b5d5ecd
ac/llvm: Make shared loads/stores work correctly for non-CS stages.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
6e7b1cd251
ac/llvm: Implement new Geometry Shader intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
20a2801011
ac/llvm: Implement the new tessellation intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
60114f3865
ac/llvm: Implement AMD-specific buffer load/store intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
582229585b
aco: Implement new Geometry Shader intrinsics.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
5c95b32c6e
aco: Implement the new tessellation I/O related NIR intrinsics.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
e10e74a7af
aco: Implement new buffer load/store intrinsics.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
4c5c610f1d
nir: Add AMD-specific Geometry Shader related intrinsics.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
38df949f98
nir: Add tessellation related AMD-specific intrinsics.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
744dc74078
nir: Add nir_opt_offsets to fold const adds into load/store offsets.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
eee3435757
nir: Add AMD-specific buffer load/store intrinsics.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
c2a81ebe19
nir: Add default unsigned upper bound configuration.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
8ebb8d31af
nir: Add unsigned upper bound for TCS load_invocation_id.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
9fbfafb57a
nir: Shrink vectors for load_shared.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
084863bb5d
nir: Fix unsigned upper bound of local_invocation_index for non-CS stages.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
132171dc4e
nir: Add a few more algebraic optimizations to help address calculation.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
9f9b0f583b
nir: Add nir_builder helper for I/O address offset calculations.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
f6f68d5cf1
nir: Add new nir_builder helpers for iadd with no_unsigned_wrap.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Rhys Perry
5bc42ce579
nir: Don't update base in vectorize_loads()
...
The offset is already updated with consideration to the base above under
"/* update the offset */".
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Rhys Perry
c580c3f9c7
aco/tests: add test for waNsaCannotFollowWritelane
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187 >
2021-03-17 12:31:05 +00:00
Rhys Perry
502a073552
aco: fix NSA following writelane
...
No fossil-db changes on GFX10.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: c353895c92 ("aco: use non-sequential addressing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187 >
2021-03-17 12:31:05 +00:00
Rhys Perry
298d400e5c
aco/tests: add test for NSAToVMEMBug
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187 >
2021-03-17 12:31:05 +00:00
Rhys Perry
194f3e4c69
aco: fix NSA MIMG followed by MUBUF/MTBUF
...
No fossil-db changes on GFX10.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Fixes: c353895c92 ("aco: use non-sequential addressing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187 >
2021-03-17 12:31:05 +00:00
Danylo Piliaiev
b804abd61d
freedreno/isa: assert if field's range is out of bitset's range
...
Also, update outdated comment along the way.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9628 >
2021-03-17 12:07:54 +00:00
Danylo Piliaiev
42c81e1901
ir3: match mova1 mnemonic when writing to A1
...
For MOV to A1 blob uses "mova1" mnemonic, which is mov.u16u16;
change s16 to u16 when creating MOV to A1 in order to match the blob.
Before, couldn't be parsed back:
mov.s16s16 ha0.y, 0
After, could be parsed back and matches blob behaviour:
mova1 a1.x, 0
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9628 >
2021-03-17 12:07:54 +00:00
Danylo Piliaiev
c0a62b203e
ir3/isa,parser: fix encoding and parsing of bindless s2en SAM
...
Before, decoding showed that there is an error:
sam.base0 (f32)(xyzw)r0.x, r0.z, a1.x ; no field 'HAS_SAMP',
WARNING: unexpected bits[0:7] in #cat5-samp-s2en-bindless-a1: 0x1 vs 0x0
After:
sam.base0 (f32)(xyzw)r0.x, r0.z, s#1, a1.x
Fixes textures on the ground in TauCeti Vulkan Technology Benchmark
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9628 >
2021-03-17 12:07:54 +00:00
Juan A. Suarez Romero
727eadc76a
ci/vc4/v3d: run piglit testsuite against Xorg
...
This increases the coverage adding tests that require an X server to
run.
Update also the expected results, and skip some flake tests.
Reviewed-by: Andres Gomez <agomez@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562 >
2021-03-17 11:40:58 +00:00
Juan A. Suarez Romero
dc2e3d6ff2
ci/v3dv: add flaky test in the skip list
...
Reviewed-by: Andres Gomez <agomez@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562 >
2021-03-17 11:40:58 +00:00
Juan A. Suarez Romero
c19bc782cc
ci/armXX: add libgl1-mesa-dev dependency
...
Waffle building requires libgl1-mesa-dev to add support for GLX. This
package is pulled automatically in arm64 container as a suggested
package, but no in armhf. Which means we end up having support for GLX
in waffle in arm64 but not in armhf.
Thus let's install explicitly this package to have support in both
cases.
Reviewed-by: Andres Gomez <agomez@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562 >
2021-03-17 11:40:58 +00:00
Juan A. Suarez Romero
557c86d6ce
vc4: destroy renderonly object if present
...
When destroying the VC4 screen, check if renderonly exists before
freeing it.
This fixes for instance a segmentation fault caused when invoking
wflinfo.
Fixes: 187218395d ("renderonly: remove layering violations")
Reviewed-by: Andres Gomez <agomez@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562 >
2021-03-17 11:40:58 +00:00
Alejandro Piñeiro
ec4c79c2b0
v3dv: avoid some maybe-uninitialized warnings
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9640 >
2021-03-17 10:05:07 +00:00
Alejandro Piñeiro
c373b24369
v3dv/descriptor_set: don't free individual set if not allowed
...
If we have a host_memory_base pointer it means that we are handling
the pool memory as a whole, so each set is a sub-slice of the memory
pool. In this case we can't just free the individual set. In other
words, VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is not set.
Note tha at that point we were able to sub-allocate an set, and we are
failing to sub-allocate the pool bo for the descripto bo. So
technically we could try to return that set to the pool (so undo the
change on host_memory_ptr before), that I assume was my intention when
(wrongly) calling vk_free there. But in practice, at that point we are
already on a out of descriptor pool situation, so in the end it
doesn't even matter.
This fixes a double free crash with the UE4 VehicleGame demo.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9640 >
2021-03-17 10:05:07 +00:00
Iago Toral Quiroga
aefac60741
broadcom/compiler: use nir_lower_wrmasks to simplify TMU general stores
...
This pass splits writemaks with non-consecutive bits into multiple
store operations ensuring that each store only has consecutive
writemask bits set.
We can use this to simplify writemask handling in our backend removing
a loop solely intended to handle this case.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9619 >
2021-03-17 09:35:19 +00:00
Iago Toral Quiroga
51a263530f
broadcom/compiler: use nir_opt_load_store_vectorize
...
This will make it so we pack consecutive scalar operations into a vector
operation, reducing the amount of load/store operations in the NIR program.
Our backend can handle vector load/stores, and doing so may be more efficient
since we don't need to setup individual load/stores all the time.
A pathological case is:
dEQP-VK.spirv_assembly.instruction.compute.opcopymemory.array
which goes from 862 instructions to only 573 by converting
all scalar SSBO load/store operations to vec4 operations.
total instructions in shared programs: 13752607 -> 13733627 (-0.14%)
instructions in affected programs: 367117 -> 348137 (-5.17%)
helped: 1168
HURT: 371
Instructions are helped.
total threads in shared programs: 412230 -> 412272 (0.01%)
threads in affected programs: 54 -> 96 (77.78%)
helped: 23
HURT: 2
Threads are helped.
total uniforms in shared programs: 3790248 -> 3784601 (-0.15%)
uniforms in affected programs: 57417 -> 51770 (-9.84%)
helped: 1420
HURT: 19
Uniforms are helped.
total max-temps in shared programs: 2322170 -> 2322714 (0.02%)
max-temps in affected programs: 14353 -> 14897 (3.79%)
helped: 185
HURT: 306
Max-temps are HURT.
total spills in shared programs: 5940 -> 6010 (1.18%)
spills in affected programs: 65 -> 135 (107.69%)
helped: 0
HURT: 11
total fills in shared programs: 13372 -> 13494 (0.91%)
fills in affected programs: 75 -> 197 (162.67%)
helped: 0
HURT: 11
total sfu-stalls in shared programs: 31505 -> 31521 (0.05%)
sfu-stalls in affected programs: 751 -> 767 (2.13%)
helped: 210
HURT: 246
Inconclusive result (value mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13784112 -> 13765148 (-0.14%)
inst-and-stalls in affected programs: 360283 -> 341319 (-5.26%)
helped: 1125
HURT: 366
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9619 >
2021-03-17 09:35:19 +00:00
Iago Toral Quiroga
3db322f305
broadcom/compiler: fix end of tmu sequence detection
...
TMUWT always terminates a TMU sequence.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9619 >
2021-03-17 09:35:19 +00:00
Samuel Pitoiset
7bdd569d7e
radv: extend the dirty bits to 64-bit
...
For future work.
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/9603 >
2021-03-17 09:21:38 +00:00
Samuel Iglesias Gonsálvez
0acd7df67b
turnip: set depth plane control zmode to A6XX_LATE_Z when sample mask is written
...
Otherwise, gl_SampleMask[] writes are ignored and the stencil test works like
if all samples were enabled.
Fixes: dEQP-VK.renderpass.suballocation.multisample.*s8*
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9478 >
2021-03-17 09:05:33 +00:00
Samuel Pitoiset
9d42e71505
radv: add notccompatcmask debug option
...
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/9415 >
2021-03-17 08:55:16 +00:00
Samuel Pitoiset
f810d8cd50
radv: enable TC-compat CMASK on GFX10+
...
Untested on older chips. Should help MSAA games by 1-2%.
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/9415 >
2021-03-17 08:55:16 +00:00
Samuel Pitoiset
72b58c4a5e
radv: initialize TC-compat CMASK images with the DCC clear code
...
0xff is for fast-clears without MSAA.
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/9415 >
2021-03-17 08:55:16 +00:00
Samuel Pitoiset
a3835964ce
radv: only configure the CMASK tiling for TC-compat on GFX8
...
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
b9222cc906
radv: make sure FMASK is enabled for TC-compat CMASK
...
Otherwise it makes no sense at all.
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
0c281283d8
radv: remove redundant check when enabling TC-compat CMASK
...
We already check that the image has CMASK.
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
d173ed2e9c
radv: do not enable TC-compat CMASK if the image isn't readable by a shader
...
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
fb648634b0
radv: use common entrypoints for VK_KHR_copy_commands2
...
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/9600 >
2021-03-17 07:43:36 +00:00
Iago Toral Quiroga
f29de817eb
compiler/glsl: call util_cpu_detect from glsl_type_singleton_init_or_ref
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Closes : #4393
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9457 >
2021-03-17 08:15:36 +01:00
Iago Toral Quiroga
1e4abf1fe3
vulkan/util: call glsl_type_singleton_init_or_ref from vk_instance_init
...
v2: link libvulkan_util with libglsl so it can find the glsl singleton symbols.
v3: link with libcompiler instead of libglsl (Jason)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com > for the v3dv bits.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com > for the turnip bits.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com > for the radv bits.
Acked-by: Dave Airlie <airlied@redhat.com > for the lvp bits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9457 >
2021-03-17 08:15:36 +01:00
Lukas Feller
164a51c80f
v3dv: fix stride in buffer copy
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9402 >
2021-03-17 06:42:34 +00:00
Lukas Feller
99a11f25b2
v3dv: fix assertion in job_compute_frame_tiling
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9402 >
2021-03-17 06:42:34 +00:00
Timur Kristóf
d70e017c17
anv: Use ASSERTED for results that are only used in asserts.
...
This gets rid of unused variable warnings for these results.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9634 >
2021-03-17 03:47:23 +00:00
Timur Kristóf
d7a94cae18
anv: Use unreachable() in anv_genX.
...
This gets rid of unused variable warnings on genX_thing, because
now the compiler will think that the unknown hardware generation
case is unreachable.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9634 >
2021-03-17 03:47:23 +00:00
Timur Kristóf
17bc587f88
intel/compiler: Make room for maximum dest size in nir_emit_texture.
...
The maximum dest_size is 5, not 4.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9634 >
2021-03-17 03:47:23 +00:00
Timur Kristóf
eb378e4cd0
intel/compiler: Use assume() instead of assert() for array bounds.
...
This should make both GCC and clang happy and make them believe that
the array bounds are not exceeded.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9634 >
2021-03-17 03:47:23 +00:00
Daniel Stone
84f91dfea5
CI: Change LAVA job visibility
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9635 >
2021-03-17 01:50:37 +00:00
Mike Blumenkrantz
62d6ec083b
zink: enable PIPE_CAP_INVALIDATE_BUFFER
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546 >
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
d5367cee09
zink: invalidate resources on map when discarding range
...
we can dump the whole vulkan object here for this case, which ends up being
much neater
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546 >
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
cfa361e6cd
zink: handle streamout buffer rebinds
...
this really just means to nuke the counter buffer, and this can be done
by using a special bind_history bit that can be unset when the buffer has
been rebound
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546 >
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
a00f10207c
zink: set valid region for streamout buffers on bind
...
this catches rebinds and is more accurate about the state of the region
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546 >
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
8c1422dca5
zink: add a pipe_context::invalidate_resource hook
...
this creates new backing objects for the invalidated resource and, if
needed, rebinds it to any descriptor sets it might be used in by invalidating
the descriptor state and creating new view objects
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546 >
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
d84c7c2a85
zink: remove direct samplerview batch-tracking
...
this moves tracking onto the surface/bufferview, which is more accurate
and allows the removal of a temporary hack in resource invalidation
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546 >
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
2729513d29
zink: hook up resource bind history
...
seems like this should be a gallium thing with how many drivers copy/paste it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546 >
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
806c612131
ci/panfrost: disable the rest of these jobs temporarily
...
runners having a hard time right now
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9639 >
2021-03-17 01:34:49 +00:00
Mike Blumenkrantz
08d8aee222
zink: ci updates
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
2f3b09e422
zink: set ntv variable descriptor sets during compile phase
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
c1cdf30a11
zink: apply Delete All The Code methodology to the ubo/ssbo variables
...
gallium rewrites all the ubo/ssbo instructions to use the buffer index as
the instruction src. the nir variables which are passed to zink after that
point are completely worthless, and it's impossible to accurately determine
which one corresponds to which buffer
thus, deleting all the variables and creating new ones based on the buffers
that are used is the best option, and it also enables simplifying a ton
of code as well as doing even better improvements in the future
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
769c6dce23
zink: move zink_binding() to compiler.c
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
dbbcf4e780
zink: directly set nir variable bindings for reuse during ntv
...
this lets us prepopulate the binding values without "fetching" them
twice
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
84293f5395
zink: flatten binding numbers a bit
...
now that descriptor types are split, we can just use the type-max values
per stage as the increment instead of all type max values
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
eeb23b15eb
zink: break out sized uint array construction into util function
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
1950f8ec0c
zink: add ntv util function for checking if a glsl type is an atomic counter
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
90a1aaf956
zink: add debug info about missing atomic ops
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
5783298027
zink: add unsized array type to get_glsl_type_element() handling
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
6399906843
zink: also break out whole ntv bo struct pointer construction
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
99a87a283a
zink: break out bo array type construction into ntv util function
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
10bfe8759b
zink: use intermediate var for glsl non-array type during shader create
...
minor readability change
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
2b4609b66c
zink: run nir_convert_from_ssa last during compile
...
running this too early breaks other passes
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624 >
2021-03-17 01:27:00 +00:00
Hyunjun Ko
d9fcf5de55
turnip: Enable nonuniform descriptor indexing
...
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125 >
2021-03-17 01:09:30 +00:00
Hyunjun Ko
e9fd2a2a58
ir3: Add nonuniform encodings to ir3 encoder and parser
...
By keeping track of nonuniform access from nir and storing it to ir3.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125 >
2021-03-17 01:09:30 +00:00
Hyunjun Ko
433cdd1cff
ir3: fix has_src() to return correctly in ir3_nir_lower_tex_prefetch
...
This seems to be originally introduced from 2a0d45ae6c , and 562aaea07c
misused the method.
Fixes: 2a0d45ae6c "freedreno/ir3: Add a NIR pass to select tex instructions eligible for pre-fetch"
Fixes: 562aaea07c "freedreno/ir3: respect tex prefetch limits"
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125 >
2021-03-17 01:09:30 +00:00
Hyunjun Ko
d82b58c03e
nir: Set access at lower_ubo_vec4
...
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125 >
2021-03-17 01:09:30 +00:00
Hyunjun Ko
e0e55b181f
turnip: Return correct value of tu6_load_state_size
...
The state of active_desc_sets in pipeline should be set before
allocation of the pipeline so we get correct size of descriptor
sets and reserve enough space upfront.
Otherwise we might hit assert(pipeline->cs.bo_count == 1).
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125 >
2021-03-17 01:09:30 +00:00
Marek Olšák
fdbcb58c06
ac/llvm: handle demote in LLVM 13 that just added support for it
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9362 >
2021-03-17 00:42:27 +00:00
Timothy Arceri
08101aaaac
util/disk_cache: add cache item headers to single file cache entries
...
I mistakenly left these out of the original single file cache
implementation.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9443 >
2021-03-16 23:37:48 +00:00
Timothy Arceri
ba324bff1c
util/disk_cache: detangle cache item creation from disk writing
...
This refactors the cache code so that we create the full cache
item in memory before writing it to disk. The result is slightly
cleaner code and the ability to share this code between the single
and multi file cache implementations.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9443 >
2021-03-16 23:37:47 +00:00
Timothy Arceri
16b2b4342b
util/disk_cache: separate file reads from cache item validation
...
This will allow us to share validation between the single file cache
and the multifile cache.
It also reduces the number of malloc() calls.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9443 >
2021-03-16 23:37:47 +00:00
Timothy Arceri
9cf0aac130
util/compress: make compression function inputs const
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9443 >
2021-03-16 23:37:47 +00:00
Dave Airlie
a986d1ed63
lavapipe: add support for KHR_buffer_device_address.
...
Adds the missing magic lowering pass, and stores the pmem
pointer for easier returning to user.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9616 >
2021-03-16 23:05:10 +00:00
Dave Airlie
7b8d53afdd
lavapipe: only init immutable samplers for correct types.
...
This is ported from anv, and it needed to stop crashes with
the buffer_device_address CTS tests
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9616 >
2021-03-16 23:05:10 +00:00
Dave Airlie
c16f63b343
gallivm: convert packing to uint64 not double
...
Fixes some issues with later inttopotr casting.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9616 >
2021-03-16 23:05:10 +00:00
Danylo Piliaiev
e767208069
ir3: fix oob access to regs array for getbuf,getinfo,rgetinfo
...
Since they have zero source registers, src->regs[1] is out of bounds.
It probably wasn't able to cause any harm, but it's always better
be safe.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4209
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9609 >
2021-03-16 22:36:12 +00:00
Danylo Piliaiev
175925f84f
ci/freedreno: run freedreno jobs on any change in src/freedreno/
...
Without a way to exclude specific subdirectories, keeping the list
of all subdirectories which need to be tested is error prone.
It's better to run CI slightly more often than to miss it when
it is needed.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9609 >
2021-03-16 22:36:12 +00:00
Eric Anholt
f3a7a8a4dc
ci/freedreno: Switch the piglit testing to the new piglit runner.
...
Getting piglit to fit onto our test devices was proving difficult, and we
need the ability to handle flakes, so switch to the rust piglit runner
that @pepp wrote as part of the deqp-runner repo which gives us flake
detection, sharding across boards, fractional runs, and almost half the
runtime.
It doesn't handle piglit subtests yet, but if you can't run piglit's
python on your devices because it's too bloated and unstable, this is a
way forward.
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9468 >
2021-03-16 22:19:30 +00:00
Eric Anholt
0b4691d615
ci: Bump deqp-runner to v0.6.3.
...
This adds a piglit runner that we'll be using on freedreno, better
xfail/unexpectedpass handling for some cases (Missing->Pass, Warn->Warn),
better error logging for the Missing issue we've had in CI, a fix for a
source of Missing, and a pile more unit tests.
As a result, we now catch that the Missing results for a bunch of our
tests have gone away.
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9468 >
2021-03-16 22:19:30 +00:00
Timur Kristóf
8205cce007
aco: Use ASSERTED to avoid unused variable warning.
...
Signed-off-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/9632 >
2021-03-16 21:46:52 +00:00
Timur Kristóf
1d571c6bc1
pan/bi: Use correct enum type for NIR intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9632 >
2021-03-16 21:46:52 +00:00
Eric Anholt
0a1c533c6e
ci/panfrost: Disable t860/radeonsi testing while the runners are struggling.
...
These jobs keep getting stuck, so disable for now. Info on what is going
on is at
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3437#note_841920 (the
grunt and stoney runners are maybe still operational at the moment)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9636 >
2021-03-16 21:36:22 +00:00
Mike Blumenkrantz
4b063d636e
zink: unset last_vertex_stage_dirty after applying it
...
turns out that having extra flags for stuff isn't that useful if you never reset them
Fixes: 9b8c121917 ("zink: flag shaders as needing update when clip_halfz changes")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9633 >
2021-03-16 21:29:09 +00:00
Erik Faye-Lund
30cf07cc8a
lavapipe: fix primitive-restart for uint8 indices
...
I forgot to add an implicit primitive-restart index for uint8 while
adding support for this initially. But we also have a nice little
helper to simplify this, so let's use that instead of open-coding.
Fixes: 6526e6d11b ("lavapipe: implement VK_EXT_index_type_uint8")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9622 >
2021-03-16 21:17:16 +00:00
Mike Blumenkrantz
3aa2da96df
zink: add missing null check
...
mismerged from an earlier patch...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9623 >
2021-03-16 20:42:43 +00:00
Daniel Stone
5ff99387a1
CI: Trigger Windows builds for llvmpipe & Vulkan changes
...
As Windows now builds llvmpipe and lavapipe, we should be sure to run
their builds when these change.
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9518 >
2021-03-16 17:31:09 +00:00
Rob Clark
441fba45ed
freedreno: Fix fd_fence_finish()
...
fd_fence_create_unflushed() is called with the driver context, but
fd_fence_finish() is called with the threaded/frontend context, which
is what threaded_context_flush() expects to be passed.
Fixes: c4e5beef07 ("freedreno: threaded_context async flush support")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9627 >
2021-03-16 17:12:14 +00:00
Anuj Phogat
b505db3864
intel: Simplify few version checks involving G4X
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608 >
2021-03-16 16:40:12 +00:00
Anuj Phogat
e66e8a0109
intel: Remove GEN_IS_G4X macro
...
GEN_GEN and GEN_VERSIONx10 macros provide a consistent way to do platform
version checks. We can avoid platform specific macros.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608 >
2021-03-16 16:40:12 +00:00
Anuj Phogat
1d0295ea2c
intel: Simplify version checks involving haswell
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608 >
2021-03-16 16:40:12 +00:00
Anuj Phogat
97d6ceaf04
intel: Remove GEN_IS_HASWELL macro
...
Use GEN_VERSIONx10 == 75 check in place of GEN_IS_HASWELL macro.
GEN_GEN and GEN_VERSIONx10 macros provide a consistent way to do platform
version checks. We can avoid platform specific macros.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608 >
2021-03-16 16:40:12 +00:00
Eric Anholt
739486de2f
freedreno/a5xx: Fix the max texture buffer size.
...
The GLES minmax is 65536. The blob vulkan exposes 65536 on both a5xx and
a6xx, but try just doing the same as we do for a6xx.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9617 >
2021-03-16 16:15:48 +00:00
Eric Anholt
b93d21810a
freedreno/a5xx: Fix the texel buffer alignment requirement.
...
Info comes from the a540 vulkan blob driver minTexelBufferOffsetAlignment.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9617 >
2021-03-16 16:15:48 +00:00
Michel Dänzer
16fc6b87bb
ci: Run meson tests in strace if it's available and can be used
...
Keep the strace logs in job artifacts for tests which timed out.
This can be useful for figuring out why a timeout occurred.
strace cannot be used in jobs where ASAN is enabled, because ASAN's
leak checker also uses ptrace(), which isn't possible within strace.
Suggested-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472 >
2021-03-16 15:32:33 +00:00
Michel Dänzer
acd6117fe0
ci: Add strace to the x86_build docker image
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472 >
2021-03-16 15:32:33 +00:00
Michel Dänzer
d411691965
aco/tests: Use _exit in child process
...
Since the child process doesn't call exec(), exit() attempted to run
atexit handlers registered by the parent process. This could result in
the child process hanging in exit() if there were still disk cache
threads alive when the parent process called fork(). (The CI runners
hit this multiple times when running tests in strace)
Fixes: 6a246f5c6d "aco/tests: Fix deadlock for too large test lists"
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472 >
2021-03-16 15:32:33 +00:00
Michel Dänzer
81beef929d
ci: Move /usr/bin/time check from meson test wrapper to build script
...
In jobs where the wrapper isn't used, this leaves the
<build directory>/meson-logs/testlog.txt filename unchanged.
Also prepares for using different wrapper scripts in different jobs.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472 >
2021-03-16 15:32:33 +00:00
Michel Dänzer
e7ba882cd4
ci: Drop SIGINT handling from meson test wrapper script
...
Not needed, I had misread meson code.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472 >
2021-03-16 15:32:33 +00:00
Michel Dänzer
bc76f9a8f2
ci: Move meson-build.sh to meson/build.sh
...
A little less clutter in the top .gitlab-ci directory.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472 >
2021-03-16 15:32:33 +00:00
Jesse Natalie
3b687722b3
d3d12: Really handle null constant buffers
...
Previous attempt was checking the wrong pointer...
Fixes: eb27db86 ("d3d12: Handle null constant buffers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4362
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349 >
2021-03-16 15:22:35 +00:00
Jesse Natalie
8708d32d9c
d3d12: Handle is_new_style_shadow comparison filtering
...
Note: the tex instruction is modified in place, so the correct
number of expected result components needs to be cached before
the shadow state is modified
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349 >
2021-03-16 15:22:35 +00:00
Jesse Natalie
6db28f5201
d3d12: Move descriptor pools to screen, and add lock
...
Surfaces can be shared across contexts, and can even outlive the
original context that created them, so move the pools to the screen.
Since they no longer belong to a single context, they need a lock now.
v2: Samplers moved back to the context
v3: Fix Linux build
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3812
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349 >
2021-03-16 15:22:35 +00:00
Samuel Pitoiset
7c68a2518f
vulkan: add missing vk_shader_module.c/h includes to Makefile
...
Fixes: 76078ed9fe ("vk/util: add unified shader module struct/functions")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9620 >
2021-03-16 16:01:10 +01:00
Mike Blumenkrantz
23538ed7a8
zink: cache bufferviews
...
we can cache bufferviews just like we do surfaces, so let's do that
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
da2b841798
zink: properly handle null bufferview descriptor states
...
now that we have this state properly stored we can use it for more accurate
hashing and caching
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
ebdc0cd4ad
zink: improve debug asserts for samplers/images during descriptor updates
...
these are now more accurate for null bufferviews/imageviews
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
545625600b
zink: update null descriptor hashes to reflect current descriptor states
...
also add a bufferview hash since we use these now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
c380a46036
zink: add helper function for getting a resource for a descriptor
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
1b96e3e2b0
zink: massively beef up batch tracking for shader images
...
the struct for these isn't allocated, so we need to ensure that the objects
in it are explicitly tracked on batches when they're used
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
78068d039b
zink: add extra batch tracking for sampler views
...
we're going to start invalidating and rebinding resources, which means
we need to be extra sure that we have our lifetimes in order here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
dc80529e1f
zink: simplify bufferview and imageview descriptor state hashing
...
now that we have the hash for the internal objects available at all times, we
can directly reuse this instead of computing it each time, giving us more
accurate hashes as well as saving us cpu cycles
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
473ee28cf3
zink: store bufferview hash to bufferview struct
...
this lets us do a lot of things more precisely for bufferviews
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
5acbba4e41
zink: explicitly use zink_surface objects for sampler/image view objects
...
we can reuse this codepath instead of NIHing it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
054f53e3d0
zink: use an explicit zink_buffer_view struct
...
this gives us an object to work with similar to zink_surface
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
4cb5bb72be
zink: add util function for checking whether shader descriptor is buffer from program
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
12243f682d
zink: add util function for checking whether a shader descriptor is a buffer
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
2b18105ff7
zink: add some asserts for pipeline barriers to check renderpass state
...
it's illegal to emit barriers during a renderpass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Mike Blumenkrantz
f4a53287de
zink: handle cached descriptor set punting
...
if an active set gets invalidated, it needs to be punted from the active
hash table so it doesn't get reused
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543 >
2021-03-16 10:45:32 -04:00
Daniel Stone
e6aacec9e1
CI: Try really hard to get updated Windows TLS certs
...
Windows doesn't actually distribute a full TLS CA certificate store, but
pulls them in over time with Windows Update. Try to prime it by manually
pulling the certificates and installing them.
This bumps the Windows tag to force a rebuild.
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9618 >
2021-03-16 11:07:02 +00:00
Mike Blumenkrantz
616720d6ae
zink: track resource_object usage instead of resource usage
...
the resource object is now a state tracker for the inner resource_object,
so it can safely be destroyed even if the backing resource is still in use
this also requires updating various things to keep descriptor states/caches working
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9544 >
2021-03-15 22:08:06 -04:00
Mike Blumenkrantz
708f19317c
zink: split out backing resource object create/destroy
...
moving towards these being able to exist semi-independently...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9544 >
2021-03-15 22:08:06 -04:00
Mike Blumenkrantz
46bbc835c1
zink: move resource internals to a separate struct
...
this starts the path towards being able to replace the backing objects for
a resource
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9544 >
2021-03-15 22:08:06 -04:00
Mike Blumenkrantz
f6c6320a5f
zink: break out batch id finding for resource usage into util function
...
this is generally helpful for figuring out the last batch a resource was
used for
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9544 >
2021-03-15 22:08:06 -04:00
Mike Blumenkrantz
c699cc0f9b
zink: avoid looping for non-ubo descriptor updates based on set usage
...
if we know that the descriptor set is cached and already in use by a given
batch, then we also know that all the resources in the set are tracked, which
means that we can skip over some looping during descriptor updates which would
otherwise be used to add tracking for sampler/image views/states
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9567 >
2021-03-16 01:01:57 +00:00
Mike Blumenkrantz
839d609b8c
zink: add batch usage flags for sampler views/states and desc sets
...
this massively cuts down cpu time for hashing and lookups, resulting in
a noticeable performance increase
the sampler_state batch usage for now is just being set for future use when
it will be leveraged to permit immediate deletion
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9567 >
2021-03-16 01:01:57 +00:00
Bas Nieuwenhuizen
013aa05edb
radv: Use correct DCC compressed block size for sampling.
...
Don't need to change the pre-GFX9 samplers because this option doesn't
vary there.
Fixes: f848f2adfa ("radv: Use ac_surface DCC settings for shareable images.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4455
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4425
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9611 >
2021-03-16 00:50:11 +00:00
Jason Ekstrand
ee395df315
genxml: Make 1-bit L3$ config register fields bool on Gen7
...
Otherwise, they look like booleans but, if you put a value other than
0/1 in them, the GenXML generator code will explode.
Fixes: b6875b0094 "anv: Drop has_slm in emit_l3_config for gen11+"
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9614 >
2021-03-15 17:22:49 -07:00
Danylo Piliaiev
b8ca39a80d
turnip: implement intrinsic_vulkan_resource_reindex
...
Descriptor arrays are continuous, so it's just an addition of offset.
Fixes test:
dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.dynamic_offset.select_descriptor_array
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9495 >
2021-03-15 23:56:26 +00:00
Eric Anholt
3dc8102420
ci/freedreno: Add three more a5xx flakes from the last day.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9575 >
2021-03-15 22:45:13 +00:00
Mauro Rossi
2538e3b48a
android: i965: Rename files with "intel_" prefix to "brw_"
...
The necessary changes for Android build were missing in Makefile.sources
Fixes: 9d95e1bd79 (i965: Rename files with "intel_" prefix to "brw_")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9576 >
2021-03-15 23:24:02 +01:00
Mike Blumenkrantz
f4a8912dc2
anv: use common interfaces for shader modules
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Mike Blumenkrantz
71b17149e8
tu: use common interfaces for shader modules
...
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Mike Blumenkrantz
07c9dc54dd
v3dv: use common interfaces for shader modules
...
squashed changes from Alejandro Piñeiro <apinheiro@igalia.com >:
Add call to vk_object_base_init on internal shader_module: we have
some cases where internally we have some shader modules that we don't
create through CreateShaderModule, so in this case we need to manually
call base_init. Not sure why this wasn't needed before.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Mike Blumenkrantz
1d1c7a965c
radv: use common interfaces for shader modules
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Mike Blumenkrantz
c3db26a6f6
lavapipe: use common interfaces for shader modules
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Mike Blumenkrantz
a41e98ddca
vk/util: add a util macro for initializing stack vk_shader_module structs
...
radv does a lot of this, so having a central dispatch point will be useful in
case changes are made to this struct in the future
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Mike Blumenkrantz
76078ed9fe
vk/util: add unified shader module struct/functions
...
there's some extra logging stuff dumped into here to match functionality,
eventually that should also be consolidated into vk_util.c
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Dave Airlie
b0de4468c2
lavapipe: add host query reset
...
This just resets the queries on the host size.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9594 >
2021-03-16 06:50:37 +10:00
Dave Airlie
6865ec210b
lavapipe: fix writing availability for queries.
...
If the availability has to be written it needs to be written
to the correct place.
The host query reset tests fall over this.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9594 >
2021-03-16 06:50:33 +10:00
Dave Airlie
774bbc299f
lavapipe: add missing break
...
No effect as-is but annoying later.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9594 >
2021-03-16 06:50:28 +10:00
Sagar Ghuge
3a73148f25
anv: Set correct binding table entry count
...
We can use surface_count as it is to set binding table entry count since
it's already in units.
On Felix's Tigerlake with the GPU at fixed frequency, this patch
improves performance of several games:
- Shadow of the Tomb Raider: +1.5%
- Dota2vk: +1%
- Dark Souls: +1%
v2: (Ken)
- Remove get_binding_table_entry_count() and use surface_count directly.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9548 >
2021-03-15 20:11:13 +00:00
Jordan Justen
b6875b0094
anv: Drop has_slm in emit_l3_config for gen11+
...
For some gen12+ platforms, L3 config (cfg) can be NULL leading to a
seg-fault in emit_l3_config. But, we don't use has_slm for gen11+, so
we can just avoid declaring the variable.
Reworks:
* Drop has_slm variable for all gens (suggested-by Jason)
Ref: 633dec7163 ("anv: Set L3 full way allocation at context init if L3 cfg is NULL")
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9534
Fixes: 581e68bc99 ("anv: move L3 config emission to genX_state.c")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9589 >
2021-03-15 11:33:25 -07:00
Anuj Phogat
b1ab69f467
anv: Remove redundant #if checks
...
Patch removes redundant #if checks and unused code inside another #if
block.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9604 >
2021-03-15 18:02:58 +00:00
Caio Marcelo de Oliveira Filho
f603a2c25a
anv: Lower ViewIndex to zero when multiview is disabled
...
Vulkan spec says
If multiview is enabled in the render pass, this value will be one
of the bits set in the view mask of the subpass the pipeline is
compiled against. If multiview is not enabled in the render pass,
this value will be zero.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4446
Fixes: 0db7070330 ("anv/pipeline: Add shader lowering for multiview")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9574 >
2021-03-15 09:51:14 -08:00
Mike Blumenkrantz
edcad555f8
zink: stop leaking programs
...
gfx and compute programs both end up with an extra ref from creation,
so they both need to lose a ref during creation after they get their
shader refs
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9470 >
2021-03-15 15:37:46 +00:00
Mike Blumenkrantz
46b356ca2d
zink: unset ctx->program pointers when an unref destroys the object
...
if we destroy a program object which is currently the "active" program then
we need to unset the pointer to avoid invalid access
also unset injected tcs pointers where appropriate
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9470 >
2021-03-15 15:37:46 +00:00
Mike Blumenkrantz
ddb807e5c9
zink: return true from program ref functions upon free
...
this lets us unset the context pointer accurately
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9470 >
2021-03-15 15:37:46 +00:00
Mike Blumenkrantz
25d895747c
zink: use internal api for first-frame fence
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9290 >
2021-03-15 11:19:16 -04:00
Mike Blumenkrantz
e93ca92d4a
zink: force explicit fence only on first frame flush
...
we have implicit sync hooked up for drivers now so we don't need to worry
about drawing over our frontbuffer unexpectedly
still a weird issue remaining where we miss the first frame without an explicit
fence, but I expect that will get resolved eventually by wsi
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9290 >
2021-03-15 11:18:59 -04:00
Mike Blumenkrantz
bbfeebabfd
zink: force mesa flush implicit fencing on ANV
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9290 >
2021-03-15 10:58:21 -04:00
Mike Blumenkrantz
6fb4e1345d
zink: determine whether the vulkan driver requires mesa flush wsi
...
this is used for ANV's implicit fencing (until we get wsi)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9290 >
2021-03-15 10:58:21 -04:00
Mike Blumenkrantz
86bd643d6a
zink: use a safer iteration for fb surfaces during rp init
...
doing a pointer iteration looks cool, but if the array is full, then it
goes out of bounds and we crash
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9542 >
2021-03-15 14:10:52 +00:00
Mike Blumenkrantz
38f7faa8a4
zink: implement a surface cache
...
this is a global cache for all surface objects, enabling some memory
optimizations as well as improved reuse of cached descriptors
loosely based on patches from Antonio Caggiano
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9541 >
2021-03-15 09:42:30 -04:00
Mike Blumenkrantz
2643f9ed28
zink: ralloc screen objects
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9541 >
2021-03-15 09:42:30 -04:00
Michel Zou
6083ebe078
swr: fix array-bounds warning
...
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502 >
2021-03-15 13:19:09 +00:00
Michel Zou
12af7f97ee
swr: fix deprecated llvm 11 declaration warning
...
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502 >
2021-03-15 13:19:09 +00:00
Michel Zou
c58a7c7108
swr: fix unused SplitString warning
...
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502 >
2021-03-15 13:19:09 +00:00
Michel Zou
17441cf92f
swr: Fix SWR_CONTEXT pre-declaration
...
Silents a warning on msvc
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502 >
2021-03-15 13:19:09 +00:00
Michel Zou
0e8cdea6d9
swr: fix win32 intrinsics
...
The doc doesnt mention Index is altered when mask is null.
This is consistent with both llvm & migw implementations.
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502 >
2021-03-15 13:19:09 +00:00
Michel Zou
31dbef02a0
swr: extern declaration for win32 intrinsics
...
This fixes compilation on msvc because llvm redefines these too
Closes #4417
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502 >
2021-03-15 13:19:09 +00:00
Samuel Pitoiset
321dadf229
radv: rework radv_use_dcc_for_image() a bit
...
To make it clear that only GFX8-9 have missing DCC features.
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/9526 >
2021-03-15 13:22:44 +01:00
Samuel Pitoiset
9704ed3f57
radv: remove useless DCC disable check for 3D images on GFX10+
...
addrlib uses the S swizzle mode which disables DCC completely.
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/9526 >
2021-03-15 13:22:44 +01:00
Samuel Pitoiset
2bc51226e1
radv: add missing SQTT events for copy_commands2/create_renderpass2
...
A bunch of entrypoints were missing.
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/9560 >
2021-03-15 12:34:39 +01:00
Marcin Ślusarz
99e9a6721a
anv: fix memory allocation error handling
...
Reported by Coverity.
Fixes: 0a7224f3ff ("anv: group as many command buffers into a single execbuf")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9596 >
2021-03-15 10:53:41 +01:00
Lionel Landwerlin
87966b0aa0
intel: install intel_device_info
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Suggested-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9595 >
2021-03-15 09:22:13 +00:00
Pierre-Eric Pelloux-Prayer
9e5623ccc3
frontends/va: fix protected slice data buffer read size
...
Read vlVaBuffer->size bytes instead of an hardcoded value.
Fixes: deb7dc82f6 ("frontends/va: handle protected slice data buffer")
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9553 >
2021-03-15 09:43:15 +01:00
Pierre-Eric Pelloux-Prayer
4668cd30d9
radeonsi/sqtt: fix user event max size
...
Larger strings can corrupt rgp files.
Fixes: 5dc823304b ("radeonsi/sqtt: forward string markers to sqtt")
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9553 >
2021-03-15 09:42:40 +01:00
Iago Toral Quiroga
177dcd4b68
broadcom/compiler: be more flexible scheduling TMU writes
...
V3D 4.x allows more flexibility, so take advantage of that. Generally,
we can reorder any writes in the same sequence, so long as they are
not the sequence terminator (which must always be last, since it is
the one triggering the operation), and TMUD writes, since these must
be ordered with respect to each other.
total instructions in shared programs: 13735183 -> 13731927 (-0.02%)
instructions in affected programs: 903057 -> 899801 (-0.36%)
helped: 2358
HURT: 746
Instructions are helped.
total max-temps in shared programs: 2322020 -> 2322009 (<.01%)
max-temps in affected programs: 619 -> 608 (-1.78%)
helped: 19
HURT: 11
Inconclusive result (value mean confidence interval includes 0).
total sfu-stalls in shared programs: 31494 -> 31489 (-0.02%)
sfu-stalls in affected programs: 182 -> 177 (-2.75%)
helped: 40
HURT: 40
Inconclusive result (value mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13766677 -> 13763416 (-0.02%)
inst-and-stalls in affected programs: 901343 -> 898082 (-0.36%)
helped: 2349
HURT: 746
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9555 >
2021-03-15 08:03:28 +01:00
Iago Toral Quiroga
87ed614c47
broadcom/compiler: flag wrtmuc with a read dependency on last_tmu_config
...
Instead of using a write depdency. We use last_tmu_config to ensure ordering
of instructions participating in different TMU sequences. To this end,
all sequence terminators flag a write dependency on last_tmu_config, but
wrtmuc is not a sequence terminator, so we can be more flexible by flagging
it as a read depedency. This would prevent it to be moved into a previous
sequence (since it cannot be moved past the previous sequence terminator due
to the read depedency), but it allows it to be reordered with instructions in
the same sequence, which allows us to pair it up more effectively. Particularly,
it allows to pair up a wrtmuc with the sequence terminator of the same sequence,
turning code like this:
nop ; mov tmut, r0 ; thrsw; wrtmuc (tex[0].p0 | 0x3)
nop ; nop ; wrtmuc (tex[0].p1 | 0x0)
nop ; mov tmus, r1
Into this:
nop ; mov tmut, r0 ; thrsw; wrtmuc (tex[0].p0 | 0x3)
nop ; mov tmus, r1 ; wrtmuc (tex[0].p1 | 0x0)
total instructions in shared programs: 13755738 -> 13735183 (-0.15%)
instructions in affected programs: 2510921 -> 2490366 (-0.82%)
helped: 10963
HURT: 485
Instructions are helped.
total max-temps in shared programs: 2322828 -> 2322020 (-0.03%)
max-temps in affected programs: 11303 -> 10495 (-7.15%)
helped: 608
HURT: 19
Max-temps are helped.
total sfu-stalls in shared programs: 31545 -> 31494 (-0.16%)
sfu-stalls in affected programs: 235 -> 184 (-21.70%)
helped: 62
HURT: 11
Sfu-stalls are helped.
total inst-and-stalls in shared programs: 13787283 -> 13766677 (-0.15%)
inst-and-stalls in affected programs: 2525187 -> 2504581 (-0.82%)
helped: 10989
HURT: 477
Inst-and-stalls are helped.
v2: add a comment explaining the read depdency (Piñeiro).
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9555 >
2021-03-15 08:03:28 +01:00
Timothy Arceri
6d6fd57e09
util/fossilize_db: remove compression from foz db helper
...
We now handle compression in the shared cache item creation code.
Compressing the cache item header with the already compressed blob
doesn't help much so lets just remove it.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593 >
2021-03-15 03:34:48 +00:00
Timothy Arceri
4a98764da8
util/disk_cache: make use of the new compression helpers
...
This makes compression use more consistent between the zstd and
zlib libraries. It also reduces the amount of code required for
zlib use.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593 >
2021-03-15 03:34:48 +00:00
Timothy Arceri
d7ecbd5bf8
util: create some standalone compression helpers
...
This will be used by the following patch. It allows us to detangle
compression from the disk cache code, and abstract the underlying
compression libraries we use.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593 >
2021-03-15 03:34:48 +00:00
Mike Blumenkrantz
1819283413
zink: use _mesa_set_search_and_add() for set management
...
this avoids extra hash lookups
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9565 >
2021-03-14 21:57:00 -04:00
Mike Blumenkrantz
c5029ddf8c
zink: optimize resource usage tracking
...
we already have the batch usage info here for the resource, so if we know
the resource is already used on the batch then we don't need to also perform
a hash lookup to double check that it's really there
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9565 >
2021-03-14 21:57:00 -04:00
Dave Airlie
db0a71c9ae
lavapipe: enable EXT_scalar_block_layout
...
The frontend should handle this.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9590 >
2021-03-15 00:06:58 +00:00
Dave Airlie
db8e2aad5e
lavapipe: enable KHR_uniform_buffer_standard_layout
...
I think the frontend should handle all of this fine.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9590 >
2021-03-15 00:06:58 +00:00
Vinson Lee
7e412a5d33
iris: Fix typos.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9382 >
2021-03-15 00:01:30 +00:00
Vinson Lee
1193f2bd74
nv50/ir: Add constructor for NV50LegalizePostRA.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor
for this class does not initialize r63.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9326 >
2021-03-14 16:49:49 -07:00
Mike Blumenkrantz
09d53d63ad
zink: ci updates
...
disabling qbo piglit test for now due to lots of brokenness in zink which
makes them flaky, will be reenabled soon
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9566 >
2021-03-14 19:22:39 -04:00
Mike Blumenkrantz
4e14c3dcb1
zink: remove extraneous flush in transfer_map_region_flush
...
this was only needed to cover up some other bugs:
* missing barriers for buffer sampler/image descriptors
* weirdness with first frame handling
there's better ways of handling both cases, and now they're handled better
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9566 >
2021-03-14 18:51:58 -04:00
Mike Blumenkrantz
d40e372fe9
zink: move buffer<->image copying to pipe_context::resource_copy_region hook
...
that's a todo item off the list
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9566 >
2021-03-14 18:51:58 -04:00
Dave Airlie
88f41a8fa5
docs: update lavapipe features.txt
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9551 >
2021-03-15 06:39:53 +10:00
Dave Airlie
585b5fcf44
lavapipe: add single ssbo variable pointer support.
...
Multiple buffer seems to break with tess eval only,
something to investigate later.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8222 >
2021-03-15 06:20:54 +10:00
Dave Airlie
c843e3b5b4
lavapipe: move to common create render pass code
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550 >
2021-03-14 20:03:13 +00:00
Dave Airlie
8475ab7f92
lavapipe: move to the common casting interfaces
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550 >
2021-03-14 20:03:13 +00:00
Dave Airlie
bd623d6cd6
lavapipe: move queue to base object
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550 >
2021-03-14 20:03:13 +00:00
Dave Airlie
3a466bfc1c
lavapipe: add support for VK_KHR_create_renderpass2
...
Also move to the common code for create renderpass
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550 >
2021-03-14 20:03:13 +00:00
Vasily Khoruzhick
951788b560
lima/ppir: don't use list_length() in loop in regalloc and liveness analysis
...
list_length() complexity is O(n), so it's better to store number of regs
separately and use it instead of list_length().
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9570 >
2021-03-14 16:39:26 +00:00
Vasily Khoruzhick
d2ca8be998
lima: add precompile debug flag
...
This flag will be used by run from mesa-shader-db to trigger shader
compilation with default settings.
Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9583 >
2021-03-14 16:16:03 +00:00
Gert Wollny
7c2c60ad67
r600/sfn remove some leftover debug output
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584 >
2021-03-14 13:28:44 +00:00
Gert Wollny
4459fc224b
r600/sfn: lower idiv, imod, etc in nir
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584 >
2021-03-14 13:28:44 +00:00
Gert Wollny
7f020afcd6
r600/sfn: lower bitfield_extract and bitfield_insert in NIR
...
v2: lower bitfield insert to bitfield_select (Rhys Perry
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584 >
2021-03-14 13:28:44 +00:00
Gert Wollny
585eebdd0f
r600/sfn: Fix including/not including c++ parts of header
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584 >
2021-03-14 13:28:44 +00:00
Gert Wollny
944f132578
r600/sfn: fix buffer offset for ssbo writes
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584 >
2021-03-14 13:28:44 +00:00
Gert Wollny
a47a12b37c
r600/sfn: remove unused code
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584 >
2021-03-14 13:28:44 +00:00
Gert Wollny
2e1cff0e85
r600/sfn: sort alu opcodes in switch statememt
...
This makes it easier to figure out which ops are already handled.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584 >
2021-03-14 13:28:44 +00:00
Andres Gomez
c2e5c35786
.mailmap: add an alias for Eleni Maria Stea
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9435 >
2021-03-14 14:06:49 +02:00
Axel Davy
8283ed65cf
radeonsi: Limit the size of the in-memory shader cache
...
The in-memory shader cache can get significantly
huge in some rare cases.
Limit its size to 64MB on 32 bits, and 1GB else.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9578 >
2021-03-13 21:51:38 +00:00
Axel Davy
c23c3b7a77
st/nine: detect worker threads syncs for systemmem
...
If we detect too many syncs, use the stream_uploader,
which avoid syncs.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
205201c968
st/nine: Use stream_uploader for bad cases of systemmem
...
Using stream_uploader in case we cannot use unsynchronized
improves performance.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
05e6b0f200
st/nine: Always use DYNAMIC with SYSTEMMEM
...
The disadvantages of the DYNAMIC path over the
non-dynamic path are minor.
The advantages are many.
As we don't know if bad behaving apps use
non-dynamic SYSTEMMEM in a dynamic fashion,
let's be safe and always be dynamic.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
67c401b112
st/nine: Force DYNAMIC SYSTEMMEM for sw vertex processing
...
SW vertex processing buffers are supposed to be sorted in RAM
and to be immediately idle after use (thus you can write at the
same location again immediately).
DYNAMIC SYSTEMMEM is by far the best fit for now for these kind
of buffers, though it can be improved further. Indeed the use
pattern will cause a lot of syncs with csmt actived.
Thus disable csmt when full sw vertex processing is requested.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
380c2bf887
st/nine: Optimize dynamic systemmem buffers
...
Some apps use DYNAMIC SYSTEMMEM buffers and fill them in a
dynamic fashion with discard and nooverwrite locking flags.
To prevent uploading the whole buffer every draw call,
track the region needed for the draw call, and
upload only that region (or a bit more in order
to ease valid region tracking).
Try to aggressively upload with discard/unsynchronized.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
01c8071f93
st/nine: Track pending MANAGED buffer uploads
...
The tracking enables to avoid flushing the csmt thread
when locking repeatedly the same buffer, as long
as the locks are non-overlapping.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
26a9e2bb15
gallium/util: Add new u_box helpers
...
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
a5819e1b49
st/nine: Use correct bind flag at buffer creation
...
The buffer bind creation flag was incorrect for index buffers
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
a2c3db34d1
st/nine: Optimize DrawPrimitiveUp
...
Try to keep the same vertex buffer state when
having several consecutive DrawPrimitiveUp.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Nicer DrawPrimUp opt patch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
9168a37692
st/nine: Refactor DrawPrimitiveUp
...
. Use the same fonction as DrawPrimitive
. Drop the user vbuf path
. Avoid setting NULL vertexbuffer to the context
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
247d135f67
st/nine: Implement SYSTEMMEM buffers same as MANAGED
...
Use the MANAGED path for SYSTEMMEM buffers.
Tests point out the locking behaviour of SYSTEMEMM
buffers is very close to MANAGED.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Axel Davy
634adfa253
st/nine: Optimize EndScene
...
So far we did nothing on EndScene, but the API
doc says it flushes the GPU command queue.
The doc implies one can optimize CPU usage
by calling EndScene long before Present() is called.
Implementing the flush behaviour gives me +15-20%
on the CPU limited Halo. On the other hand, do limit
the flush to only once per frame.
3DMark03/3Mark05 get a 2% perf hit with the patch,
but 5% if I allow more flushes.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451 >
2021-03-13 21:23:24 +00:00
Matt Turner
2497195aab
docs: Mark VK_KHR_maintenance1 as done on turnip
...
I think I messed this up when splitting the turnip and lavapipe patches
apart.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9580 >
2021-03-13 12:01:04 -05:00
Mike Blumenkrantz
7b2e35128c
lavapipe: set more resource bind flags using image/buffer usage bits
...
we have this info available, so we can be more precise about it
stop the printf spam!
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9573 >
2021-03-13 04:14:17 +00:00
Ilia Mirkin
a04a797b89
mesa: only report INCOMPLETE_FORMATS for GLES1 / desktop
...
The enum is defined in EXT_framebuffer_object (available on desktop),
and was copied to OES_framebuffer_object (available in GLES1). The ES2
spec has no mention of such an enum. If the underlying implementation
does not support this, it will set a generic incomplete error (as is
done in st_cb_fbo.c if mixed_formats == false).
This should fix the following dEQP tests on ES2 drivers:
dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_none_none
dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_none_none
Fixes: fd017458bc (mesa: fix fbo attachment size check for RBs, make it trigger in ES2)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4444
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9572 >
2021-03-12 21:40:04 +00:00
Eric Anholt
87c85139ea
virgl: Update GLES expectations.
...
These are only used in manual runs, and I noticed in a recent run that
something on master had fixed them.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509 >
2021-03-12 21:14:27 +00:00
Eric Anholt
1cf8cf99c8
mesa/st: Fix precompile misses on compat GL VSes writing to color outputs.
...
In compat GL, the gl_FrontColor/BackColor gets clamped unless you
explicitly turn it off with ARB_color_buffer_float, and most apps doing
floating point color rendering are going to be using non-compat varyings
anyway instead of hoping that ARB_color_buffer_float exists. Thus, guess
that the app will get clamping on the color outputs to reduce draw-time
recompiles.
Saves 60 VS recompiles on half-life-2.trace on freedreno (and similarly for
many other compat GL apps).
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509 >
2021-03-12 21:14:27 +00:00
Eric Anholt
35247ac017
mesa/st: Add perf debug for draw-time variant compiles.
...
This ARB_debug_output is particularly useful in that default apitrace will
log it, so we can find when we're doing draw-time recompiles we shouldn't be.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509 >
2021-03-12 21:14:27 +00:00
Eric Anholt
6864ff35e9
mesa/st: Unify st_get_vp_variant() and st_get_common_variant().
...
Fixes the following issues I can see:
- Non-VS NIR shaders not gathering info after ucp lowering
- Non-VS NIR shaders not doing GL_CLAMP lowering
- Non-VS TGSI shaders not setting up stream output state.
- Non-VS TGSI shaders leaking lower_depth_clamp lowering across variant
compiles.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509 >
2021-03-12 21:14:27 +00:00
Mike Blumenkrantz
536533f556
lavapipe: fix push descriptor set indexing
...
the push set index isn't always 0, so the offsets need to be updated
in order to avoid clobbering other sets
Fixes: 6be19765cf ("lavapipe: add support for VK_KHR_push_descriptor")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9558 >
2021-03-12 21:02:23 +00:00
Lionel Landwerlin
8e36f7da85
anv: move L3 initialization to device init on Gen11+
...
On Gen11+ we tend to only use a single configuration, so just get rid
of the stalls in the command buffers by moving the config to device
initialization.
v2: drop NULL config check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9534 >
2021-03-12 20:49:01 +00:00
Lionel Landwerlin
581e68bc99
anv: move L3 config emission to genX_state.c
...
We're about to reuse this at device initialization.
v2: Handle NULL configs on Gen12+
v3: Handle NULL config in emission helper (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9534 >
2021-03-12 20:49:01 +00:00
Danylo Piliaiev
914e7a7f73
turnip: set zmode to A6XX_EARLY_Z if FS forces early fragment test
...
Specifying "early_fragment_tests" in fragment shader takes precedence
over our internal conditions.
Fixes test:
dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9569 >
2021-03-12 20:11:28 +00:00
Lionel Landwerlin
1d658c8598
intel/dev: switch over to mesa log infrastructure
...
v2: Deal with line wrapping (Jordan)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Suggested-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052 >
2021-03-12 18:54:07 +00:00
Lionel Landwerlin
cef063826e
anv: stop using get_param for things queried by gen_device_info
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052 >
2021-03-12 18:54:07 +00:00
Lionel Landwerlin
5f057f6e91
i965: stop using get_param for things queried by gen_device_info
...
All this code exists in gen_device_info. It will print out the same
warning.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052 >
2021-03-12 18:54:07 +00:00
Lionel Landwerlin
f08f8eaa48
iris: use gen_device_info helper to get subslice total
...
gen_device_info will try to use the most recent uAPI to get this
number and will fallback to this get_param. So just use what was
queries by gen_device_info_from_fd().
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052 >
2021-03-12 18:54:07 +00:00
Lionel Landwerlin
fa17bbe00c
intel/dev: add warning on missing kernel uAPI for Gen8+
...
We carry those warnings in i965/anv. Let's have them here. Next commit
we remove some code from the drivers.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052 >
2021-03-12 18:54:07 +00:00
Lionel Landwerlin
196d0aa110
intel/dev: add helpers to compute subslice/eu total
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052 >
2021-03-12 18:54:07 +00:00
Mike Blumenkrantz
45e6fcef4b
zink: remove debug printf
...
accidentally left this in while bisecting
Fixes: 929a748401 ("zink: avoid hashing states without descriptors")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9564 >
2021-03-12 17:45:44 +00:00
Michel Zou
862671369d
vulkan: fix CreateRenderPass prototype
...
Fixes compilation on win32
Fixes: 2523c477 " turnip: Move the CreateRenderPass wrapper..."
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9530 >
2021-03-12 17:37:38 +00:00
Mike Blumenkrantz
bf0c5988b2
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9540 >
2021-03-12 17:21:40 +00:00
Mike Blumenkrantz
980a8b3fc0
zink: implement an extremely dumb resource memory cache
...
this stores a number (currently 5) of backing allocations for resources
for later reuse when creating matching resources
because this is on the screen object it requires locking, but this is still
far faster than allocating new memory each time
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9540 >
2021-03-12 17:21:40 +00:00
Axel Davy
6205400612
st/nine: Fix compilation issue in nine_debug
...
Some compilers complain of the implicit conversion.
Make it explicit.
Reported by:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9250
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9563 >
2021-03-12 17:12:58 +00:00
Mike Blumenkrantz
378bb07110
zink: optimize pipeline hashing
...
we can reorder the pipeline state and avoid hashing the big arrays based
on context states that we already have available to us
also we can do incremental hashes for the shader modules to further reduce
hashing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9539 >
2021-03-12 17:02:20 +00:00
Mike Blumenkrantz
da08d67364
zink: move vertex_buffers_enabled_mask to non-hashed part of pipeline state
...
we can use this to optimize pipeline hashing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9539 >
2021-03-12 17:02:20 +00:00
Samuel Pitoiset
1aabfc77d3
radv: fix initialization of disable_compression when clearing color image
...
Just make sure it's initialized properly.
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/9473 >
2021-03-12 16:39:21 +00:00
Mike Blumenkrantz
0f7d32073d
zink: ci updates
...
some flakes here that will be resolved in the very near future
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
a5984bdf78
zink: fix arrays of texel buffer descriptors
...
these need to pass a constructed array of buffers, not a single buffer per
descriptor
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
929a748401
zink: avoid hashing states without descriptors
...
this is unnecessary hashing which decreases the accuracy of the states
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
72a06746bf
zink: remove image layouts from descriptor states
...
these are always the same value, so there's no need to track them
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
5700cbfa1a
zink: always use VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL for sampler bindings
...
if a resource is used multiple times with different samplers then this can result
in conflicting layouts, so it's better to just use the general case here
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
e4421c4b82
zink: don't create descriptor barrier hash tables for cached descriptor set
...
this won't be used, so there's no point in allocating it
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
38e6e44262
zink: remove struct zink_descriptor_resource from descriptor updating
...
this can be inferred from a resource's barrier usage, and then by merging
the batch-tracking for resources into the barrier loop, this deduplicates
calls for resources which are bound for multiple stages as well as removing
another iteration during descriptor updating
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
4a3b344b23
zink: directly use resource count from pool instead of accumulating every time
...
this is a surprisingly impactful speedup
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
201cd1a8c0
zink: track resource count on descriptor pool object
...
we can do this once here instead of accumulating the count all over later
also remove the debug value on the set which duplicated this
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
d9793a8a60
zink: reuse descriptor barriers across draws
...
if we aren't invalidating the descriptor set then we can safely reuse its
barriers to avoid doing any sort of hashing during descriptor updating
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
c55e2fb59c
zink: move descriptor binding out of the update codepath
...
we won't always need to update sets that we bind
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
dc020db723
zink: pre-size descriptor transition hash table
...
this avoids costly rehashing
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
80d9f3aa34
zink: simplify check for knowing whether descriptor updating is needed
...
if a program has at least one pool object set then it will have descriptors
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
fe31566fbb
zink: remove intermediate func for descriptor set getting
...
we can simplify this a bit by just getting the objects in the function
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
141ff0e091
zink: allow reuse of zink_descriptor_pools between programs
...
now that we've split these into their own objects, we can reuse them across
programs with matching binding layouts for a given type, giving even more value to
the descriptor set cache by increasing reuse
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
ee40550b87
zink: move descriptor type to pool object from set
...
this is a little less memory usage
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
58500979a8
zink: track number of sets currently allocated per descriptor pool
...
if we're going to be sharing pools across programs, it's no longer sufficient
to check the hash populations, so we need a separate counter to know when we have
to flush
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
871022dc84
zink: change program pointer on struct zink_descriptor_set to pool pointer
...
the program using the set isn't very relevant now that there's the intermediate
pool struct which stores the sets
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
817de3c776
zink: break out all the descriptor pool/layout stuff into a new struct
...
by pushing these into a separate struct, we can eventually reuse them between
programs to make the descriptor set caches even more valuable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
3d4e6c641b
zink: break out descriptor stuff into new files
...
this is getting to be enough code that it's getting to be a hassle to
keep with the program stuff
also rename a couple of the moved functions
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
eee488abad
zink: deduplicate VkWriteDescriptorSet setup
...
no functional changes
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
ce0524f009
zink: break out image descriptor updating
...
all the descriptor updates are now broken out, so update_descriptors is now just
a dispatch for calling the other update functions
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
eb375dc939
zink: break out sampler descriptor updating
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
e94c2d84b3
zink: break out ssbo descriptor updating
...
by the power of grayskull, this is now readable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
e4076d557f
zink: split out ubo descriptor updating
...
now that we're doing incremental updates, we can refactor this to be much
more readable by having separate functions for each type of descriptor update
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
2c83ea13d2
zink: add VkPipelineLayout to zink_program meta struct
...
this lets us simplify a little more code
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
0248e6b969
zink: don't double iterate all the per-batch sets on reset
...
we're already iterating once here, so we can definitely skip iterating again
and just do the removals inlined
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
74a0badb91
zink: add flag for recycled descriptor sets
...
this lets us skip a hash lookup in the last_set fastpath
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
3f561bbc83
zink: improve descriptor cache invalidation
...
we can pass the offset of the 'invalid' flag directly to the resources
to let them run through and invalidate their sets in time for us to detect
it when we recycle the set during batch reset and throw it onto our allocation array
additionally, by adding refs for the actual objects used in a descriptor set, we can
ensure that our cache is as accurate as possible
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
1a9f3ba2d7
zink: only batch-reference the program in use once per descriptor update
...
now that we're guaranteed to know what our batch is earlier, we can move this
referencing around to reduce the number of hash lookups we'll perform here
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
9df3147264
zink: move descriptor set allocation near the top of update_descriptors
...
no functional changes, but it moves the only point in the function where a
flush can occur out of the way which lets us get the batch we'll be using
immediately
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
514b5ced97
zink: add program pointer to desc set struct
...
we generally want to avoid this, but it lets us skip a lot of hash lookups,
which is a performance hit
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
b4105e8ac0
zink: actually flag all used resources as used during update_descriptors
...
num descriptors != num bound resources, so this needs to be a separate count/index
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
40be7f6353
zink: store last-used descriptor set for each type of set for quick reuse
...
we can avoid some hash lookups this way, and we can also avoid putting the null
descriptor sets back into the array since we know they'll always be the last-used
set
this also helps our null set reuse be more explicit since we never have to put these sets
back into an array or anything
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
8c908ee6a4
zink: pre-hash sampler views and states
...
this greatly reduces the amount of on-demand hashing that we have to do,
as now in worst case we'll be hashing 2x uint32_t per sampler descriptor
vs 2x vulkan object pointer (sometimes a uint64_t) and a uint32_t
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
fa77cc2fbb
zink: add a null sampler view descriptor hash to the screen
...
pre-hashing this saves us time later since we can just reuse it
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
67f9038b85
zink: introduce descriptor states
...
this aims to track the states of descriptors so that we can do more incremental
updating
it also enables the descriptor cache to be more robust by providing the incremental
data as the key
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
6d233e74ad
zink: use dynamic offsets for first ubo
...
this lets us avoid invalidating the ubo descriptor state, which reduces our
cache overhead
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
d4304ab0d2
zink: split descriptor sets based on usage
...
this uses multiple descriptor sets so that we can perform more incremental
updating and increase the value that we get from our cache by only invalidating
one state at a time
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
c5ce20e97a
zink: move surface refs to the end of descriptor updating
...
keeping descriptor stuff with descriptor stuff
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
d06c2ae21f
zink: reorder descriptor barrier applying during updating
...
just putting this with the rest of the non-descriptor stuff
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
761a04a464
zink: move streamout to draw_vbo
...
this isn't part of descriptor updating
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
b10a3be45e
zink: add second level cache for descriptor sets
...
this lets us store sets that are valid but not currently used so that we
can either prolongue a cache entry's lifetime or cannibalize a valid entry
if necessary to avoid needing to allocate more sets
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:53 +00:00
Mike Blumenkrantz
6c4c995836
zink: add caching for descriptor sets
...
this is a lot of churn that more or less amounts to hashing the descriptor
state during draw and then performing lookups with this to determine whether
we can reuse an existing descriptor set instead of allocating one
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
840ea21fa1
zink: add scaling factor for descriptor set bucket allocations
...
now descriptor sets allocate in increasingly large batches based on how many
sets a program has allocated, multiplying by 10 any time the sets hit a power of
10, e.g., if 100 sets are allocated, we now allocate in batches of 100
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
bd78710d21
zink: add bucket allocating for descriptor sets
...
now instead of allocating a single descriptorset at a time, we allocate
a defined count of descriptorsets (currently 10) at once and keep a separate
array of allocated-and-unused sets that we can pop sets off of
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
4461a871b8
zink: remove flushes for batch descriptor use
...
now that we do all our tracking and flushing per-program, we can throw
out the batch-based flushing and let our descriptors free-range
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
d21e88719a
zink: even better handling for descriptor oom
...
in addition to ensuring that all our batches stay under the max size by cycling
them whenever we get too many active descriptors going, we now do per-program
descriptor pools, so we can do some limiting there as well to ensure that we
aren't letting any one program hog all the resources
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
4ec1d5e70c
zink: add helper function for cycling a batch
...
this saves a bit of typing here and there
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
7ae8509673
zink: use more precise sizing for descriptor pools
...
now that these are on the program structs, we can size the pools optimally
based on the set layouts
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
9b3e2ba30c
zink: move descriptor set alloc function to zink_program.c
...
try to keep things organized...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
0b1a356393
zink: store and reuse descriptorsets after batch completion
...
since we know that the layout is going to match, we can store descriptorsets
in the program and then overwrite them instead of needing to free sets or reset
the pool
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
0e6ef05878
zink: move descriptor sets/pools from batches to programs
...
this lets us much more accurately create descriptor sets using the exact
size required by a given program instead of creating gigantic monolithic sets
it does (temporarily) incur a perf hit since sets are now freed after each use rather
than being reset
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Mike Blumenkrantz
5ddfffcca1
zink: simplify some update_descriptor code
...
by using the generic zink_program here we can shorten the code a little
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348 >
2021-03-12 16:32:52 +00:00
Samuel Pitoiset
15fc0c351a
radv: fix potential clears with non renderable images on GFX9+
...
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/9474 >
2021-03-12 16:09:42 +00:00
Samuel Pitoiset
9863ed9bf3
radv: fix meta save/restore state with non renderable images
...
For non renderable images, the driver performs some transfer operations
with compute shaders on the gfx queue, but it was saving the gfx state
instead of the compute state.
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/9474 >
2021-03-12 16:09:42 +00:00
Samuel Pitoiset
b42204e4d0
radv: disable sampling with VK_FORMAT_R64_SFLOAT
...
It's not supported.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4433
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/9519 >
2021-03-12 16:07:54 +01:00
Rohan Garg
44c38cae9a
virgl: Support the ETC1_RGB8 format as virglrenderer supports it
...
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9497 >
2021-03-12 15:35:47 +01:00
Erico Nunes
c453921c91
lima: run nir dce after nir_lower_vec_to_movs
...
Some of the 'vec*' nir instructions may hold references to dead code
until the nir_lower_vec_to_movs pass runs.
After nir_lower_vec_to_movs, that code can finally be cleaned by dce,
so add an additional dce pass.
This not only potentially further removes unneeded code from the nir
representation but also prevents bugs with the compiler from special
case unused code that is not expected (e.g. root undef type nodes).
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9507 >
2021-03-12 11:46:54 +00:00
Juan A. Suarez Romero
3f1c375581
ci/broadcom: allow custom kernels
...
So far, testing VC4 and V3D/V3DV requires the CI runners having access
to a Raspberry Pi 3/4 kernel, and the correspondent modules and
bootloader files. If a different kernel must be used, it means touching
the runners to provide them.
This commit adds the option to define an URL pointing to a (compressed)
tarball containing such files, without requiring dealing with the
runners. This link is provided through the `BM_BOOTFS` job variable.
The tarball must contain two directories in the root: a `/boot`
directory (containing the kernel, DTBs and bootloader files), and a
`/lib/modules` (or `/usr/lib/modules`) with the kernel modules.
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9527 >
2021-03-12 11:03:17 +00:00
Danylo Piliaiev
1a2f1e3f47
turnip: fill VkMemoryDedicatedRequirements
...
We support VK_KHR_dedicated_allocation so we must fill
VkMemoryDedicatedRequirements.
Vulkan spec states:
"[...] requiresDedicatedAllocation may be VK_TRUE under one of the
following conditions:
The pNext chain of VkImageCreateInfo for the call to vkCreateImage used
to create the image being queried included a VkExternalMemoryImageCreateInfo
structure, and any of the handle types specified in
VkExternalMemoryImageCreateInfo::handleTypes requires dedicated allocation,
as reported by vkGetPhysicalDeviceImageFormatProperties2 in
VkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures,
the requiresDedicatedAllocation field will be set to VK_TRUE."
All handle types require dedicated allocation at the moment.
Fixes:
dEQP-VK.api.external.memory.opaque_fd.dedicated.image.info
dEQP-VK.memory.requirements.dedicated_allocation.buffer.regular
dEQP-VK.memory.requirements.dedicated_allocation.image.transient_tiling_optimal
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9086 >
2021-03-12 11:56:47 +02:00
Tapani Pälli
d7b3454af3
anv: fix compilation due to missing vk_format_from_android
...
Fixes: 4fb6c051c9 ("anv: Move vk_format helpers to common code")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4428
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9549 >
2021-03-12 10:35:01 +02:00
Tapani Pälli
0759822f64
anv/android: fix compilation failure
...
Fixes: 3e6d3bca1d ("anv/android: Fix size check for imported gralloc bo")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9549 >
2021-03-12 10:34:53 +02:00
Dave Airlie
49bb53ba43
lavapipe: add EXT_sampler_filter_minmax support
...
Hook up the extension
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9423 >
2021-03-12 16:02:30 +10:00
Dave Airlie
6adbf6c86c
llvmpipe: add reduction mode support
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9423 >
2021-03-12 16:02:25 +10:00
Dave Airlie
1fb43ae9bf
lavapipe: enable KHR_multiview
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
cbd01045bc
lavapipe: add render pass support for multiview
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
3c08eee1bd
lavapipe: add input attachment support for multiview
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
8c6d4d470e
lavapipe: add draw support for multiview
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
4d72515e32
lavapipe: add clear support for multiview
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
e81cd37363
llvmpipe: add view index support to rasterizer
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
b76242b9c8
llvmpipe: add the view index callback from draw
...
This just stores the view index into setup
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
b5f686c93b
draw: add tess/gs support for multiview index
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
a2bee6df5f
draw/vs: pass the view index to the vertex shader
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
a417843a3c
draw: pass the view index to the render driver
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
03cbb7b104
draw: add view_mask rendering support
...
This loops the draws per-view above the instance rendering
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
b10b55f3d3
draw: refactor out the instances drawing code
...
This can be reused nice for multiview if refactored out
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
267d216bcb
draw: add interface to notify renderer of the current view index
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
9f0fd85474
gallivm: add support for load_view_index intrinsic
...
This just adds the system value
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
974f2e6c6a
gallivm: mark subpass input attachments as 2d arrays
...
This matters when multiview is enabled.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
e3b8f449e1
gallium: add a view mask to the draw command
...
This allows the caller to specify the view mask for this draw
in a multiview draw environment
This has been packed into the upper nibble and 2 bits of the
index size to retain the struct size as small as possible
for tc.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Timothy Arceri
684f97de80
glsl: fix declarations of gl_MaxVaryingFloats
...
gl_MaxVaryingFloats was not removed from core until 4.20 and is still
available in compat shaders. Found while writing some new CTS to test
the correct declarations of this constant.
Fixes: 0ebf4257a385i ("glsl: define some GLES3 constants in GLSL 4.1")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9514 >
2021-03-12 04:30:32 +00:00
Jason Ekstrand
6d16d929f3
iris: Add an iris_write_reg macro
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9537 >
2021-03-12 04:17:39 +00:00
Jason Ekstrand
5b792d79a4
anv: Add an anv_batch_write_reg macro
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9537 >
2021-03-12 04:17:39 +00:00
Jason Ekstrand
5f192b190f
anv,genxml: Handle L3SQCREG1_SQGHPCI in GenXML
...
Technically, this is only one field on IVB but it's two on BYT and so it
makes things easier if we split it for all Gen7.
While we're here, make some of the other fields in L3SQCREG1 Booleans.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9537 >
2021-03-12 04:17:39 +00:00
Dylan Baker
5abefcb962
docs: Add calendar entries for 21.0 release.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9538 >
2021-03-11 16:43:46 -08:00
Dylan Baker
288de31a26
docs: update calendar and link releases notes for 21.0.0
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9538 >
2021-03-11 16:43:46 -08:00
Dylan Baker
ca79b041cb
docs: add release notes for 21.0.0
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9538 >
2021-03-11 16:43:46 -08:00
Ilia Mirkin
4fdbc22c42
docs: add notes about nvc0 support of ARB/EXT_texture_filter_minmax
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487 >
2021-03-12 00:05:24 +00:00
Ilia Mirkin
987fef5f0e
nvc0: enable minmax reductions on gm200+
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487 >
2021-03-12 00:05:24 +00:00
Ilia Mirkin
41aad1c120
st/mesa: add EXT_texture_filter_minmax support
...
This also trivially adds ARB_texture_filter_minmax, since the EXT
variant is a strict superset.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487 >
2021-03-12 00:05:24 +00:00
Ilia Mirkin
6384dcaf7c
mesa: add tracking of reduction mode
...
This is used to expose ARB/EXT_texture_filter_minmax. Note that only the
EXT_* enable is provided since the ARB one would require proper handling
of some formats not being supported. For now this is force-enabled for
everything.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487 >
2021-03-12 00:05:24 +00:00
Dave Airlie
7c999249ef
gallium: add a sampler reduction cap + settings
...
This is to allow for
VK_EXT_sampler_filter_minmax
GL_EXT_texture_filter_minmax
support
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487 >
2021-03-12 00:05:24 +00:00
Michael Tang
8016a098fc
microsoft/spirv_to_dxil: Fix spirv2dxil I/O to use binary mode
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9513 >
2021-03-11 23:43:47 +00:00
Michael Tang
d4a51160ad
util: Make os_read_file use O_BINARY on Windows
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9513 >
2021-03-11 23:43:47 +00:00
Eric Anholt
5785fdac63
u_format: Mark the generated pack/unpack src/dst args as restrict.
...
Calling code to pack/unpack with overlap would be already be undefined.
Cuts 50k of text on x86_64 release builds from the compiler having more
freedom in the src/dst loads knowing that they don't interfere with each
other.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9500 >
2021-03-11 23:26:34 +00:00
Anuj Phogat
d4b231bb80
intel/isl: Drop intel_ prefix in function names
...
This change is in line with naming convention used in isl.
We want to keep intel_ prefix reserved for common code.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9532 >
2021-03-11 23:01:56 +00:00
Michel Zou
4e8618a33c
lavapipe: update features.txt
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8593 >
2021-03-11 22:43:21 +00:00
Michel Zou
f491d0cd3e
turnip: update features.txt
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8593 >
2021-03-11 22:43:21 +00:00
Ian Romanick
da7389eced
nir/range_analysis: Simplify analysis of bcsel
...
union_ranges was previously guarded by 'ifndef NDEBUG'. After removing
that, I noticed that the two tables were identical.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9108 >
2021-03-11 22:00:30 +00:00
Ian Romanick
7019cd84c0
nir/search: Use range analysis for is_finite
...
There are only a couple patterns that use is_finite, so the changes
aren't huge. Mostly shaders from Batman Arkham City and a few shaders
from Shadow of the Tomb Raider were affected.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Tiger Lake
Instructions in all programs: 160902591 -> 160902489 (-0.0%)
SENDs in all programs: 6812270 -> 6812270 (+0.0%)
Loops in all programs: 38225 -> 38225 (+0.0%)
Cycles in all programs: 7429003266 -> 7428992369 (-0.0%)
Spills in all programs: 192582 -> 192582 (+0.0%)
Fills in all programs: 304539 -> 304539 (+0.0%)
Ice Lake
Instructions in all programs: 145301634 -> 145301460 (-0.0%)
SENDs in all programs: 6863890 -> 6863890 (+0.0%)
Loops in all programs: 38219 -> 38219 (+0.0%)
Cycles in all programs: 8798589772 -> 8798575869 (-0.0%)
Spills in all programs: 216880 -> 216880 (+0.0%)
Fills in all programs: 334250 -> 334250 (+0.0%)
Skylake
Instructions in all programs: 135892010 -> 135891836 (-0.0%)
SENDs in all programs: 6802916 -> 6802916 (+0.0%)
Loops in all programs: 38216 -> 38216 (+0.0%)
Cycles in all programs: 8442597324 -> 8442583202 (-0.0%)
Spills in all programs: 194839 -> 194839 (+0.0%)
Fills in all programs: 301116 -> 301116 (+0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9108 >
2021-03-11 22:00:30 +00:00
Ian Romanick
f4a7dbc58f
nir/range_analysis: Fix analysis of fmin, fmax, or fsat with NaN source
...
Recall that when either value is NaN, fmax will pick the other value.
This means the result range of the fmax will either be the "ideal"
result range (calculated above) or the range of the non-NaN value.
Previously, something like fmax({gt_zero}, {lt_zero, is_a_number}) would
return a range of gt_zero. However, if the "gt_zero" parameter is NaN,
the actual result will be the "lt_zero" parameter.
This analysis depends on the is_a_number analysis also added in this MR.
Assuming this doesn't cause any unforeseen problems, I believe we should
wait a bit, then nominate a subset of the series for the stable
branches.
This fixes the piglit tests
tests/spec/glsl-1.30/execution/range_analysis_fmax_of_nan.shader_test
tests/spec/glsl-1.30/execution/range_analysis_fmin_of_nan.shader_test
from https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/463 .
Even with the added fsat fixes, range_analysis_fsat_of_nan.shader_test
still fails. There are some other issues there that will be addressed
in later commits (in another MR).
v2: Add fsat fixes. Suggested by Rhys.
Fixes: 405de7ccb6 ("nir/range-analysis: Rudimentary value range analysis pass")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Shader-db results:
All Intel platforms had similar results. (Tiger Lake shown)
total instructions in shared programs: 21049290 -> 21049314 (<.01%)
instructions in affected programs: 3175 -> 3199 (0.76%)
helped: 0
HURT: 17
HURT stats (abs) min: 1 max: 3 x̄: 1.41 x̃: 1
HURT stats (rel) min: 0.20% max: 1.89% x̄: 0.97% x̃: 0.92%
95% mean confidence interval for instructions value: 1.09 1.73
95% mean confidence interval for instructions %-change: 0.75% 1.19%
Instructions are HURT.
total cycles in shared programs: 855136176 -> 855136406 (<.01%)
cycles in affected programs: 37579 -> 37809 (0.61%)
helped: 0
HURT: 17
HURT stats (abs) min: 12 max: 20 x̄: 13.53 x̃: 14
HURT stats (rel) min: 0.17% max: 1.13% x̄: 0.79% x̃: 0.91%
95% mean confidence interval for cycles value: 12.53 14.53
95% mean confidence interval for cycles %-change: 0.63% 0.94%
Cycles are HURT.
Fossil-db results:
Tiger Lake
Instructions in all programs: 160901033 -> 160902591 (+0.0%)
SENDs in all programs: 6812270 -> 6812270 (+0.0%)
Loops in all programs: 38225 -> 38225 (+0.0%)
Cycles in all programs: 7430016795 -> 7429003266 (-0.0%)
Spills in all programs: 192582 -> 192582 (+0.0%)
Fills in all programs: 304539 -> 304539 (+0.0%)
Ice Lake
Instructions in all programs: 145299102 -> 145301634 (+0.0%)
SENDs in all programs: 6863890 -> 6863890 (+0.0%)
Loops in all programs: 38219 -> 38219 (+0.0%)
Cycles in all programs: 8798390846 -> 8798589772 (+0.0%)
Spills in all programs: 216880 -> 216880 (+0.0%)
Fills in all programs: 334250 -> 334250 (+0.0%)
Skylake
Instructions in all programs: 135889478 -> 135892010 (+0.0%)
SENDs in all programs: 6802916 -> 6802916 (+0.0%)
Loops in all programs: 38216 -> 38216 (+0.0%)
Cycles in all programs: 8442624166 -> 8442597324 (-0.0%)
Spills in all programs: 194839 -> 194839 (+0.0%)
Fills in all programs: 301116 -> 301116 (+0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9108 >
2021-03-11 22:00:30 +00:00
Ian Romanick
aa5d38decd
nir/range_analysis: Add "is a number" range analysis tracking
...
This commit is necessary to support "nir/range_analysis: Fix analysis of
fmin and fmax with NaN".
No shader-db or fossil-db changes on any Intel platform.
v2: Pack and unpack is_a_number.
v3: Don't set is_a_number of integer constants. The bit pattern might
be NaN.
v4: Update handling of b2i32. intBitsToFloat(int(true)) is
1.401298464324817e-45. Return a value consistent with that.
Fixes: 405de7ccb6 ("nir/range-analysis: Rudimentary value range analysis pass")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9108 >
2021-03-11 22:00:30 +00:00
Ian Romanick
d4f21b53f2
nir/range_analysis: Add "is finite" range analysis tracking
...
The obvious changes to nir_search_helpers.h are in a separate commit to
limit the scope of this change. These additions are really only needed
to support the next commit "nir/range_analysis: Add "is a number" range
analysis tracking". This reduction in scope is intended to increase the
suitability for stable branches.
No shader-db or fossil-db changes on any Intel platform.
v2: Pack and unpack is_finite.
v3: Split nir_search_helpers.h changes into a separate commit.
v4: Remove assertion intended for the next commit. Update is_finite
comment for fsign. Both noticed by Rhys. Fix is_finite handling for
load_const vectors. If any element is not finite, set the flag to
false. This is the same way is_integral is already handled.
v5: Update handling of b2i32. intBitsToFloat(int(true)) is
1.401298464324817e-45. Return a value consistent with that.
Fixes: 405de7ccb6 ("nir/range-analysis: Rudimentary value range analysis pass")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9108 >
2021-03-11 22:00:30 +00:00
Ian Romanick
86fb53b1be
nir/range_analysis: Refactor fsat handling
...
This will greatly simplify a later commit. The assert(r.is_integral) in
the eq_zero case is dropped because I don't think it's useful anymore.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9108 >
2021-03-11 22:00:30 +00:00
Axel Davy
767270e809
st/nine: Check memfd_create support
...
glibc introduced memfd_create only in its 2.27 release.
Check memfd_create support by verifying HAVE_MEMFD_CREATE
is defined.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377
Reported by Roman Elshin in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9483 >
2021-03-11 21:29:51 +00:00
Danylo Piliaiev
ae3b95daa7
turnip: lower device index to zero
...
Vulkan 1.1 has VK_KHR_device_group and VK_KHR_device_group_creation
promoted to core, thus we should handle DeviceIndex built-in.
While we are here, also add these extensions to the extensions list,
even though they are not doing anything useful.
Fixes test:
dEQP-VK.compute.device_group.device_index
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9516 >
2021-03-11 21:12:52 +00:00
Connor Abbott
ee1f140fd9
freedreno/a6xx: Cleanup SP_XS_CTRL_REG0 definitions
...
The registers were actually different per-stage even though we used the
same type, which resulted in a bunch of incorrectly programmed fields
and confusion. Move the stage-specific values to the registers
themselves, which makes things much less confusing and makes it possible
to set "mergedregs" correctly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9493 >
2021-03-11 20:58:39 +00:00
Connor Abbott
9a5596d679
freedreno/registers: Handle typed registers with fields
...
When a bitset is "inline" it should act as-if the its fields were
inserted into the register itself. However when initializing the
register's bitfield we weren't doing a deep copy of the inline bitfield,
so if the register defined additional fields then they would get added
to the original inline bitfield and any further registers with the same
type would get them. Fix this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9493 >
2021-03-11 20:58:39 +00:00
Connor Abbott
8d55a1e112
freedreno/a6xx: Fix compute threadsize type
...
And use the variable for the other threadsize field.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9493 >
2021-03-11 20:58:39 +00:00
Connor Abbott
1d8bf2d0bf
freedreno/computerator: Fix thrsz type
...
And use it for the other thread size field, too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9493 >
2021-03-11 20:58:39 +00:00
Lionel Landwerlin
f3cf70dc8d
intel/tools: fix meson warning
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4434
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9524 >
2021-03-11 20:52:20 +00:00
Pierre Moreau
4a408ff7ea
spirv: Ignore WorkgroupSize in non-compute stages
...
If a SPIR-V module contains for example both a geometry and a compute
shader, when processing the geometry shader its vertices out, input
primitive and output primitive attributes would get overwritten by the
value of the WorkgroupSize.
```
; SPIR-V
; Version: 1.5
; Generator: Khronos; 17
; Bound: 12
; Schema: 0
OpCapability Geometry
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Geometry %main "main"
OpEntryPoint GLCompute %main_0 "main"
OpExecutionMode %main InputPoints
OpExecutionMode %main Invocations 1
OpExecutionMode %main OutputTriangleStrip
OpExecutionMode %main OutputVertices 4
OpExecutionMode %main_0 LocalSize 1 1 1
OpSource GLSL 460
OpSource GLSL 460
OpName %main "main"
OpName %main_0 "main"
OpModuleProcessed "Linked by SPIR-V Tools Linker"
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%uint_1 = OpConstant %uint 1
%gl_WorkGroupSize = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%main = OpFunction %void None %6
%10 = OpLabel
OpReturn
OpFunctionEnd
%main_0 = OpFunction %void None %6
%11 = OpLabel
OpReturn
OpFunctionEnd
```
Running spirv_to_nir on the SPIR-V sample above and for the geometry
entry point would say that (among others):
* vertices out: 1
* input primitive: LINES
* output primitive: LINES
By removing any reference to `%gl_WorkGroupSize`, the output would
change to (among others):
* vertices out: 4
* input primitive: POINTS
* output primitive: TRIANGLE_STRIP
Fixes: 7d862ef530 ("spirv: Rework handling of spec constant workgroup size built-ins")
v2:
* Move the check from inside `handle_workgroup_size_decoration_cb()` to
its caller (Caio Marcelo de Oliveira Filho )
* Add an assert on the shader stage before using
`workgroup_size_builtin` (Caio Marcelo de Oliveira Filho )
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9418 >
2021-03-11 20:30:38 +00:00
Dylan Baker
5fee362fba
docs: Remove 21.0 features from features_new.txt
...
I forgot to do this at branchpoint time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9529 >
2021-03-11 20:27:14 +00:00
Anuj Phogat
9d95e1bd79
i965: Rename files with "intel_" prefix to "brw_"
...
v2: Rename intel_batchbuffer.c to intel_batch.c and
intel_batchbuffer.h to intel_batch.h
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9510 >
2021-03-11 10:14:33 -08:00
Anuj Phogat
3096788e5c
i965: Remove blank line at EOF
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9510 >
2021-03-11 09:43:03 -08:00
Rhys Perry
38b2e13766
aco: remove vmem/smem score statistics
...
Replaced by the Latency statistic.
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/8994 >
2021-03-11 16:31:19 +00:00
Rhys Perry
a0243f5c47
aco: add ACO_DEBUG=perfinfo
...
This prints the program with each instruction's contribution to it's
latency and various factors for the calculation of the Inverse Throughput
statistic.
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/8994 >
2021-03-11 16:31:19 +00:00
Rhys Perry
5d6a1095bf
aco: add print option to print program without temporary IDs
...
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/8994 >
2021-03-11 16:31:19 +00:00
Rhys Perry
23ecceb160
aco: add latency and inverse throughput statistics
...
Latency is estimanted duration of a single wave, ignoring others in the
CU. It is similar to the old cycles statistic except it it's more accurate
and considers memory operations.
The InvThroughput statistic is a combination of MaxWaves, Latency and the
portion of the wave's execution which does not use various resources.
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/8994 >
2021-03-11 16:31:19 +00:00
Rhys Perry
83ce9407f2
aco: add instruction classes
...
These should mostly match LLVM.
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/8994 >
2021-03-11 16:31:19 +00:00
Rhys Perry
0af7ff49fd
aco: lower p_constaddr into separate instructions earlier
...
This allows them to be scheduled properly and simplifies the assembler a
little.
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/8994 >
2021-03-11 16:31:19 +00:00
Rhys Perry
ab957bb899
aco: move wait_imm to aco_ir.h
...
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/8994 >
2021-03-11 15:35:34 +00:00
Rhys Perry
7d5643c0fe
aco: track divergent and uniform branch depth
...
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/8994 >
2021-03-11 15:35:30 +00:00
Rhys Perry
8f71be0a7b
aco: simplify loop_nest_depth tracking in isel
...
Keep track of the current loop depth in Program and set the depth inside
Program::insert_block() instead of repeating it every time we insert one.
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/8994 >
2021-03-11 15:35:24 +00:00
Boris Brezillon
442fbcdb47
panfrost: Expose panfrost_modifier_to_layout()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517 >
2021-03-11 15:10:58 +00:00
Boris Brezillon
825b1f9446
panfrost: Split the sampler and texture count
...
The texture and sampler descriptors are well separated in Vulkan,
let's add a new field to allow mixing sampler and texture descs.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517 >
2021-03-11 15:10:58 +00:00
Boris Brezillon
b0f968cf5c
panfrost: Don't count the special vertex/instance ID attributes on Bifrost
...
On Bifrost the vertex/instance ID are preloaded in special registers,
no need to add special attribute entries.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517 >
2021-03-11 15:10:58 +00:00
Boris Brezillon
7b9dfc502a
panfrost: Print the correct UBO size when dumping UBO information
...
There's a minus(1) modifier on the entries field. Take it into account.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517 >
2021-03-11 15:10:58 +00:00
Boris Brezillon
3559efb9bf
panfrost: Allow passing an explicit UBO index for the sysval UBO
...
UBO index assignment is a bit special in Vulkan, it's based on the
descriptor set layout, which doesn't know about shaders' internal UBOs
(our sysval UBOs). Extend the backend compilers so we can place sysval
UBOs where we want: after all explicit UBOs.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517 >
2021-03-11 15:10:58 +00:00
Boris Brezillon
92d9f090d9
panfrost: Add a knob to disable the UBO -> push constants optimization
...
I'm just too lazy to implement the logic to prepare push constant
buffers in the Vulkan driver. Besides, Vulkan has explicit push
constants, which AFAIK is not handled in the compiler backends yet,
and that will probably conflict with the UBO -> push constant
promotion.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517 >
2021-03-11 15:10:57 +00:00
Lucas Stach
2229328cf9
renderonly: close the gpu fd when destroying renderonly
...
Currently the screen destruction closes the dup'ed fd, but not the
original renderonly gpu fd, which is kept around for the lifetime of
the renderonly.
Squashed revert of "vc4: Don't leak the GPU fd for renderonly usage."
(commit 99ef66c325 ) as requested by Eric.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Guido Günther <agx@sigxcpu.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6983 >
2021-03-11 14:41:48 +00:00
Lucas Stach
187218395d
renderonly: remove layering violations
...
The renderonly object is something the winsys creates, so the pipe
driver has no business in memcpying or freeing it. Move those bits
to the winsys.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Guido Günther <agx@sigxcpu.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6983 >
2021-03-11 14:41:48 +00:00
Alyssa Rosenzweig
5487847d8c
pan/bi: Implement u{add, sub}_sat
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
3c7634f7d2
pan/bi: Extend the bi_builder to support type variants correctly
...
Some opcodes come with both type and size variants. Right now, only the
size is taken into account. Extend the builder to provide wrappers that
take a nir_type in addition to the bitsize.
While at it, fix wrappers taking a compare operator to use the proper
.{i,s,u} variant based on the comparison (equal and non-equal should
use .i, other comparisons should use .{u,s}).
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
0113a0a1ee
panfrost: Move pan_special_varying definition to pan_encoder.h
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
1f99bba06e
panfrost: Add a pan_section_offset() helper
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
1758da0a7e
panfrost: Allow passing an explicit global dependency when queuing a job
...
We will have 2 compute jobs per indexed indirect draw, one doing the
min-max index search and one patching the cmdstream. The second compute
job needs to depend on the first one, as well as the previous indirect
draw job to avoid corrupting the indirect draw context which is shared
at the batch level (global dependency).
Instead of handling that case in panfrost_add_job(), extend
panfrost_add_job() to accept an explicit global dependency.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
0bb091fd7c
panfrost: Add a parameter to suppress next job prefetching
...
This is needed for indirect draws so the compute job can patch the
vertex/tiler jobs which are following in the chain.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
00b85a0aaf
panfrost: Split the direct and indirect draw logic
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
691c47dd6c
pan/bi: Move int64 lowering before idiv lowering
...
Otherwise all 64 divisions will be skipped.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Boris Brezillon
f7bbfbaeb5
Revert "pan/bi: Optimize out redundant jumps to #0x0"
...
A block that has all its successors empty is not necessarily a leaf
block in the CFG, and removing the JUMP in that causes the shader
to continue executing code from another block instead of exiting.
This reverts commit a496b41d50 .
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520 >
2021-03-11 14:30:19 +00:00
Rhys Perry
35fe62dad1
radv/llvm: fix enabled_channels for compressed exports
...
The old values seemed to work fine, but the ISA docs recommend 0x0,0x3,0xc
and 0xf:
COMPR==1: export half-dword enable. Valid values are: 0x0,3,c,f
[0] enables VSRC0 : R,G from one VGPR (R in low bits, G high)
[2] enables VSRC1 : B,A from one VGPR (B in low bits, A high)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9459 >
2021-03-11 13:54:18 +00:00
Rhys Perry
341dd9d834
aco: set compr for fp16 exports
...
Obviously this didn't affect correctness. Not sure about performance.
It also changes enabled_channels to match radeonsi.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: f29c81f863 ("aco: use VOP2 for v_cvt_pkrtz_f16_f32 if possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9459 >
2021-03-11 13:54:18 +00:00
Michel Zou
73a48600b4
meson: detect winflex/bison only on native win32
...
we want to detect the native bison when cross-compiling
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9375 >
2021-03-11 10:38:36 +00:00
Marek Olšák
e6a0f243ea
radeonsi: update pipe_screen::num_contexts
...
This allows skipping mutex locking. Don't take the aux context into account.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9356 >
2021-03-11 05:05:39 +00:00
Marek Olšák
981e55d530
gallium: add pipe_screen::num_contexts for skipping mutex locking in util_range
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9356 >
2021-03-11 05:05:39 +00:00
Marek Olšák
728aa749ea
gallium/u_threaded: don't sync in create_stream_output_target
...
Manhattan needs this.
radeonsi can handle it since https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028/diffs?commit_id=33ac9dec91d07ef353e110ac376842d84ec539b4 .
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9356 >
2021-03-11 05:05:39 +00:00
Rob Clark
c4e5beef07
freedreno: threaded_context async flush support
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
9dbe2405a3
freedreno: threaded_context support
...
Currently only initialized for a6xx, mostly because that is the easiest
setup for me to test and debug at the moment. But the couple a6xx changes
should not require counterparts in older gens.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
1a12d682a6
freedreno: Check cb0 in rebind_resource()
...
Previously we were expecting cb0 to be user_buffer. (We did in some
cases upload it to a gpu buffer, but this was an internally allocated
buffer and not something subject to rebind.) But with TC it becomes
a gpu buffer.
(Technically, with pctx->const_uploader, we shouldn't hit the rebind
path for cb0, but better to not try to be overly clever.. sooner or
later that would bite us.)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
00eb60ee59
freedreno/a6xx: Move UBWC demotion to first sampler view bind
...
With threaded_context, CSO creation happens in the frontend thread,
which means it is no longer safe to do blits (if needed, for sampler
views with format that cannot be UBWC). So move this to the first
time that the sampler view is bound.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
acc2c015b3
freedreno: Add transfer_pool_unsync
...
With threaded_context, in the TC_TRANSFER_MAP_UNSYNC case, we are
getting called from the frontend thread, rather than driver thread.
So we need a different slab_child_pool for that.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
0c163e0a45
freedreno: Add fd_replace_buffer_storage()
...
This will be used by threaded_context to avoid stalls in the
DISCARD_WHOLE_RESOURCE case (and DISCARD_RANGE cases that can
be promoted to DISCARD_WHOLE_RESOURCE).
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
63649e4101
freedreno: Extract out helper for transfer-map flag munging
...
Split out the usage simplification from main part of transfer_map and
handle the threaded-context specific TC_TRANSFER_x flags.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
4f07a24e41
freedreno: Extend threaded_transfer
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
1017dc9f6e
freedreno: Extend threaded_resource
...
No functional change, just big churny
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
5fbaa8033b
freedreno: Restructure transfer_map()
...
Separate the parts that, with threaded_context, can be called from
either driver or frontend thread.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
39d6343a3e
freedreno: Split out batch/resource tracking
...
For threaded_context, to properly handle replace_buffer_storage, we'll
need to handle multiple "iterations" of a resource using the same
tracking in order to implement transfer_map() correctly.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:16 +00:00
Rob Clark
f74ccde2c7
freedreno: Factor out common fd_resource init
...
Before adding new things that would need initialization in both paths,
refactor out a shared helper.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:15 +00:00
Rob Clark
bcf4562528
freedreno: Fix u_blitter constant-buffer leak
...
We didn't see this before without threaded_context because we (normally)
wouldn't upload cb0 (the slot u_blitter uses). But with cb0 getting
uploaded we could hit a leak due to constant state only being restored
in the fd_blitter_clear() path. Move cb0 save to the one path that uses
it.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:15 +00:00
Rob Clark
9425b1343e
gallium/u_threaded: use mesa_log for debug msgs
...
On android, this will show up in logcat, rather than being lost into the
ether.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:15 +00:00
Rob Clark
f2f72ec3fe
gallium/u_threaded: Add helper to assert driver thread
...
Useful for drivers to add some sanity checks to avoid/detect threading
issues caused by things that might be called (indirectly) from frontend
thread.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:15 +00:00
Rob Clark
d2a920ee6e
util: Extract thread-id helpers from u_current
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323 >
2021-03-11 04:42:15 +00:00
Timothy Arceri
1772569449
Revert "glsl: default to compat shaders in compat profile"
...
This reverts commit 6c8cc9be12 .
A spec bug was resolved confirming the original behaviour. Also it
seems the game Foundation no longer depends on the incorrect
behaviour.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9486 >
2021-03-11 04:09:49 +00:00
Douglas Anderson
217d6594de
gallium/indices: Use "__restrict" to help the compiler
...
In a perf trace translate_quads_uint2uint_last2last_prdisable() was
showing up as a huge hot spot. Digging through the assembly on arm64
found that the compiler wasn't doing any read caching. Specifically,
the generated code looked roughly like this:
out[j+0] = in[i+0];
out[j+1] = in[i+1];
out[j+2] = in[i+3];
out[j+3] = in[i+1];
out[j+4] = in[i+2];
out[j+5] = in[i+3];
...and the compiler was loading "i+1" and "i+3" from memory twice for
no reason (instead of caching it).
If we sprinkle generous amounts of the `__restrict` keyword then the
compiler is able to be much smarter. Not only does it avoid
double-loading but it also generates better instructions. It uses two
LDRD instructions instead of 6 LDR instructions and uses some STRD
too.
In one example test this increased FPS from ~25.7 to ~34.5.
Change-Id: I88bf8bd9ac421fe48a7d6961e224425c3ae7beee
Reported-by: Rob Clark <robdclark@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9485 >
2021-03-11 03:14:31 +00:00
Jason Ekstrand
e7e297732e
vulkan/alloc: Use char * for pointer arithmetic
...
MSVC doesn't like arithmetic on void *.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9511 >
2021-03-10 20:59:59 -06:00
Jason Ekstrand
492b5577f0
vulkan/util: Add a type parameter to vk_multialloc_add
...
We also switch from using __alignof__ to alignof() in util/macros.h
which works on MSVC with the one unfortunate downside of requiring an
actual type and not a value.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9511 >
2021-03-10 20:59:56 -06:00
Jason Ekstrand
c120edd8e8
vulkan/alloc: Add VK_MULTIALLOC_DECL macros
...
These both declare the variable and add it to the allocator in one go.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9511 >
2021-03-10 20:59:55 -06:00
Jason Ekstrand
5afdbfe0c8
vk/alloc: Handle zero sizes better in vk_multialloc_add
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9511 >
2021-03-10 20:59:53 -06:00
Jason Ekstrand
c22267262e
vulkan: Use ALWAYS_INLINE for multialloc
...
This way it properly compiles on Visual Studio.
Fixes: 145444d265 "anv: Move multialloc to common code"
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9506 >
2021-03-10 23:15:17 +00:00
Anuj Phogat
96e251bde7
intel: Rename "GEN_" prefix used in common code to "INTEL_"
...
This patch renames all macros with "GEN_" prefix defined in
common code.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
65d7f52098
intel: Fix broken alignment due to gen_ prefix renaming
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
692472a376
intel: Rename "gen_" prefix used in common code to "intel_"
...
This patch renames functions, structures, enums etc. with "gen_"
prefix defined in common code.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
733b0ee8cb
intel: Rename files with gen_ prefix in common code to intel_
...
Changes in this patch include:
- Rename all files in src/intel/common path
- Update the filenames used in source and build files
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Jason Ekstrand
b9e9f92f73
intel/fs: Handle payload node interference in destinations
...
Starting with d0d039a4d3 , we emit writes to the push constant chunk
of the payload to stomp out-of-bounds data to zero for Vulkan. Then, in
369eab9420 , we started emitting shader preamble code for emulated
push constants on Gen12.5 parts. In either of these cases, we can run
into issues if we don't have a proper live range for some of the payload
registers where they get used for something and then smashed by our push
handling code. We've not seen many issues with this yet because it only
happens when you have dead push constants.
Fixes: d0d039a4d3 "anv: Emit pushed UBO bounds checking code..."
Fixes: 369eab9420 "intel/fs: Emit code for Gen12-HP indirect..."
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9501 >
2021-03-10 22:17:41 +00:00
Jason Ekstrand
8b7c2f1800
intel/fs: Use INTEL_MASK for pushish constant address masking
...
It's easier to compare with the HW docs than a pile of hex.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9501 >
2021-03-10 22:17:41 +00:00
Yannik Marek
369f9d225d
turnip: fix alpha to coverage in no color and unused attachment cases
...
In cases where the alpha coverage is enabled but the color attachment is
either unused or absent there should be a dummy mrt to make the draw behave
correctly.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Signed-off-by: Yannik Marek <yannik@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8952 >
2021-03-10 22:02:43 +00:00
Adam Jackson
ea27f2bf09
zink: Fix a thinko in instance setup
...
It really does help to size these arrays correctly.
Fixes: 2b4fcf0a06 zink: generate instance creation code with a python script
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9499 >
2021-03-10 20:19:00 +00:00
Matt Turner
6ceb6b509e
turnip: Remove unused TU_DEBUG_IR3 flag
...
Replaced by IR3_SHADER_DEBUG=disasm,{vs,...,cs} and unused since the
commit referenced below.
Fixes: 808992fc50 ("tu: Use the ir3 shader API")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8249 >
2021-03-10 18:59:22 +00:00
Eric Anholt
eba1b2a1ba
ci/freedreno: Mark another a5xx TF flake.
...
Showed up with an iommu fault preceding it each time it failed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9488 >
2021-03-10 18:44:16 +00:00
Marek Olšák
e39336a21e
radeonsi: enable RGP on gfx10.3
...
It seems to work on VanGogh.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9492 >
2021-03-10 18:31:04 +00:00
Jason Ekstrand
5d8fa880d6
radv: Drop CreateRenderPass
...
We can use the generic fall-back which calls CreateRenderPass2 instead.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
8304b4eef7
radv/meta: Use CreateRenderPass2
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
24414e7ec4
anv: Drop CreateRenderPass
...
Fall back to the common implementation instead.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
b302159b1c
vulkan: Preserve preserve attachments in CreateRenderPass
...
This is trivial so I really don't know why it wasn't handled in the
initial turnip code.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
147187f754
vulkan: Add some asserts and checks for multiview in CreateRenderPass
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
5de355b0f9
vulkan: Use correct aspectMask in CreateRenderPass
...
If a VkRenderPassInputAttachmentAspectCreateInfo is provided, we use the
aspects specified there. Otherwise, we default to every aspect in the
format. For attachments which are not input attachments, aspectMask is
left zero.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
4fb6c051c9
anv: Move vk_format helpers to common code
...
The Android ones we put in anv_android.c. Maybe one day we'll want a
vk_android.h to put some common Android stuff but, for now, let's keep
it contained to ANV's android code.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
c7345bd1fb
vulkan: Use VK_MULTIALLOC in CreateRenderPass
...
The variable-length stack allocations are causing issues with ubsan when
the array size is zero. Also, a heap allocation is probably safer.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
145444d265
anv: Move multialloc to common code
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Jason Ekstrand
2523c47720
turnip: Move the CreateRenderPass wrapper to common code
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8857 >
2021-03-10 18:17:31 +00:00
Marek Olšák
3b7b2df509
ac: remove switch cases for pc_lines for compute-only chips
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389 >
2021-03-10 18:02:28 +00:00
Marek Olšák
975e5e262b
ac,radeonsi: use correct VGPR granularity on Aldebaran
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389 >
2021-03-10 18:02:28 +00:00
Marek Olšák
a9da3fc0d1
ac: handle bigger instruction prefetch for Aldebaran
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389 >
2021-03-10 18:02:27 +00:00
Marek Olšák
9fdf69e611
ac/llvm: unpack thread IDs on Aldebaran
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389 >
2021-03-10 18:02:27 +00:00
Marek Olšák
6edf1978d3
ac: set the TCC line size for Aldebaran
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389 >
2021-03-10 18:02:27 +00:00
Marek Olšák
230a6dc55d
ac,radeonsi: add sampler changes for Aldebaran
...
- no 3D and cube textures
- no mipmapping
- no border color
- image_sample is the only supported opcode with a sampler (behaves like _lz)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389 >
2021-03-10 18:02:27 +00:00
James Zhu
381d3a5a38
amd: add Aldebaran chip enum
...
Signed-off-by: James Zhu <James.Zhu@amd.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9389 >
2021-03-10 18:02:27 +00:00
Danylo Piliaiev
2764cf8d32
ir3: use OPC_GETBUF to get size of sampler buffers
...
The maximum value which OPC_GETSIZE could return for one dimension
is 0x007ff0, however sampler buffer could be much bigger.
Blob uses OPC_GETBUF for them.
Fixes tests:
dEQP-VK.memory.pipeline_barrier.transfer_dst_uniform_texel_buffer.1048576
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9391 >
2021-03-10 17:10:45 +00:00
Danylo Piliaiev
8e6ed9948e
freedreno/a5xx: port handling of PIPE_BUFFER textures from a6xx
...
Otherwise, we won't be able to use OPC_GETBUF to get their size.
After this change we also could get rid of the hack for OPC_GETSIZE
which scaled the size for texture buffers.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9391 >
2021-03-10 17:10:44 +00:00
Danylo Piliaiev
d968995c67
turnip: fix SP_HS_WAVE_INPUT_SIZE value
...
It appears that storage for varyings in a wave has an upper
limit of wavesize * max_a831 where max_a831 is 64.
Exceeding the limit seam to force gpu to reduce primitives
processed per wave, at least calculations make sense with
such interpretation.
With blob SP_HS_WAVE_INPUT_SIZE never exceeds 64 and setting
it to 65 in freedreno leads to a hang.
Copied from the commit to freedreno e5499ca2
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8187 >
2021-03-10 16:50:11 +00:00
Connor Abbott
7b7532b806
freedreno/computerator: Add branching example
...
Mainly to be able to test label resolution without having to replace a
shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9463 >
2021-03-10 16:23:04 +00:00
Connor Abbott
19c7b6f9d6
ir3/parser: Add ability to specify branchstack
...
This lets you test branching with computerator.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9463 >
2021-03-10 16:23:04 +00:00
Connor Abbott
a820eb537c
ir3/parser: Support labels
...
This fixes the assembly for many scenarios where you want to use shader
replacement.
Note: unfortunately this leaks the identifier string created while
lexing, but I couldn't find a way to avoid leaking it except for
bringing in ralloc or something (which would be way more complicated).
The only other place doing something similar in mesa is the glsl parser,
which is using ralloc (actually a linear context).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9463 >
2021-03-10 16:23:04 +00:00
Connor Abbott
534658f79b
freedreno/computerator: Fix example assembly
...
Use the new bindless cat6 syntax for a6xx.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9463 >
2021-03-10 16:23:04 +00:00
Connor Abbott
cd772d5687
ir3/parser: Fix parsing of "0.0" in @const line
...
Trying to specify a floating-point value in a @const line would result
in it getting interpreted as a FLUT value and failing parsing. Fix this
by making the various FLUT tokens include the surrounding parentheses.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9463 >
2021-03-10 16:23:04 +00:00
Marek Vasut
f7dc0520d9
etnaviv: Fix point sprite Z,W coordinate replacement
...
Mesa fixed pipeline texture loading on programmable pipeline hardware emits
a generic fragment shader program which contains gl_TexCoord.xyzw as a vec4
and then expects to configure the varying assignments to the shader in the
pipeline command stream, to select what is wired to the XYZW fragment shader
inputs.
This gl_TexCoord.xyzw is turned into texture load with projection (TGSI TXP
opcode, similar for NIR). Texture load with projection does not exist in the
Vivante GPU as a dedicated opcode and is emulated. The shader program first
divides texture coordinates XYZ by projector W and then applies regular TEX
opcode to load the texture (i.e. TEX(gl_TexCoord.xyzw/gl_TexCoord.wwww)).
For point sprites, XY are the point coordinates from VS, Z=0 and W=1, always.
The Vivante GPU can only configure varying to be either of -- point coord X,
point coord Y, used, unused -- which covers XYZ, but not W. Z is fine because
unused means 0.
W used to be 0 too before this patch and that led to division by 0 in shader.
The only known way to solve this is to set Z=0, W=1 in the shader program
itself if the point sprites are enabled. This means we have to generate a
special shader variant which does extra SET to set the W=1 in case the point
sprites are enabled.
In case of TGSI, emitting the SET.TRUE opcode permits setting W=1 without
allocating additional constants. With NIR, use nir_lower_texcoord_replace()
to lower TEXn to PNTC, which sets Z=0, W=1, and let NIR optimize the shader.
Note that nir_lower_texcoord_replace() must be called before input linking
is set up, as it might add new FS input.
Also note that it should be possible to simply drop PIPE_CAP_POINT_SPRITE
in the long run, ST would then apply the same optimization pass, but that
option is so far misbehaving. And for etnaviv TGSI this is not applicable
yet.
This fixes neverball point sprites (exit cylinder stars) and eglretrace of
gl4es pointsprite test:
https://github.com/ptitSeb/gl4es/blob/master/traces/pointsprite.tgz
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8618 >
2021-03-10 11:48:21 +00:00
Iago Toral Quiroga
8525cb1c53
v3dv: call util_cpu_detect() when initializing the instance
...
Fixes this assert in debug builds:
in __GI___assert_fail (assertion=0x7ffff731f66b "util_cpu_caps.nr_cpus >= 1", file=0x7ffff731f650 "../src/util/u_cpu_detect.h", line=116,
function=0x7ffff7323280 <__PRETTY_FUNCTION__.11654> "util_get_cpu_caps") at assert.c:101
in util_get_cpu_caps () at ../src/util/u_cpu_detect.h:116
in _mesa_float_to_float16_rtz (val=0) at ../src/util/half_float.h:93
in util_format_r16g16b16a16_float_pack_rgba_float (dst_row=0x7fffffffbdc0 "", dst_stride=0, src_row=0x7fffffffbf90, src_stride=0, width=1, height=1)
at src/util/format/u_format_table.c:13459
in util_format_pack_rgba (format=PIPE_FORMAT_R16G16B16A16_FLOAT, dst=0x7fffffffbdc0, src=0x7fffffffbf90, w=1) at ../src/util/format/u_format.h:1525
in util_pack_color (rgba=0x7fffffffbf90, format=PIPE_FORMAT_R16G16B16A16_FLOAT, uc=0x7fffffffbdc0) at ../src/gallium/auxiliary/util/u_pack_color.h:432
in v3dv_get_hw_clear_color (color=0x7fffffffbf90, internal_type=6, internal_size=8, hw_color=0x7fffffffbf10) at ../src/broadcom/vulkan/v3dv_cmd_buffer.c:1241
v2: move call from physical device to instance init.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9408 >
2021-03-10 11:44:01 +01:00
Iago Toral Quiroga
c057a1211b
broadcom/compiler: disallow ldunif during ldvary sequences if possible
...
This restores many of the hurt shaders from the previous patch at the
expense of re-adding ldvary tracking in the scheduler.
total instructions in shared programs: 13760415 -> 13755738 (-0.03%)
instructions in affected programs: 1207560 -> 1202883 (-0.39%)
helped: 5080
HURT: 1731
Instructions are helped.
total max-temps in shared programs: 2322991 -> 2322828 (<.01%)
max-temps in affected programs: 5063 -> 4900 (-3.22%)
helped: 229
HURT: 108
Max-temps are helped.
total sfu-stalls in shared programs: 31827 -> 31545 (-0.89%)
sfu-stalls in affected programs: 478 -> 196 (-59.00%)
helped: 304
HURT: 21
Sfu-stalls are helped.
total inst-and-stalls in shared programs: 13792242 -> 13787283 (-0.04%)
inst-and-stalls in affected programs: 1220856 -> 1215897 (-0.41%)
helped: 5162
HURT: 1697
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9471 >
2021-03-10 07:52:22 +00:00
Iago Toral Quiroga
947e9e42cc
broadcom/compiler: simplify ldvary pipelining
...
We get optimal ldvary pipelining by doing the following:
1) Carefully merge a paired ldvary into the previous instruction when
possible.
2) When the above succeeds, flag the ldvary as scheduled immediately so
we can merge one of its children into the current instruction.
3) When scheduling ldvary sequences, only pick up instructions that are
part of the sequence to avoid picking up something that prevents
successful pipelining.
This patch skips 3) assuming some hurt shaders in exchange for better
scheduling flexibility during ldvary sequences. Besides eliminating most
of the code dedicated to special handling ldvary sequences, this also
usually allows us to produce better code by merging instructions that are
unrelated to ldvary sequences into the ldvary sequences, which is
particularly effective to fill up the gaps produced when scheduling the
first and last ldvary sequences as well as the gaps produced by flat
and noperspective varyings sequences that don't have both mul and add
instructions.
Notice that there are some hurt shaders, because some times the extra
scheduler flexibility can lead to picking up instructions that will
break a sequence without compensating for that, typically an ldunif
that prevents us from doing the fixup for a follow-up ldvary. We will
try to correct some of these cases with the next patch.
total instructions in shared programs: 13786037 -> 13760415 (-0.19%)
instructions in affected programs: 3201387 -> 3175765 (-0.80%)
helped: 16155
HURT: 4146
Instructions are helped.
total max-temps in shared programs: 2324834 -> 2322991 (-0.08%)
max-temps in affected programs: 22160 -> 20317 (-8.32%)
helped: 1340
HURT: 103
Max-temps are helped.
total sfu-stalls in shared programs: 30685 -> 31827 (3.72%)
sfu-stalls in affected programs: 782 -> 1924 (146.04%)
helped: 253
HURT: 1416
Inconclusive result.
total inst-and-stalls in shared programs: 13816722 -> 13792242 (-0.18%)
inst-and-stalls in affected programs: 3171642 -> 3147162 (-0.77%)
helped: 15331
HURT: 4179
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9471 >
2021-03-10 07:52:22 +00:00
Iago Toral Quiroga
d37241bdc4
broadcom/compiler: move code block around
...
These checks depend on prev_inst being set, so move them down below
with all the other checks with the same requirement.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9471 >
2021-03-10 07:52:22 +00:00
Iago Toral Quiroga
8bcda472a0
broadcom/compiler: add an additional sanity check assert to the ldvary fixup
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9471 >
2021-03-10 07:52:22 +00:00
Samuel Pitoiset
077775f3ce
radv: check if dynamic line stipple state changed
...
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/9458 >
2021-03-10 07:21:46 +00:00
Samuel Pitoiset
892987e3a0
radv: check if dynamic VRS state changed
...
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/9458 >
2021-03-10 07:21:46 +00:00
Samuel Pitoiset
ed391a62f6
radv: do not declare push constants for DCC decompress on compute
...
We don't use push constants at all.
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/9475 >
2021-03-10 07:50:31 +01:00
Sagar Ghuge
0314c7503f
intel/blorp: Fix condition to figure out aux_address
...
Fixes: 4dfabac4 ("blorp/gen12: Don't use aux address if implicit CCS")
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Mark Janes <markjanes@swizzler.org >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9491 >
2021-03-09 22:39:43 -08:00
Sagar Ghuge
e3d221838a
Revert "Revert "blorp/gen12: Don't use aux address if implicit CCS""
...
This reverts commit cbd5d82bae .
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9491 >
2021-03-09 22:39:20 -08:00
Mark Janes
cbd5d82bae
Revert "blorp/gen12: Don't use aux address if implicit CCS"
...
This reverts commit 4dfabac493 .
The offending commit broke tens of thousands of tests in Intel's Mesa
CI. Iris asserted in iris_use_pinned_bo at:
assert(bo->kflags & EXEC_OBJECT_PINNED);
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9489 >
2021-03-09 18:06:50 -08:00
Christian Gmeiner
8413de5db0
ci/bare-metal: fix fastboot
...
Only copy results from NFS if BM_FASTBOOT_NFSROOT is set.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9482 >
2021-03-09 23:09:10 +00:00
Eric Anholt
dfb0e0d246
freedreno/a5xx: Flush depth at the end of sysmem, like a6xx does.
...
On a6xx, this flush fixed some force-bypass tests. Doesn't affect
anything in our current a5xx test set.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9481 >
2021-03-09 21:46:58 +00:00
Eric Anholt
3c96880e13
freedreno/a5xx: Introduce an event write helper like a6xx has.
...
This should help the next person trying to diff a5xx to a6xx behavior.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9481 >
2021-03-09 21:46:57 +00:00
Marek Vasut
b19f1dc7d6
compiler/nir: Increment shader input count and mark as used when adding new gl_PointCoord
...
In case a new gl_PointCoord shader input is created, increment shader
input count and set valid driver_location to the new input variable,
otherwise the input gets aliased to input 0 and shows up in NIR_PRINT
output as whatever shader input 0 is instead of gl_PointCoord. Also
set the input as used, otherwise it might get removed.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9214 >
2021-03-09 21:24:35 +00:00
Dave Airlie
8027a7ba8a
shader_info: convert textures_used to a bitset.
...
For now keep it a bitset of 1 32-bit dword.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9456 >
2021-03-10 06:16:09 +10:00
Dave Airlie
c55bd4b68d
util/bitset: add a new last bit api
...
This is to be used where the bitset is a predefined array size.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9456 >
2021-03-10 06:16:05 +10:00
Dave Airlie
0e1afe7c70
util/panfrost/glsl: rename BITSET_LAST_BIT to BITSET_LAST_BIT_SIZED
...
The current users all pass in the number of dwords, but I'd like
to provide an interface that doess ARRAY_SIZE implicitly.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9456 >
2021-03-10 06:15:50 +10:00
Chad Versace
d978383966
anv/image: Make memory layout more explicit
...
Future patches for VK_EXT_image_drm_format_modifier will, in some cases,
place the aux surface and fast clear state into a driver-private bo.
This increases the complexity of image memory layout to such a degree
that, to maintain sanity, we must improve how we track the layout.
Define new types:
- anv_image_memory_range
- anv_image_memory_binding
- anv_image_binding
Delete many fields in anv_image (and its children), and replace them
with the new types.
This patch does not change how anv_image tracks (or, rather, does not
track) the memory of gen12 implicit ccs. We should probably do that, but
that's left as a future exercise.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
4dfabac493
blorp/gen12: Don't use aux address if implicit CCS
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
bb7d627865
anv/image: Add anv_image_address()
...
It calculates the address to a surface or to metadata in the image.
Refactor only. No intended change in behavior.
This patch prepares for, and reduces much noise in, the upcoming patch
that rewrites image memory tracking.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
1ef0fd3b70
anv: Refactor anv_image_get_compression_state_addr
...
Reduces noise in the path that introduces anv_image_mem_range.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
22ac3d74e0
anv/image: Clean up anv_GetImageMemoryRequirements2
...
If the image is disjoint, there is no reason to calculate image-global
memory requirements. Instead, only per-plane memory requirements are
needed.
Also, delete a large duplicate comment.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
ffc08351e1
anv: Add anv_surface_is_valid()
...
Current code checks for surface validity with `surface.isl.size_B > 0`.
Replace the checks with anv_surface_is_valid().
This prepares for adding new members to anv_surface that may
be accidentally used as a validity-indicator.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
3e6d3bca1d
anv/android: Fix size check for imported gralloc bo
...
1. Don't compare bo->size to image->size. An upcoming patch replaces
anv_image::size with complicated stuff. Instead, properly query the
required size with anv_GetImageMemoryRequirements.
2. Require the bo to fit the *aligned* image size.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
449df3808f
anv/image: Fix interpretation of 'disjoint'
...
The calculation of the subsurfaces' memory requirements assumed that the
image was disjoint if the image was created with
VK_IMAGE_CREATE_DISJOINT_BIT. But the Vulkan spec also requires that the
VkFormat be multi-planar.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
6fa56273be
anv/image: Drop duplicate 'format' in anv_image_create()
...
Reduces the chance of misusing unitialized 'n_planes' and 'format'
during image creation.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
2328edbb62
anv/image: Move vkGetImageMemoryRequirements
...
Move from anv_device.c to anv_image.c, to live alongside
vkBindImageMemory* and related code.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
5065faca00
anv/image: Rename anv_image_plane::surface -> primary_surface
...
This disambiguates code that accesses `image->planes[*].surface`.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Chad Versace
e7844c552c
anv/image: Replace bo_is_owned with from_gralloc (v2)
...
The name anv_image_plane::bo_is_owned will be made ambiguous by the
implementation of VK_EXT_image_drm_format_modifier, which may bind the
plane to multiple bo's.
Also, bo_is_owned was set if and only if the image was imported from
gralloc, and it was set only on the first plane. Therefore, let's rename
the field to from_gralloc, and move it to the toplevel of anv_image.
v2: Fix build in anv_android.c.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097 >
2021-03-09 18:42:20 +00:00
Mike Blumenkrantz
5945d7d2e9
zink: fix instance/device versioning (for real this time)
...
the maximum allowable runtime version of vk can be computed by MIN(instance_version, device_version)
despite this, instances and devices can be created using the maximum version available
for each respective type. the restriction is applied only at the point of
enabling/applying features and extensions, meaning that to correctly handle this,
zink must:
1. create an instance using the maximum allowable version
2. select a physical device using the instance
3. compute MIN(instance_version, device_version)
4. only now begin to enable/use features requiring vk 1.1+
ref #4392
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9479 >
2021-03-09 18:33:15 +00:00
Danylo Piliaiev
1d70863c12
freedreno/hw: fix populating branch targets in isa_decode pre-pass
...
pre-pass ran with branch_labels being false which made it no-op.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9476 >
2021-03-09 18:17:48 +00:00
Eric Anholt
a2a8c6a36c
docs: Add some documentation of game GL buffer object mapping behavior.
...
There are a variety of paths that apps take (this is by no means a
complete enumeration, I tried to keep going until I saw repeats but
eventually ran out of steam), and it should be useful to driver developers
writing their pipe_transfer_map() and invalidate_resource() calls to see a
bunch of the patterns without having to do performance debug on each app.
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9231 >
2021-03-09 09:24:23 -08:00
Simon Ser
71e8141503
egl: use render node for wl_drm if available
...
This causes clients to use the render node and skip DRM
authentication if a DRM render node is available.
Signed-off-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9334 >
2021-03-09 15:43:51 +00:00
Georg Lehmann
fb1100d718
vulkan/device_select: Only call vkGetPhysicalDeviceProperties2 if the device supports it.
...
vkGetPhysicalDeviceProperties2 is not allowed to be used with a 1.0 device
because it's a vulkan 1.1 function.
Closes : #4396
Fixes: 38ce8d4d ("vulkan/device_select: Stop using device properties 2.")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9462 >
2021-03-09 15:00:57 +00:00
Gert Wollny
8bc9ae1bc6
virgl: implement support for PIPE_CAP_STRING_MARKER
...
With this command implemented messages emitted by
applications via glDebugMessageInsert will be forwarded
to the host.
v2: - remove check for feature in encode function, this
is covered in the state tracker (Rohan)
- reorder parameters in the encode function to the
order of the emit callback
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9433 >
2021-03-09 13:57:05 +00:00
Jason Ekstrand
1399ee5cf9
anv: Drop anv_extensions.py
...
This should have been dropped in 27d496706e .
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9469 >
2021-03-09 10:36:19 +00:00
Fan Yugang
6905122999
intel/tools: Show unknown instructions in decoded state.
...
Signed-off-by: Fan Yugang <yugang.fan@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9455 >
2021-03-09 09:36:08 +00:00
Christian Gmeiner
f532202f2d
etnaviv: use nir_lower_idiv(..) before opt loop
...
nir_lower_idiv(..) creates during its lowering isub instructions.
Move nir_lower_idiv(..) before the opt loop to have a chance to
optimize/lower isub away. Also drop the drop the halti dependency to
make it easier to follow.
This fixes the following assert on GC3000:
Unhandled ALU op: isub
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9447 >
2021-03-09 06:45:31 +00:00
Mike Blumenkrantz
279ef45db5
zink: unref ctx->framebuffer on context destroy
...
we aren't guaranteed to get a final set_framebuffer_state(NULL) to do
this for us
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9434 >
2021-03-09 03:11:40 +00:00
Mike Blumenkrantz
8937b5f268
zink: don't pass so_info to ntv at all unless it's necessary
...
this is only needed for explicit xfb outputs
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
7ed57e60fc
zink: only export necessary xfb outputs to ntv
...
the full-variable outputs can be skipped, leaving only the varyings which
actually need explicit emission due to packed layouts or whatever
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
1f42ff77df
zink: use slightly stricter check for update_so_info() callsite
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
0fb7680b26
zink: pass so_info directly to update_so_info()
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
0d741b8dfe
zink: use info.has_transform_feedback_varyings to determine xfb enablement
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
eebd00329f
zink: rename variable in update_so_info()
...
be more consistent
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
5c5e1abea2
zink: evaluate existing slot map during program init and force new map as needed
...
if the number of explicit xfb outputs or new varyings added to the existing size
of the slot map would cause an overflow, we have to force a new slot map to
ensure that everything fits
this means iterating all the stages which can produce new varyings and calculating
all the slots required in order to compare against the max size available
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
6d40db84c9
zink: handle direct xfb output from output variables
...
if an entire variable is being dumped into an xfb buffer, there's no need
to create an explicit xfb variable to copy the value into, and instead
the xfb attributes can just be set normally on the variable
this doesn't work for geometry shaders because outputs are per-vertex
fixes all KHR-GL46.enhanced_layouts xfb tests
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
7cef91dd43
zink: stop allocating xfb slot map
...
this can just be inlined since it's a small static size
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
086262fc53
zink: run more nir passes for tess shaders
...
running nir_lower_io_arrays_to_elements_no_indirects for only some stages
breaks location-setting for the stages which don't run it when
e.g., dmat2x3 variables are sometimes split across locations and
sometimes jammed into a single location (TCS I'm looking at you)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
6d8b5e7f09
zink: fix location usage for explicit xfb outputs
...
ensure that this accurately handles multi-slot emission
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
96024a8dc9
zink: fix slot mapping for fat io variables
...
big types like dmat2x3 need multiple slots, and trying to jam them into
single slots breaks everything
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
1b25e3a701
zink: fix streamout emission for super-enhanced layouts
...
if we get some crazy matrix types in here then we need to ensure that
we accurately unwrap them and copy the components
fixes KHR-GL46.enhanced_layouts.xfb_stride
Fixes: 1b130c42b8 ("zink: implement streamout and xfb handling in ntv")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
9ff01d724a
zink: remove ntv streamout assert
...
this was added during review, but it was never correct and just crashes
valid cases like streamout from a mat3x4 type
Fixes: b6f8f3a3ba ("zink: fix streamout for clipdistance")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Jesse Natalie
fe90bcf11a
microsoft/compiler: Don't separate phis while inserting upcasts
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4414
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9464 >
2021-03-09 01:41:32 +00:00
Jesse Natalie
ef0d2a5b4b
nir: Add a nir_after_instr_and_phis helper
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9464 >
2021-03-09 01:41:32 +00:00
Jason Ekstrand
25020c125a
intel/mi_builder: Fix a couple of #ifs
...
All this does is remove a field on Gen7 and stop asserting on it. No
actual functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9467 >
2021-03-08 16:14:13 -06:00
Jason Ekstrand
62c64e7b9d
intel/mi_builder: Fix some indentation
...
This got lost in the rebase on top of the s/gen_mi_/mi_/ change
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9467 >
2021-03-08 16:13:37 -06:00
Jordan Justen
45e5c6b641
anv: Add mem heap/type support for local-mem
...
This will take effect in future patches when we are able to query the
kernel to set device->vram.size to a non-zero size.
Builds on Sagar's ("anv: Query memory region info") patch, and
re-organizes things as recommended by Lionel (and Jason).
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Jordan Justen
7c41ae0a81
anv: Put cache memory type first on non-llc platforms
...
Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Jordan Justen
fd98721cba
anv: Restructure mem heap/type init code
...
Just treat the llc and non-llc paths as separate cases. This will also
help when adding the local memory setup.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Sagar Ghuge
835c257f64
anv: Add anv_memregion structure
...
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Caio Marcelo de Oliveira Filho
a41c3ed384
spirv: Update a couple of comments in variable handling
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9440 >
2021-03-08 20:23:28 +00:00
Caio Marcelo de Oliveira Filho
3a7bb38b70
spirv: Explicitly break when finished handling SpvDecorationBuiltIn
...
When tyding up this section in 1e5b09f42f ("spirv: Tidy some repeated
if checks by using a switch statement.") the break got lost. It is
not a real problem because the next case just break, but better to
have it explicitly here instead of a FALLTHROUGH.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9440 >
2021-03-08 20:23:28 +00:00
Caio Marcelo de Oliveira Filho
94d2a51453
spirv: Reuse nir_is_per_vertex_io()
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9440 >
2021-03-08 20:23:28 +00:00
Eric Anholt
f301eec9a3
nir-to-tgsi: Fix handling of partial writemasks on SSA/REG decls.
...
In nouveau's PBO path with GS support and no VS layer export, we got:
intrinsic store_output (ssa_1, ssa_0) (0, 15, 0, 160, 128) /* base=0 */ /* wrmask=xyzw */ /* component=0 */ /* src_type=float32 */ /* location=0 slots=1 */ /* out_pos */
[...]
vec3 32 ssa_4 = mov ssa_3.xxx
intrinsic store_output (ssa_4, ssa_0) (0, 4, 0, 160, 128) /* base=0 */ /* wrmask=z */ /* component=0 */ /* src_type=float32 */ /* location=0 slots=1 *//* out_pos */
The mov's SSA value we would decide we could store directly to the output,
since nothing else used it. However, the store has a writemask, and the
ALU op was stomping over it instead of ANDing with the output decl's
existing writemask.
Fixes: f79f382c81 ("nir_to_tgsi: Store directly to TGSI outputs when possible.")
Closes : #4380
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9376 >
2021-03-08 19:01:40 +00:00
Jason Ekstrand
e20e85f01e
nir: Make nir_ssa_def_rewrite_uses_after take an SSA value
...
This replaces the new_src parameter of nir_ssa_def_rewrite_uses_after()
with an SSA def, and rewrites all the users as needed.
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383 >
2021-03-08 16:59:55 +00:00
Jason Ekstrand
117668b811
nir: Make nir_ssa_def_rewrite_uses take an SSA value
...
This commit replaces the new_src parameter of nir_ssa_def_rewrite_uses()
with an SSA def, removes nir_ssa_def_rewrite_uses_ssa(), and rewrites
all the users as needed.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383 >
2021-03-08 16:59:55 +00:00
Jason Ekstrand
13a0ee8a51
nir: Add and use a new nir_ssa_def_rewrite_uses_src helper
...
This is currently an alias for nir_ssa_def_rewrite_uses but we move all
the instances which used it to write a non-SSA source to the newly named
helper.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383 >
2021-03-08 16:59:55 +00:00
Jason Ekstrand
98a5b9b454
intel/mi_builder: Add control-flow support
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
8525ebe6e3
intel/mi_builder: Return an address from __gen_get_batch_address
...
While we're here, add __gen_get_batch_address declarations to more files
because we're about to start requiring it on all GFX 12.5+.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
322fba216b
intel/mi_builder: Use softpin for tests on gen8+
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
c23f7f1154
intel/batch_decoder: Don't follow predicated MI_BATCH_BUFFER_START
...
The stuff after these may be executed so we want to decode it too.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
6721925220
genxml: Clean up MI_SET_PREDICATE
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
c7c524337a
intel/mi_builder: Add load/store_offest on GFX 12.5+
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:18 -06:00
Jason Ekstrand
6323a8522b
intel/mi_builder: Support inverted values in mi_store
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:45:45 -06:00
Sagar Ghuge
04d0d4e849
intel/mi_builder: Added support for command streamer shift operations
...
Add logical shift left and right operations support to mi_builder.
v1:
- Add GEN_GEN > 12 check (Jordan Justen)
- Add gen_mi_has_shift function (Jordan Justen)
- Fix commit title (Jordan Justen)
v2 (Jason Ekstrand):
- Add _imm versions of all of them
- Better handle corner-cases in _imm helpers
- Handle the power-of-two limitation for _imm versions
- Add tests
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:45:42 -06:00
Jason Ekstrand
62b9e30cc7
intel/mi_builder: Add ieq/ine helpers
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:45:24 -06:00
Jason Ekstrand
2c02740a8c
intel/mi_builder: Use AddCSMMIOStartOffset for LRI
...
In 06cf838cbd we started using the AddCSMMIOStartOffset feature
on Gen11+ but we missed one place.
Fixes: 06cf838cbd "intel/mi_builder: Support gen11 command-streamer..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 09:54:45 -06:00
Connor Abbott
ccd7986f59
freedreno/cffdec: Use rb trees for tracking buffers
...
Gets rid of the arbitrary size limitation, and should make decoding
faster with many buffers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8838 >
2021-03-08 15:18:47 +00:00
Marek Olšák
b43f40166c
ac/surface: select best swizzle mode for 3D sampler performance
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9448 >
2021-03-08 11:41:23 +00:00
Marek Olšák
08ece5d6b3
driconf: add performance tweaks for viewperf
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9449 >
2021-03-08 10:33:33 +00:00
Tony Wasserka
97c97781f6
aco: Fix vector::reserve() being called with the wrong size
...
The container is moved from before and hence returns size 0. To get the
correct value, the new instruction container must be used instead.
This was flagged by clang-tidy. The fixed call still triggers the
corresponding diagnostic, hence this change silences it by adding a
redundant clear() after move.
Fixes: 7f1b537304 ("aco: add new NOP insertion pass for GFX6-9")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9432 >
2021-03-08 10:44:20 +01:00
Alyssa Rosenzweig
e30994a471
nir/lower_viewport_transform: Allow geom/tess
...
This pass needs to run on the last shader in a pipeline writing
gl_Position. In GLES2, that's always the vertex shader, but in ES3.2, it
can be a geometry or tessellation shader. The shared code works the same
in this case, just make the assert more generous.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9444 >
2021-03-07 17:57:04 +00:00
Alyssa Rosenzweig
3436e5295b
pan/bi: Treat +DISCARD.f32 as message-passing
...
Likely errata, matches blob's handling. Closes #4387
total nops in shared programs: 86266 -> 86272 (<.01%)
nops in affected programs: 347 -> 353 (1.73%)
helped: 1
HURT: 2
total clauses in shared programs: 20813 -> 20833 (0.10%)
clauses in affected programs: 343 -> 363 (5.83%)
helped: 0
HURT: 20
Clauses are HURT.
total quadwords in shared programs: 91572 -> 91588 (0.02%)
quadwords in affected programs: 1322 -> 1338 (1.21%)
helped: 1
HURT: 14
Quadwords are HURT.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9446 >
2021-03-07 15:10:28 +00:00
Alyssa Rosenzweig
6cb1a9b754
pan/bi: Set clause_state.message conservatively
...
Accidentally prevented scheduling message-passing instructions to
anywhere but the last ADD of a clause.
total nops in shared programs: 86280 -> 86266 (-0.02%)
nops in affected programs: 1609 -> 1595 (-0.87%)
helped: 9
HURT: 4
Inconclusive result (value mean confidence interval includes 0).
total clauses in shared programs: 20993 -> 20813 (-0.86%)
clauses in affected programs: 3488 -> 3308 (-5.16%)
helped: 116
HURT: 0
Clauses are helped.
total quadwords in shared programs: 91697 -> 91572 (-0.14%)
quadwords in affected programs: 12257 -> 12132 (-1.02%)
helped: 53
HURT: 2
Quadwords are helped.
Fixes: f0c0082ab0 ("pan/bi: Schedule blocks")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9446 >
2021-03-07 15:10:21 +00:00
Alyssa Rosenzweig
6322bc544e
pan/bi: Mark message-passing sources/dests live
...
More general, same data race.
Fixes: 44726101d1 ("pan/bi: Don't fill garbage")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9446 >
2021-03-07 15:10:12 +00:00
Axel Davy
91755300ec
st/nine: Set default dynamic_texture_workaround to true
...
Now the texture virtual memory usage is less of a problem,
we can use this workaround permanently.
In the spirit of the API it's certainly not the proper way
of implementing DYNAMIC textures (it seems they are ok
to have hidden copies in driver managed memory, but not have
virtual addressing space reduced), but it makes sense for us,
both performance wise, and to avoid bugs.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377 >
2021-03-07 13:13:53 +00:00
Axel Davy
0beb77751e
st/nine: Add driconf option to limit texture memory
...
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377 >
2021-03-07 13:13:53 +00:00
Axel Davy
24eb1f21d0
st/nine: Control the memfd virtual limit
...
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377 >
2021-03-07 13:13:53 +00:00
Axel Davy
a179ea2e6d
st/nine: Use the texture memory helper
...
Switch to the new texture RAM memory API.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377 >
2021-03-07 13:13:53 +00:00
Axel Davy
90a7573a65
st/nine: Add RAM memory manager for textures
...
On 32 bits, virtual memory is sometimes too short for apps.
Textures can hold virtual memory 3 ways:
1) MANAGED textures have a RAM copy of any texture
2) SYSTEMMEM is used to have RAM copy of DEFAULT textures
(to upload them for example)
3) Textures being mapped.
Nine cannot do much for 3). It's up to driver to really unmap textures
when possible on 32 bits to reduce virtual memory usage.
It's not clear whether on Windows anything special is done for
1) and 2). However there is clear indication some efforts have
been done on 3) to really unmap when it makes sense.
My understanding is that other implementations reduce the usage
of 1) by deleting the RAM copy once the texture is uploaded
(Dxvk's behaviour is controlled by evictManagedOnUnlock).
The obvious issue with that approach is whether the texture is
read by the application after some time. In that case,
we have to recreate the RAM backing from the GPU buffer.
And apps DO that. Indeed I found that for example Mass Effect 2
with High Texture mods (one of the crash case fixed by this patch serie),
When the character gets close to an object, a high res texture and replaces
the low res one. The high res one simply has more levels, and the game seems
to optimize reading the high res texture by retrieving the small-resolution
levels from the original low res texture.
In other words during gameplay, the game will randomly read MANAGED textures.
This is expected to be fast as the data is supposed to be in RAM...
Instead of taking that RAM copy eviction approach, this patchset
proposes a different approach: storing in memfd and release the
virtual memory until needed.
Basically instead of using malloc(), we create a memfd file
and map it. When the data doesn't seem to be accessed anymore,
we can unmap the memfd file.
If the data is needed, the memfd file is mapped again.
This trick enables to allocate more than 4GB on 32 bits apps.
The advantage of this approach over the RAM eviction one,
is that the load is much faster and doesn't block the GPU.
Of course we have problems if there's not enough memory to map the
memfd file. But the problem is the same for the RAM eviction approach.
Naturally on 64 bits, we do not use memfd.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377 >
2021-03-07 13:13:53 +00:00
Axel Davy
6087ff44ae
st/nine: Add new function to know if we are the worker
...
This will be useful in a later patch
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377 >
2021-03-07 13:13:53 +00:00
Ilia Mirkin
fd017458bc
mesa: fix fbo attachment size check for RBs, make it trigger in ES2
...
Makes dEQP-GLES2.functional.fbo.completeness.size.distinct pass.
Signed-off-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/9441 >
2021-03-06 20:29:41 +00:00
Ilia Mirkin
a8044e87e7
mesa: fix conditions for fp16 render format eligibility
...
GLES3 adds all of these, but they're also available in GLES2 with an
ext.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4400
Signed-off-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/9441 >
2021-03-06 20:29:41 +00:00
Karol Herbst
12f1e42ed3
tegra/context: unwrap indirect_draw_count as well
...
Fixes: 22f6624ed3 "gallium: separate indirect stuff from pipe_draw_info - 80 -> 56 bytes"
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/9425 >
2021-03-06 11:48:57 +00:00
Karol Herbst
a84c8ddb19
tegra/context: fix regression in tegra_draw_vbo
...
We should only pass in a new indirect_info object if we actually set valid
values in it.
Fixes: abe8ef862f "gallium: make pipe_draw_indirect_info * a draw_vbo parameter"
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/9425 >
2021-03-06 11:48:57 +00:00
Icecream95
efd7711e0e
st/mesa: Update constants on alpha test change if it's lowered
...
nir_lower_alpha_test creates a uniform for the alpha reference value;
this needs to be updated when changing alpha test state.
Fixes: b1c4c4c7f5 ("mesa/gallium: automatically lower alpha-testing")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4390
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9439 >
2021-03-06 00:32:51 +00:00
Dave Airlie
24ce0862fe
zink/ci: update results after layer extensions enabled in lavapipe
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9401 >
2021-03-05 21:43:59 +00:00
Dave Airlie
d061e21b7e
lavapipe: enable EXT_shader_viewport_index_layer
...
This is already implemented afaik
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9401 >
2021-03-05 21:43:59 +00:00
Dave Airlie
dad5d5099a
llvmpipe: add support for shader viewport layer
...
This should already be implemented just never enabled the CAP
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9401 >
2021-03-05 21:43:59 +00:00
Dave Airlie
4cf898b988
draw/prim_assembler: write correct decomposed primitive lengths
...
In order for shader viewport index to be calculated correctly,
the cliptest code needs proper primitive lengths to work out
the provoking vertex. I half fixed this before for GL4 but looks
like I didn't make it all the way.
This fixes:
dEQP-VK.draw.shader_viewport*
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9401 >
2021-03-05 21:43:59 +00:00
Dave Airlie
52dc22055f
draw: fix uses viewport index for tess eval shader
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9401 >
2021-03-05 21:43:59 +00:00
Kenneth Graunke
cdffa3e114
vbo: Fix vbo_sw_primitive_restart for start > 0
...
Commit e99e7aa4 began passing start > 0 to indexed draw calls rather
than keeping start at 0 and manually advancing ib->ptr. This should
work fine, however, there have been instances of software fallbacks
not handling things right.
vbo_sw_primitive_restart had a bug where it was ignoring "start" and
always calling find_sub_primitives with start = 0 and end = ib->count.
This meant that when start > 0, it was analyzing the wrong part of the
index buffer when finding subprimitives.
In theory, each _mesa_prim can have a different "start" value. But
the code only calls find_sub_primitives once, because it wants to
map, analyze, and unmap the index buffer before calling ctx->Draw,
as some drivers don't support drawing with the index buffer mapped.
To handle this, we break vbo_sw_primitive_restart calls into sections
where "start" matches across all the primitives, similar to how I
handled the issue in tnl in commit bd6120f562 .
In the common case, start matches and we handle it in one pass anyway.
Fixes Piglit's primitive-restart VBO_COMBINED_VERTEX_AND_INDEX test
and KHR-GL33.pipeline_statistics_query_tests_ARB.functional_primitives_vertices_submitted_and_clipping_input_output_primitives
on Intel Ivybridge and older (which don't do arbitrary cut indices).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4052
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9417 >
2021-03-05 21:16:32 +00:00
Adam Jackson
cf468b7ad8
zink: more and better debug printfs
...
Use debug_printf more consistently, normalize formatting a bit, and
trace a few more places you're likely to care about.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9436 >
2021-03-05 15:03:09 -05:00
Gert Wollny
f3aa2f15c2
r600/sfn: eliminate loading unused component loads from shared memory
...
LDS loads are quite expensive, so try to eliminate as many as possible
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9416 >
2021-03-05 18:25:25 +00:00
Rhys Perry
9f8a0b797e
radv: cache pipeline statistics
...
Applications rarely require them, but this improves fossil-db replay time.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9411 >
2021-03-05 17:01:16 +00:00
Rhys Perry
7c7e8942f8
radv,aco: remove aco_compiler_statistics
...
This removes a pointer from radv_shader_binary_legacy::data.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9411 >
2021-03-05 17:01:16 +00:00
Andres Gomez
b4d1764b46
.mailmap: resolve duplicates for Yogesh Mohan Marimuthu
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
4752ef5039
.mailmap: resolve duplicates for Satyeshwar Singh
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
8481d5f4d0
.mailmap: resolve duplicates for Mun Gwan-gyeong
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
cc1da67fd1
.mailmap: resolve duplicates for Maya Rashish
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
a3d4c48597
.mailmap: resolve duplicates for Matthias Lorenz
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
abd9b0d7d8
.mailmap: resolve duplicates for Matthias Hopf
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
4fd9f4beb6
.mailmap: resolve duplicates for Mark Menzynski
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
00aefdfea6
.mailmap: resolve duplicates for Lin Johnson
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
028ae10694
.mailmap: resolve duplicates for Jan Zielinski
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
6c9660e424
.mailmap: resolve duplicates for James Xiong
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
64b415d96c
.mailmap: resolve duplicates for Indrajit Das
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
75f5fc3435
.mailmap: resolve duplicates for Emmanuel Vadot
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
cd4dfc157b
.mailmap: resolve duplicates for Christopher Li
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
9e34049e46
.mailmap: resolve duplicates for Icecream95
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Andres Gomez
bd8193fb4c
.mailmap: colapse duplicates for Timothy Arceri
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8837 >
2021-03-05 16:35:07 +00:00
Lionel Landwerlin
8955d179d3
anv: fix MI_PREDICATE_RESULT write
...
This register is only 32bits.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 1952fd8d2c ("anv: Implement VK_EXT_conditional_rendering for gen 7.5+")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9428 >
2021-03-05 16:19:20 +00:00
Alyssa Rosenzweig
718bfdb3da
pan/bi: Implement fsin/fcos
...
Instead of lowering it in NIR, use the lookup tables as inputs to a
second-order Taylor expansion. shader-db results aren't amazing but keep
in mind this is without backend CSE yet.
total instructions in shared programs: 115913 -> 115707 (-0.18%)
instructions in affected programs: 3151 -> 2945 (-6.54%)
helped: 12
HURT: 0
Instructions are helped.
total nops in shared programs: 84045 -> 84041 (<.01%)
nops in affected programs: 1571 -> 1567 (-0.25%)
helped: 1
HURT: 7
Inconclusive result (value mean confidence interval includes 0).
total clauses in shared programs: 20498 -> 20489 (-0.04%)
clauses in affected programs: 188 -> 179 (-4.79%)
helped: 6
HURT: 0
Clauses are helped.
total quadwords in shared programs: 90395 -> 90291 (-0.12%)
quadwords in affected programs: 2287 -> 2183 (-4.55%)
helped: 12
HURT: 0
Quadwords are helped.
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/9420 >
2021-03-05 15:15:10 +00:00
Alyssa Rosenzweig
253b795451
pan/bi: Allow negating constants
...
Useful for representing -0 in transcendental sequences matching the
blob.
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/9420 >
2021-03-05 15:15:10 +00:00
Alyssa Rosenzweig
362756ad09
pan/bi: Use replace_index in more places
...
Needed to respect abs/neg.
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/9420 >
2021-03-05 15:15:10 +00:00
Pierre-Eric Pelloux-Prayer
c276bde34a
radeonsi/sqtt: export shader code to RGP
...
With these changes the shader code is visible in RGP.
Vk pipeline feature is emulated using si_update_shaders: when shaders are
updated we compute a sha1 of their code and use it as a pipeline hash.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Pierre-Eric Pelloux-Prayer
729d3eb0e0
radeonsi/sqtt: don't always use WGP 0
...
Because it may be disabled. Instead use the cu mask to
pick the first active WGP.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Pierre-Eric Pelloux-Prayer
47eafb3f51
radeonsi/sqtt: remove duplicate token
...
V_008D18_REG_INCLUDE_CONTEXT was set twice.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Pierre-Eric Pelloux-Prayer
a27ea38d2a
radeonsi/sqtt: keep a copy of the uploaded shader code
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Pierre-Eric Pelloux-Prayer
7f5a8db96d
ac/rgp: move radv/sqtt functions to ac
...
pso_correlation and code_object_loader don't depend on drivers
specific logic so move them to the shared code.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Pierre-Eric Pelloux-Prayer
b2ef94943f
ac/rtld: make ac_rtld_upload returns the code size
...
This will be useful to keep a copy of the uploaded code.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Pierre-Eric Pelloux-Prayer
e5b1e645e7
ac/rgp: make the max gap between shader code a warning
...
For radeonsi the shaders don't live in the same BOs, so they're
unlikely to be less that 0x1000 bytes apart.
So this commit bumps the threshold to 0x10000 and warns once
when hitting it.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Pierre-Eric Pelloux-Prayer
0e97d817f5
radeonsi: properly set SPI_SHADER_PGM_HI_ES
...
When not using S_00B324_MEM_BASE the value isn't properly truncated.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9277 >
2021-03-05 13:10:11 +00:00
Iago Toral Quiroga
6e6e71ddf9
broadcom/compiler: fix flags check for ldvary merge
...
We were checking that the previous instruction doesn't write flags,
but we also need to check it doesn't read them.
Fixes: 1784dd22a3 ('broadcom/compiler: pipeline smooth ldvary sequences')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9431 >
2021-03-05 12:55:47 +00:00
Iago Toral Quiroga
21c1853c55
broadcom/compiler: ldvary doesn't implicitly write to r3 since V3D 4.1
...
total instructions in shared programs: 13805979 -> 13786037 (-0.14%)
instructions in affected programs: 2263244 -> 2243302 (-0.88%)
helped: 10646
HURT: 1508
Instructions are helped.
total threads in shared programs: 412220 -> 412242 (<.01%)
threads in affected programs: 58 -> 80 (37.93%)
helped: 17
HURT: 6
Threads are helped.
total uniforms in shared programs: 3793200 -> 3790401 (-0.07%)
uniforms in affected programs: 131281 -> 128482 (-2.13%)
helped: 1547
HURT: 281
Uniforms are helped.
total max-temps in shared programs: 2326309 -> 2324834 (-0.06%)
max-temps in affected programs: 31836 -> 30361 (-4.63%)
helped: 1139
HURT: 153
Max-temps are helped.
total spills in shared programs: 5932 -> 5940 (0.13%)
spills in affected programs: 80 -> 88 (10.00%)
helped: 2
HURT: 3
total fills in shared programs: 13370 -> 13372 (0.01%)
fills in affected programs: 480 -> 482 (0.42%)
helped: 2
HURT: 3
total sfu-stalls in shared programs: 30829 -> 30685 (-0.47%)
sfu-stalls in affected programs: 2190 -> 2046 (-6.58%)
helped: 570
HURT: 533
Sfu-stalls are helped.
total inst-and-stalls in shared programs: 13836808 -> 13816722 (-0.15%)
inst-and-stalls in affected programs: 2276152 -> 2256066 (-0.88%)
helped: 10643
HURT: 1525
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9430 >
2021-03-05 13:37:39 +01:00
Rhys Perry
524848707b
radv: don't set sx_blend_opt_epsilon for V_028C70_COLOR_10_11_11
...
Matches radeonsi and PAL. From PAL:
// 1 is recommended, but doesn't provide sufficient precision
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4394
Fixes: ed94638156 ("radv: Enable RB+ where possible.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9427 >
2021-03-05 11:16:40 +00:00
Iago Toral Quiroga
839007e490
broadcom/compiler: always restart ldvary pipelining when scheduling ldvary
...
When we were only able to pipeline smooth varyings, if we had to disable
ldvary pipelining in the middle of a sequence it would stay disabled for
the rest of the program, to prevent us from prioritizing scheduling of
ldvary instructions that we would not be able to pipeline effectively.
Now that we can pipeline all ldvary sequences we can change this.
This change re-enables ldvary pipelining upon finding the next
ldvary in the program in the hopes that we can continue pipelining
succesfully. To do this, we track the number of ldvary instructions we
emitted so far and compare that to the number of inputs in the fragment
shader we are scheduling. This also allows us to simplify our ldvary
tracking at nir to vir time, since that is all now handled in the QPU
scheduler.
total instructions in shared programs: 13817048 -> 13810783 (-0.05%)
instructions in affected programs: 810114 -> 803849 (-0.77%)
helped: 4843
HURT: 591
Instructions are helped.
total max-temps in shared programs: 2326612 -> 2326300 (-0.01%)
max-temps in affected programs: 4689 -> 4377 (-6.65%)
helped: 285
HURT: 7
Max-temps are helped.
total sfu-stalls in shared programs: 30942 -> 30865 (-0.25%)
sfu-stalls in affected programs: 207 -> 130 (-37.20%)
helped: 120
HURT: 42
Sfu-stalls are helped.
total inst-and-stalls in shared programs: 13847990 -> 13841648 (-0.05%)
inst-and-stalls in affected programs: 825378 -> 819036 (-0.77%)
helped: 4899
HURT: 590
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9404 >
2021-03-05 10:32:19 +01:00
Samuel Pitoiset
2169c4f763
radv: re-enable TC-compat HTILE for MSAA D32S8 images on GFX9+
...
Should help MSAA games. Note that it's broken on GFX8 because
the tiling doesn't match.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3868
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/9284 >
2021-03-05 08:44:40 +00:00
Xin He
97b196b921
virgl: use atomic operations when increase sub_ctx_id
...
Use atomic operations to avoid competition. In addition,
since sub_ctx_id 0 has been used by default, sub_ctx_id
should start from 1.
Signed-off-by: Xin He <hexin.op@bytedance.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9406 >
2021-03-05 08:35:29 +00:00
Samuel Pitoiset
367a93830b
radv: skip useless FCE when fast-clearing MSAA images with DCC enabled
...
The clear code is 0xCC which means CMASK isn't fast-cleared.
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/9392 >
2021-03-05 08:11:28 +00:00
Samuel Pitoiset
6102507a74
radv: remove useless check about mips+layers for TC-compat HTILE images
...
radv_use_htile_for_image() prevents it.
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/9405 >
2021-03-05 08:10:19 +01:00
Samuel Pitoiset
438f65fb1e
radv: cleanup enabling TC-compat HTILE for depth surfaces
...
It makes more sense to try to enable TC-compat if the image has HTILE.
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/9405 >
2021-03-05 08:09:42 +01:00
Mike Blumenkrantz
55b57db84d
zink: add vk/spirv caps/extension for shader LAYER variable
...
this is required if gl_Layer is used outside of GEOMETRY stage
Fixes: c77df59c9e ("zink: export PIPE_CAP_TGSI_VS_LAYER_VIEWPORT")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9410 >
2021-03-05 03:45:51 +00:00
Dave Airlie
1186fbcdf1
lavapipe: fix dynamic viewport/scissor pipeline emission
...
Just fixup the tests for when the pipeline vp/scissors
are emitted.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9422 >
2021-03-05 03:34:47 +00:00
Dave Airlie
6bcd304278
lavapipe: fix pipeline vp/scissor mixup.
...
Not copying all the scissors caused
dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.2_viewports
to fail but thah test pointlessly relies on KHR_multiview (cts issue
filed).
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9422 >
2021-03-05 03:34:47 +00:00
Iván Briano
194e477615
anv: don't advertise mipmaps for linear 3D surfaces on BDW
...
Prior to SKL, the mipmaps for 3D surfaces are laid out in a way
that make it impossible to represent in the way that
VkSubresourceLayout expects. Since we can't tell users how to make
sense of them, don't report them as available.
"Fixes" dEQP-VK.image.subresource_layout.3d.*
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9419 >
2021-03-04 16:23:23 -08:00
Ian Romanick
2c4fd24c01
nir/algebraic: Apply addition property of equality to the other ordering too
...
Inequality comparison operations are not commutative, so `foo < bar` and
`bar < foo` both have to be explicitly listed.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
All Intel GPUs had similar results. (Ice Lake shown)
total instructions in shared programs: 20027051 -> 20026899 (<.01%)
instructions in affected programs: 37181 -> 37029 (-0.41%)
helped: 85
HURT: 0
helped stats (abs) min: 1 max: 20 x̄: 1.79 x̃: 1
helped stats (rel) min: 0.05% max: 6.78% x̄: 0.92% x̃: 0.68%
95% mean confidence interval for instructions value: -2.42 -1.15
95% mean confidence interval for instructions %-change: -1.23% -0.61%
Instructions are helped.
total cycles in shared programs: 979762793 -> 979753527 (<.01%)
cycles in affected programs: 2653905 -> 2644639 (-0.35%)
helped: 104
HURT: 50
helped stats (abs) min: 1 max: 1048 x̄: 119.99 x̃: 11
helped stats (rel) min: <.01% max: 9.88% x̄: 0.77% x̃: 0.20%
HURT stats (abs) min: 1 max: 734 x̄: 64.26 x̃: 8
HURT stats (rel) min: <.01% max: 3.06% x̄: 0.36% x̃: 0.10%
95% mean confidence interval for cycles value: -98.65 -21.68
95% mean confidence interval for cycles %-change: -0.66% -0.15%
Cycles are helped.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9374 >
2021-03-04 22:50:53 +00:00
Ian Romanick
33031bdab6
nir/algebraic: Apply addition property of equality more conservatively
...
This allows a lot more CSE. Depending on where the addition and the
comparison are scheduled, it may also reduce register pressure by
reducing the live range of the addends.
Across all the platforms, the shaders affected for spills or fills were
all fragment shaders from Dirt Rally.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
total instructions in shared programs: 21043103 -> 21038804 (-0.02%)
instructions in affected programs: 892878 -> 888579 (-0.48%)
helped: 1549
HURT: 724
helped stats (abs) min: 1 max: 225 x̄: 4.14 x̃: 2
helped stats (rel) min: 0.05% max: 11.18% x̄: 1.04% x̃: 0.78%
HURT stats (abs) min: 1 max: 71 x̄: 2.93 x̃: 1
HURT stats (rel) min: 0.07% max: 6.90% x̄: 0.80% x̃: 0.56%
95% mean confidence interval for instructions value: -2.33 -1.45
95% mean confidence interval for instructions %-change: -0.50% -0.40%
Instructions are helped.
total cycles in shared programs: 855054155 -> 855757566 (0.08%)
cycles in affected programs: 58275918 -> 58979329 (1.21%)
helped: 1213
HURT: 1680
helped stats (abs) min: 1 max: 107405 x̄: 1684.00 x̃: 10
helped stats (rel) min: <.01% max: 38.09% x̄: 1.51% x̃: 0.25%
HURT stats (abs) min: 1 max: 126632 x̄: 1634.59 x̃: 12
HURT stats (rel) min: <.01% max: 85.91% x̄: 2.75% x̃: 0.49%
95% mean confidence interval for cycles value: -98.06 584.35
95% mean confidence interval for cycles %-change: 0.71% 1.22%
Inconclusive result (value mean confidence interval includes 0).
total spills in shared programs: 9843 -> 9771 (-0.73%)
spills in affected programs: 72 -> 0
helped: 5
HURT: 0
total fills in shared programs: 9600 -> 9451 (-1.55%)
fills in affected programs: 149 -> 0
helped: 5
HURT: 0
LOST: 14
GAINED: 9
Skylake
total instructions in shared programs: 18185074 -> 18183866 (<.01%)
instructions in affected programs: 575180 -> 573972 (-0.21%)
helped: 1286
HURT: 468
helped stats (abs) min: 1 max: 15 x̄: 1.55 x̃: 1
helped stats (rel) min: 0.03% max: 4.08% x̄: 0.67% x̃: 0.65%
HURT stats (abs) min: 1 max: 8 x̄: 1.69 x̃: 1
HURT stats (rel) min: 0.13% max: 7.69% x̄: 0.87% x̃: 0.45%
95% mean confidence interval for instructions value: -0.77 -0.60
95% mean confidence interval for instructions %-change: -0.30% -0.22%
Instructions are helped.
total cycles in shared programs: 960518105 -> 960608234 (<.01%)
cycles in affected programs: 42536073 -> 42626202 (0.21%)
helped: 1210
HURT: 1714
helped stats (abs) min: 1 max: 7015 x̄: 123.41 x̃: 10
helped stats (rel) min: <.01% max: 33.76% x̄: 1.32% x̃: 0.26%
HURT stats (abs) min: 1 max: 14474 x̄: 139.71 x̃: 14
HURT stats (rel) min: <.01% max: 58.94% x̄: 2.00% x̃: 0.44%
95% mean confidence interval for cycles value: 4.02 57.63
95% mean confidence interval for cycles %-change: 0.43% 0.82%
Cycles are HURT.
LOST: 16
GAINED: 42
Broadwell
total instructions in shared programs: 17856880 -> 17852158 (-0.03%)
instructions in affected programs: 564836 -> 560114 (-0.84%)
helped: 1243
HURT: 418
helped stats (abs) min: 1 max: 115 x̄: 4.36 x̃: 1
helped stats (rel) min: 0.03% max: 9.67% x̄: 0.90% x̃: 0.67%
HURT stats (abs) min: 1 max: 8 x̄: 1.67 x̃: 1
HURT stats (rel) min: 0.14% max: 7.69% x̄: 0.89% x̃: 0.46%
95% mean confidence interval for instructions value: -3.45 -2.23
95% mean confidence interval for instructions %-change: -0.51% -0.38%
Instructions are helped.
total cycles in shared programs: 1031140321 -> 1029856892 (-0.12%)
cycles in affected programs: 66986946 -> 65703517 (-1.92%)
helped: 1084
HURT: 1653
helped stats (abs) min: 1 max: 415168 x̄: 1835.32 x̃: 10
helped stats (rel) min: <.01% max: 57.16% x̄: 1.19% x̃: 0.28%
HURT stats (abs) min: 1 max: 43930 x̄: 427.14 x̃: 12
HURT stats (rel) min: <.01% max: 57.53% x̄: 1.32% x̃: 0.39%
95% mean confidence interval for cycles value: -915.76 -22.07
95% mean confidence interval for cycles %-change: 0.17% 0.47%
Inconclusive result (value mean confidence interval and %-change mean confidence interval disagree).
total spills in shared programs: 20891 -> 20335 (-2.66%)
spills in affected programs: 1567 -> 1011 (-35.48%)
helped: 70
HURT: 0
total fills in shared programs: 27307 -> 25905 (-5.13%)
fills in affected programs: 5381 -> 3979 (-26.05%)
helped: 71
HURT: 0
LOST: 17
GAINED: 20
Haswell
total instructions in shared programs: 16411850 -> 16409414 (-0.01%)
instructions in affected programs: 602666 -> 600230 (-0.40%)
helped: 1152
HURT: 781
helped stats (abs) min: 1 max: 103 x̄: 3.59 x̃: 1
helped stats (rel) min: 0.03% max: 8.61% x̄: 0.85% x̃: 0.65%
HURT stats (abs) min: 1 max: 41 x̄: 2.18 x̃: 1
HURT stats (rel) min: 0.12% max: 7.69% x̄: 0.88% x̃: 0.69%
95% mean confidence interval for instructions value: -1.74 -0.78
95% mean confidence interval for instructions %-change: -0.21% -0.10%
Instructions are helped.
total cycles in shared programs: 1035338781 -> 1036977801 (0.16%)
cycles in affected programs: 68961096 -> 70600116 (2.38%)
helped: 1246
HURT: 2206
helped stats (abs) min: 1 max: 392022 x̄: 1040.28 x̃: 14
helped stats (rel) min: <.01% max: 56.44% x̄: 2.32% x̃: 0.38%
HURT stats (abs) min: 1 max: 68630 x̄: 1330.56 x̃: 18
HURT stats (rel) min: <.01% max: 69.97% x̄: 3.31% x̃: 0.61%
95% mean confidence interval for cycles value: 90.43 859.17
95% mean confidence interval for cycles %-change: 1.02% 1.54%
Cycles are HURT.
total spills in shared programs: 17805 -> 17457 (-1.95%)
spills in affected programs: 1202 -> 854 (-28.95%)
helped: 34
HURT: 31
total fills in shared programs: 20939 -> 20387 (-2.64%)
fills in affected programs: 2702 -> 2150 (-20.43%)
helped: 34
HURT: 31
LOST: 24
GAINED: 45
Ivy Bridge and earlier Intel GPUs had similar results. (Ivy Bridge shown)
total instructions in shared programs: 15515912 -> 15516757 (<.01%)
instructions in affected programs: 396569 -> 397414 (0.21%)
helped: 578
HURT: 858
helped stats (abs) min: 1 max: 9 x̄: 1.32 x̃: 1
helped stats (rel) min: 0.04% max: 3.70% x̄: 0.65% x̃: 0.65%
HURT stats (abs) min: 1 max: 11 x̄: 1.87 x̃: 1
HURT stats (rel) min: 0.08% max: 12.90% x̄: 0.95% x̃: 0.53%
95% mean confidence interval for instructions value: 0.47 0.70
95% mean confidence interval for instructions %-change: 0.24% 0.37%
Instructions are HURT.
total cycles in shared programs: 584395455 -> 584466352 (0.01%)
cycles in affected programs: 20346570 -> 20417467 (0.35%)
helped: 1192
HURT: 1896
helped stats (abs) min: 1 max: 4108 x̄: 123.27 x̃: 14
helped stats (rel) min: <.01% max: 37.20% x̄: 2.27% x̃: 0.46%
HURT stats (abs) min: 1 max: 3698 x̄: 114.89 x̃: 19
HURT stats (rel) min: <.01% max: 70.28% x̄: 3.02% x̃: 0.71%
95% mean confidence interval for cycles value: 10.75 35.16
95% mean confidence interval for cycles %-change: 0.73% 1.23%
Cycles are HURT.
LOST: 20
GAINED: 12
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9374 >
2021-03-04 22:50:53 +00:00
Kenneth Graunke
206495cac4
iris: Enable u_threaded_context
...
This implements most of the remaining u_threaded_context support. Most
of the heavy lifting was done in the previous patches which fixed things
up for the new thread safety requirements. Only a few things remain.
u_threaded_context support can be disabled via an environment variable:
GALLIUM_THREAD=0
On Felix's Tigerlake with the GPU at fixed frequency, enabling
u_threaded_context improves performance of several games:
- Civilization VI: +17%
- Shadow of Mordor: +6%
- Bioshock Infinite +6%
- Xonotic: +6%
Various microbenchmarks improve substantially as well:
- GfxBench5 gl_driver2: +58%
- SynMark2 OglBatch6: +54%
- Piglit drawoverhead: +25%
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:21 -08:00
Kenneth Graunke
c133d0930f
iris: Use thread safe slab allocators in transfer_map handling
...
pipe->transfer_map can be called from u_threaded_context's thread
rather than the driver thread. We need to use two different slab
allocators, one for each thread. transfer_unmap, on the other hand,
is only ever called from the driver thread.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:21 -08:00
Kenneth Graunke
1b1c857248
iris: Make various classes inherit from u_threaded_context base classes
...
u_threaded_context requires various objects to inherit from a new
threaded_foo base class rather than directly from pipe_foo. This
patch does most of the mechanical changes required for that.
It also initializes the new threaded_resource fields.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:21 -08:00
Kenneth Graunke
3358c7125a
iris: Use different shader uploaders for precompile vs. draw time
...
When we enable u_threaded_context, the pipe->create_*_state hooks
(precompile variants) are going to be called from one thread, while
iris_update_compiled_shaders (on-the-fly variants) are going to be
called from a driver thread. BLORP shaders also happen from
clear, blit, and so on in the driver thread.
u_upload_mgr isn't thread-safe, so use an uploader for each purpose.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:21 -08:00
Kenneth Graunke
ec0d61c14c
iris: Support rebinding of stream output targets
...
This enables us to replace the backing storage of resources that have
been used as stream output targets, in case we're invalidating their
entire contents. This can avoid stalls. We simply hadn't supported it
because it was going to be tricky to re-emit 3DSTATE_SO_BUFFER without
screwing up "reset offset to zero" vs. "keep appending". But that
should be working fine with the previous patch's refactor.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:21 -08:00
Kenneth Graunke
08e04ddd2c
iris: Rework zeroing of stream output buffer offsets
...
The previous mechanism was a bit fragile. We stored the zero offset
in the pre-baked packet, and used an flag to override 0xFFFFFFFF
(append) offsets until our first emit - then prohibited anyone from
trying to re-emit the packet by flagging IRIS_DIRTY_SO_BUFFERS,
because that would re-emit the version with the zeroing of the offset.
Now, we always store 0xFFFFFFFF in the pre-baked packet, and use a
flag to override it to zero on the first emit. That way, we can
re-emit that packet at any time, and it'll just keep appending.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:21 -08:00
Kenneth Graunke
e40fafa991
iris: Defer stream output target space allocation until set time
...
In the future, Marek is planning to make u_threaded_context call
create_stream_output_target() from a different thread than the main
driver thread, which means that we can't safely use uploaders there.
To prepare for this eventual future, just defer the allocation of
the offset BO 'til later. It's a very small amount of overhead.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:20 -08:00
Kenneth Graunke
5659460af4
iris: Defer uploading of surface states
...
With u_threaded_context, create_surface and create_sampler_view will
be called from a different thread than the driver thread. They aren't
allowed to access the context, which means that they can't use the
uploaders there to upload our SURFACE_STATE entries.
Thanks to backing-storage replacement and iris_rebind_buffer, we already
reworked things to maintain CPU-side copies of the SURFACE_STATE entries
and added the ability to upload or re-upload them later. So we can skip
the upload at object creation time, and add a simple resource-is-NULL
check at binding table upload time to ensure that they get uploaded by
the time we need them. (They might get uploaded earlier due to rebinds
or clear color updates, but this is the last moment to do so.)
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8964 >
2021-03-04 13:59:20 -08:00
Eric Anholt
3bdd39f03c
lima: avoid stomping over bound shader state when creating new shaders
...
It shouldn't affect bound program state, and the current context state
shouldn't be relevant for shader creation precompiles anyway (level load
isn't going to have the eventual set of sampler views bound when you go to
draw with that shader).
Closes : #4306
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9089 >
2021-03-04 18:34:35 +00:00
Eric Anholt
4ac3f85054
lima: upload the shader to a BO at shader creation
...
No need to conditionally upload later.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9089 >
2021-03-04 18:34:35 +00:00
Eric Anholt
5a550c8dc7
lima: don't look at dirty bits for setup of FS key
...
You always have to populate the key with the right texture swizzles, even
if textures haven't changed since binding a new shader.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9089 >
2021-03-04 18:34:35 +00:00
Eric Anholt
d4f706389c
lima: stop encoding the texture format in the shader key
...
We can compose the swizzles at sampler view creation time, saving
recompiles on texture format changes.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9089 >
2021-03-04 18:34:34 +00:00
Lionel Landwerlin
8023d6de20
anv: implement INTEL_DEBUG=submit
...
Name all the BOs!
v2: Fix 32bit build issue (Thanks Marge!)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5736 >
2021-03-04 19:46:24 +02:00
Rohan Garg
c6eb84ff30
virgl: Add support for querying detailed memory info
...
This allows for virgl guests to expose GL_NVX_gpu_memory_info and
GL_ATI_meminfo when the extensions are supported on the host.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9337 >
2021-03-04 17:14:14 +01:00
Jason Ekstrand
1e53e0d2c7
intel/mi_builder: Drop the gen_ prefix
...
mi_ is already a unique prefix in Mesa so the gen_ isn't really gaining
us anything except extra characters. It's possible that MI_ may
conflict a tiny bit with GenXML but it doesn't seem to be a problem
today and we can deal with that in the future if it's ever an issue.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9393 >
2021-03-04 15:14:27 +00:00
Jason Ekstrand
6d522538b6
intel: Rename gen_mi_builder.h to mi_builder.h
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9393 >
2021-03-04 15:14:27 +00:00
Danylo Piliaiev
7e25e5b56f
ir3: disallow moving memory writes over discard
...
Writes to global memory should not be moved over discard,
otherwise we could have unintended side-effects or lack of
side-effects where they should be observed.
Fixes tests:
dEQP-VK.rasterization.frag_side_effects.color_at_beginning.kill
dEQP-VK.rasterization.frag_side_effects.color_at_end.kill
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9365 >
2021-03-04 11:40:58 +00:00
Juan A. Suarez Romero
7b3b8524ef
ci: Bump deqp to vk-gl-cts 1.2.5.2
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9369 >
2021-03-04 11:09:35 +00:00
Danylo Piliaiev
72a9f315db
ir3: make mark_kill_path exit early if instr is already seen
...
Would bring down its complexity in pathological cases.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9386 >
2021-03-04 10:52:06 +00:00
Danylo Piliaiev
9dbb678f5a
ir3: prevent duplication of instruction's dependencies
...
Otherwise mark_kill_path() is happy to take exponential time to finish.
It was possible to have such chains:
...
stib.base0 imm[0.000000,0,0x0], ssa_233, ssa_234, false-deps:ssa_231, ssa_231
stib.base0 imm[0.000000,0,0x0], ssa_237, ssa_238, false-deps:ssa_235, ssa_235
stib.base0 imm[0.000000,0,0x0], ssa_241, ssa_242, false-deps:ssa_239, ssa_239
stib.base0 imm[0.000000,0,0x0], ssa_245, ssa_246, false-deps:ssa_243, ssa_243
stib.base0 imm[0.000000,0,0x0], ssa_249, ssa_250, false-deps:ssa_247, ssa_247
stib.base0 imm[0.000000,0,0x0], ssa_105, ssa_253, false-deps:ssa_251, ssa_251
stib.base0 imm[0.000000,0,0x0], ssa_109, ssa_256, false-deps:ssa_254, ssa_254
stib.base0 imm[0.000000,0,0x0], ssa_113, ssa_259, false-deps:ssa_257, ssa_257
stib.base0 imm[0.000000,0,0x0], ssa_117, ssa_262, false-deps:ssa_260, ssa_260
stib.base0 imm[0.000000,0,0x0], ssa_265, ssa_266, false-deps:ssa_263, ssa_263
stib.base0 imm[0.000000,0,0x0], ssa_269, ssa_270, false-deps:ssa_267, ssa_267
stib.base0 imm[0.000000,0,0x0], ssa_273, ssa_274, false-deps:ssa_271, ssa_271
...
Fixes tests:
dEQP-VK.geometry.layered.cube_array.36_36_12.secondary_cmd_buffer_inherit_framebuffer
dEQP-VK.geometry.layered.3d.64_64_8.secondary_cmd_buffer_inherit_framebuffer
dEQP-VK.geometry.layered.cube_array.64_64_12.secondary_cmd_buffer_inherit_framebuffer
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9386 >
2021-03-04 10:52:06 +00:00
Samuel Pitoiset
517600b4d5
Revert "radv: stop using VM_ALWAYS_VALID on APUs"
...
Disabling VM_ALWAYS_VALID actually hurts more than it helps
after doing more testing. Managing the global BO list in userspace
is really costly and make a bunch of games CPU bound.
I think re-enabling VM_ALWAYS_VALID is a step in the right direction.
This reverts commit 6ac6e2fbfb .
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/9341 >
2021-03-04 09:37:59 +00:00
Gert Wollny
e148d5ec99
r600/sfn: lower intrinsic_load_tess_coord to driver version
...
Fixes
KHR-GL45.tessellation_shader.tessellation_shader_tessellation.TCS_TES
KHR-GL45.tessellation_shader.tessellation_shader_tessellation.TES
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9373 >
2021-03-04 09:14:03 +00:00
Gert Wollny
81b41e0c76
nir: Add r600 specific intrinsic for loading the tesselation coords
...
Only the XY pair is provided directly, the Z value has to be deducted
from the primitive type.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9373 >
2021-03-04 09:14:03 +00:00
cheyang
6f4c4df6c2
virgl: add astc 2d compressed formats
...
Signed-off-by: cheyang <cheyang@bytedance.com >
Signed-off-by: hexin <hexin.op@bytedance.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9306 >
2021-03-04 09:03:47 +00:00
Iago Toral Quiroga
c3732ac0d0
broadcom/compiler: be more aggressive skipping unifa writes
...
We had an optimization in place to skip a unifa write if the address
happens to be right after the last ldunifa read address, but we can
take this further and update the unifa address by emitting ldunifa
instructions if needed to skip a unifa write that is close enough.
This is because a unifa write involves 4 cycles: 1 for the write
and 3 delay slots before we can emit the first ldunifa.
So if we have code like this:
unifa addr + 0
ldunifa.r0
unifa addr + 12
ldunifa.r1
In practice we end up with QPU like this:
unifa addr + 0
nop
nop
nop
ldunifa.r0
unifa addr + 12
nop
nop
nop
ldunifa.r1
And with this patch we get:
unifa addr + 0
nop
nop
nop
ldunifa.r0 <--- reads offset 0
ldunifa.- <--- reads offset 4
ldunifa.- <--- reads offset 8
ldunifa.r1 <--- reads offset 12
Of course, QPU scheduling might find ways to fill the NOPs to some
extent and remove some of the gains, but generally speaking, this is
still usually a win.
Going by shader-db results, allowing the next unifa address to be up
to 12 bytes after the address resulting from the last ldunifa read
shows the best results:
total instructions in shared programs: 13817048 -> 13812202 (-0.04%)
instructions in affected programs: 602701 -> 597855 (-0.80%)
helped: 1750
HURT: 760
Instructions are helped.
total uniforms in shared programs: 3795485 -> 3793200 (-0.06%)
uniforms in affected programs: 43930 -> 41645 (-5.20%)
helped: 898
HURT: 0
Uniforms are helped.
total max-temps in shared programs: 2326612 -> 2326621 (<.01%)
max-temps in affected programs: 651 -> 660 (1.38%)
helped: 10
HURT: 21
Inconclusive result (value mean confidence interval includes 0).
total sfu-stalls in shared programs: 30942 -> 30906 (-0.12%)
sfu-stalls in affected programs: 627 -> 591 (-5.74%)
helped: 186
HURT: 158
Inconclusive result (value mean confidence interval includes 0).
total inst-and-stalls in shared programs: 13847990 -> 13843108 (-0.04%)
inst-and-stalls in affected programs: 601404 -> 596522 (-0.81%)
helped: 1747
HURT: 757
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9384 >
2021-03-04 09:00:15 +01:00
Iago Toral Quiroga
2897a83ff8
broadcom/compiler: drop the destination for unused ldunifa
...
We can't remove unused ldunifa that are not the first or last
in a sequence, but we can still ignore their destination
to reduce register pressure.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9384 >
2021-03-04 09:00:15 +01:00
Timothy Arceri
9d1ef1595c
util/disk_cache: make MESA_DISK_CACHE_READ_ONLY_FOZ_DBS a relative path
...
Rather than passing in full paths this changes things so that we can
just pass in filenames relative to the current cache directory.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9279 >
2021-03-04 04:07:46 +00:00
Eric Anholt
a8423eb732
ci/turnip: Mark a flaky WSI test.
...
This one has flaked many times at this point, and I've even seen it flake
locally. No luck debugging it yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9397 >
2021-03-03 23:03:48 +00:00
Rob Clark
f8714b2852
freedreno: Remove dead-cells MBR workaround
...
With threaded-context we won't have a chance to apply the workaround in
the backend driver. But the previous commit moves it to a driconf
configured workaround in mesa/st, so we can drop this now.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9316 >
2021-03-03 22:47:59 +00:00
Rob Clark
e6f2e8b3fc
driconf: Add ignore_map_unsynchronized option
...
Add an option to workaround incorrect unsynchronized VBO updates in
Dead-Cells.
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4337
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9316 >
2021-03-03 22:47:59 +00:00
Mike Blumenkrantz
3c20b698e2
zink: rewrite macro for getting KHR device functions
...
we have the technology. we can improve our our lives with better macros.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9398 >
2021-03-03 17:27:22 -05:00
Rob Clark
910a2464cf
freedreno/a6xx: Fix compile warning
...
Fixes: 79921b81bc ("freedreno/a6xx: Document threadsize-related fields")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9394 >
2021-03-03 22:09:22 +00:00
Rob Clark
8642456472
freedreno: Deduplicate fixup_shader_state()
...
All the ir3 gens had the same thing, time to move it out into a shared
helper.
The keeping the storage in fdN_context is to avoid namespace clashes
between ir3 and ir2.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9394 >
2021-03-03 22:09:22 +00:00
Rob Clark
1611693977
freedreno/ir3: Add comments about shader key/gen
...
I had forgotton on which gens these where used on (which is important if
you need to know which shader stages use these).. expand the comments a
bit.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9394 >
2021-03-03 22:09:22 +00:00
Dave Airlie
bc02fc4823
clover: fix array images view creation
...
Found this on top of Karol's patches but it seems like it can just be
applied to master.
Helps with some cases of
kernel_image_methods/test_kernel_image_methods 2Darray
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9381 >
2021-03-03 21:59:22 +00:00
Eric Anholt
18be15ad16
ci/zink: Add another primitive restart flake.
...
This one flaked all the way to a run failure in a recent MR of mine.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9396 >
2021-03-03 21:49:41 +00:00
Eric Anholt
283a05ddc9
ci/a5xx: Update piglit expectations.
...
The mesa/st shader variants change fixed some fails for us.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9314 >
2021-03-03 21:05:39 +00:00
Eric Anholt
957132294f
ci/a5xx: Increase the gles3/31 coverage.
...
Now that there's more time available in our budget per board, we can run
all of gles31, and half of gles3, instead of 10%.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9314 >
2021-03-03 21:05:39 +00:00
Eric Anholt
1087bf16af
ci/a3xx: Run all of GLES3 dEQP.
...
We're not spending half our time booting any more, so run the other half.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9314 >
2021-03-03 21:05:39 +00:00
Eric Anholt
bb82efa792
ci/a5xx: Run all of gles2 in one job.
...
Now that we're not spending so much time on boot overhead, no need to
parallelize.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9314 >
2021-03-03 21:05:39 +00:00
Eric Anholt
bcdfee3bcd
ci/freedreno: Switch the fastboot boards to using nfsroot.
...
This saves time in packing the rootfs, allows for larger rootfses, and
avoids the need for webdav.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9314 >
2021-03-03 21:05:39 +00:00
Eric Anholt
5c89f6ed17
ci/freedreno: Also retest when only CI configuration changes.
...
Fixes: dab845d457 ("ci: Move specific driver testing to separate files in separate dirs.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9314 >
2021-03-03 21:05:39 +00:00
Eric Anholt
e2aff7425d
tgsi_exec: Jump over entirely non-taken THEN or ELSE branches.
...
TGSI has these nice labels for us for where to jump in this case, let's
use them. Improves piglit arb_shader_image_load_store-shader-mem-barrier
runtime massively, though not enough to make the test really reasonable to
run.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9347 >
2021-03-03 20:47:08 +00:00
Eric Anholt
3429c83f87
tgsi_exec: Roll the loops for condmask handling.
...
No need to hand-unroll this, the compiler will do it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9347 >
2021-03-03 20:47:08 +00:00
Ilia Mirkin
ac6aad3d59
i965: support GL_EXT_color_buffer_half_float
...
FP16 rendering is supported on all gen4 hardware.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9379 >
2021-03-03 20:37:03 +00:00
Antonio Caggiano
810c39b067
ci: Use lock file to build deqp-runner
...
Build deqp-runner with the `--locked` option to use dependencies
versions specified in `Cargo.lock`.
v2: Bump image tags.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Suggested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9368 >
2021-03-03 20:21:16 +00:00
Marek Olšák
a0cc0b3a15
ac/llvm: open code fpow on LLVM 12 using fmul.legacy
...
A quick look at the asm shows that this enables source modifiers
(neg, abs) for v_mul_legacy_f32.
Totals from affected shaders:
SGPRS: 110104 -> 110400 (0.27 %)
VGPRS: 57632 -> 57636 (0.01 %)
Spilled SGPRs: 66 -> 63 (-4.55 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 3290412 -> 3283068 (-0.22 %) bytes
Max Waves: 32141 -> 32141 (0.00 %)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9395 >
2021-03-03 20:06:09 +00:00
Marek Olšák
18c1c1404d
ac/llvm: add type parameter into ac_build_buffer_load to fix 16-bit TES inputs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9395 >
2021-03-03 20:06:09 +00:00
Marek Olšák
ed351b9a71
ac/llvm: fix visit_load_ubo_buffer to use SMEM for 16 bits instead of VMEM
...
This has 3 advantages:
- It's SMEM.
- Multiple single component loads are merged into 1 multi-dword load by LLVM.
- The result is always packed for packed instructions.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9395 >
2021-03-03 20:06:09 +00:00
Marek Olšák
46ce67a331
ac/llvm: implement 16-bit and 64-bit fpow correctly
...
LLVM converts to 32 bits and back for llvm.pow, so we can't use it.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9395 >
2021-03-03 20:06:09 +00:00
Marek Olšák
3475c79328
ac/llvm: add support for 16-bit source operands for samplers
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9395 >
2021-03-03 20:06:09 +00:00
Ian Romanick
c393ae9d84
nir/search: Constify instruction parameter to search helpers
...
The search helps must *never* modify the instruction passed in, so let
the compiler enforce this.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9378 >
2021-03-03 18:32:14 +00:00
Lionel Landwerlin
0f437e49c6
anv: fix missing general state pool in validation list
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 83fee30e85 ("anv: allow multiple command buffers in anv_queue_submit")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9388 >
2021-03-03 18:24:16 +00:00
Eric Anholt
f3f4a24549
ci/lava: Move the driver expectation files to the per-driver CI dir.
...
This will cause less retesting of other drivers when changing the dEQP
results for a driver.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9353 >
2021-03-03 18:08:11 +00:00
Eric Anholt
9f03ee7773
ci/lava: Move the per-driver gitlab-ci.yml to each driver.
...
Follow-up to !9139 , will cause less testing of other drivers when changing
the CI configuration for a single driver.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9353 >
2021-03-03 18:08:11 +00:00
Eric Anholt
27e0181523
ci: Move deqp-default-skips.txt back to .gitlab-ci/
...
Since we don't manually enumerate the drivers using it, we have to retest
all drivers when changing it (which basically never happens, anyway).
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9353 >
2021-03-03 18:08:11 +00:00
Samuel Pitoiset
578fc7dbbc
radv: fix RGP barrier layout transition for TC-compatible CMASK images
...
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/9390 >
2021-03-03 16:49:29 +00:00
Adam Jackson
69f3d3a29f
zink: Enable GL_EXT_depth_bounds_test
...
Available since Vulkan 1.0, and in fact already wired up, just not
advertised. It looks like we could make this dynamic state but this
works for now.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9371 >
2021-03-03 16:17:11 +00:00
Rhys Perry
21697082ec
radv: don't shrink image stores for The Surge 2
...
The game seems to declare the wrong format.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: e4d75c22 ("nir/opt_shrink_vectors: shrink image stores using the format")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4347
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9229 >
2021-03-03 14:18:37 +00:00
Rhys Perry
cbb5ed476c
nir/opt_shrink_vectors: add option to skip shrinking image stores
...
Some games declare the wrong format, so we might want to disable this
optimization in that case.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: e4d75c22 ("nir/opt_shrink_vectors: shrink image stores using the format")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9229 >
2021-03-03 14:18:37 +00:00
Danylo Piliaiev
4600dbc6cc
turnip: fix leak of tu_shader object during compute pipeline creation
...
tu_shader should be freed after pipeline is successfully created.
Fixes tests:
dEQP-VK.api.object_management.alloc_callback_fail.compute_pipeline
dEQP-VK.api.object_management.alloc_callback_fail_multiple.compute_pipeline
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9364 >
2021-03-03 10:41:29 +00:00
Samuel Pitoiset
b33792b794
radv: bump the initial SQTT buffer size to 32MB per SE
...
Most of the games need 32MB or more, but rarely less.
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/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
6813b52290
radv: trigger a new SQTT capture automatically after resizing the buffer
...
It's way better.
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/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
0a1e3cc1cb
radv: double the SQTT buffer size when it is resized
...
Computing the expected buffer size isn't reliable on GFX10+ because
DROPPED_CNTR returns weird results.
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/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
c0608bb083
ac/sqtt: fix determining if the trace is complete on GFX10+
...
DROPPED_CNTR isn't reliable and might still report non-zero if the
SQTT buffer isn't full. Checking if the number of written bytes by
the hw is equal to the SQTT buffer size seems reliable.
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/9367 >
2021-03-03 08:40:32 +01:00
Samuel Pitoiset
f4c4c0f207
radv: do not trace inactive shader engines with SQTT
...
This fixes a GPU hang on my Sienna because the number of SE is
less than the maximum, and SE #1 is disabled.
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/9370 >
2021-03-03 08:16:42 +01:00
Mike Blumenkrantz
bc5dcf1527
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9291 >
2021-03-03 01:37:02 +00:00
Mike Blumenkrantz
587d15ca6c
zink: use staging resource for write transfer_map in order to not stall
...
we can just give the user a staging resource and then flush the data back
later
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9291 >
2021-03-03 01:37:02 +00:00
Marek Olšák
db67d9c0d1
radeonsi: don't crash on NULL images in si_check_needs_implicit_sync
...
This fixes CTS test: KHR-GL46.arrays_of_arrays_gl.AtomicUsage
Fixes: bddc0e023c "radeonsi: fix read from compute / write from draw sync"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9361 >
2021-03-03 01:19:24 +00:00
Marek Olšák
f9e6c7a220
ac/llvm: fix ac_build_atomic_rmw with LLVM 13
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4383
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9361 >
2021-03-03 01:19:24 +00:00
Eric Anholt
8bd0cc1a5a
nir/vec_to_movs: Don't generate MOVs for undef channels.
...
This appeared in softpipe's image operations, since NIR always uses
4-component values for the coords, while the GLSL IR only has 2 components
for a 2D image (for example).
arb_shader_image_load_store-shader-mem-barrier (which times out in CI and
spends its time inside of tgsi_exec) was spending 4/51 of its instructions
on moving these undefs around.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9345 >
2021-03-03 00:51:44 +00:00
Eric Anholt
1e5ef4c60c
nir: Add a nir_src_is_undef() helper, like nir_src_is_const().
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9345 >
2021-03-03 00:51:44 +00:00
Mike Blumenkrantz
c77df59c9e
zink: export PIPE_CAP_TGSI_VS_LAYER_VIEWPORT
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9283 >
2021-03-02 17:42:00 -05:00
Mike Blumenkrantz
ffd046cf32
zink: enable PIPE_CAP_CLEAR_SCISSORED
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9283 >
2021-03-02 17:42:00 -05:00
Dave Airlie
abc724e440
lavapipe: sort bindings before creating descriptor set
...
This ensures the dynamic offsets are correct
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9359 >
2021-03-03 08:06:02 +10:00
Dave Airlie
0a939e788f
lavapipe: reorder descriptor set stages to get correct binding
...
The fragment stage was in the wrong place here.
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9359 >
2021-03-03 08:02:16 +10:00
Ian Romanick
7ca3e90c18
gallium/dri: Remove dri2_format_mapping::cpp
...
I was suspicious that some entries in dri2_format_table (in
dri_helpers.c) had this field set incorrectly. It seemed like
DRM_FORMAT_ABGR16161616F and DRM_FORMAT_XBGR16161616F should have been 8
instead of 4. Upon digging I found that nothing uses the field. Fix
code by removing it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9354 >
2021-03-02 19:42:04 +00:00
Karol Herbst
f0dccd9578
clover: Add missing include for llvm-12 build fix
...
Fixes: d1eab2b1eb ("clover: Fix build with llvm-12.")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9372 >
2021-03-02 19:35:40 +00:00
Mike Blumenkrantz
1294aec650
zink: apply only the pending zs clear bits during deferred clears
...
both bits will have been flagged at this point in order to indicate
that the aspects will be cleared "at some point" during the loop, but
when actually iterating through the pending clears, only the bits set
in the clear call should be applied
Fixes: 5c629e9ff2 ("zink: defer pipe_context::clear calls when not currently in a renderpass")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9366 >
2021-03-02 19:24:52 +00:00
Axel Davy
e891f039da
st/nine: Simplify checks for driconf options
...
Remove the useless driCheckOption calls. They always
succeed.
As a result the intended behaviour for thread_submit
was not working (different default depending on the gpu
used). Add a comment to fix that in the future.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:08 +01:00
Axel Davy
642e19dc44
driconf: Rename csmt_int back to csmt_force
...
Fixes regression introduced by
<https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6916 >
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
7a1a1fc5d9
st/nine: Fix leak at device destruction
...
At the release of the last object holding a reference
on the device, the device dtor was executed and
the objector dtor was ignored.
The proper way is to execute the object dtor, then
the device dtor.
The previous code was likely for a workaround against
something that was fixed since.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
d730f8d7a9
st/nine: Protect *PrivateData also for Volumes
...
*PrivateData functions were not protected by
a mutex for Volumes whereas they definitely
should.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
b383b1e01a
st/nine: Refactor ht_guid_delete
...
Have ht_guid_delete take a hash_entry.
As a result, we can use _mesa_hash_table_remove instead of
_mesa_hash_table_remove_key.
The previous code using the latter was incorrect as the key
of the entry was read after it was freed.
Fixes: https://github.com/iXit/wine-nine-standalone/issues/40
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
501ad0e134
st/nine: Add new debug and error checks
...
Add new debug messages and error checks
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
1a53099909
st/nine: Enable DF24 support
...
We can enable it, now that FETCH4 is
implemented.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
1357d2a60a
st/nine: Implement experimental FETCH4
...
FETCH4 is a feature that needs to be implemented
to advertise D3DFMT_DF24.
It's basically a variant of Gather4.
This first implementation will need to be completed
to implement the feature fully, but the feature
doesn't seem to be much used (other equivalent
features are preferred by games).
Note until DF24 is advertised, apps are not supposed to use
FETCH4.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
d097bdcc78
st/nine: Track formats compatible with FETCH4
...
FETCH4 is a d3d9 extension not much used, as newer
ones were prefered. However it's support is required
to advertise the DF24 format.
Prepares support by tracking compatible formats.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
6a3451e170
st/nine: Unmap buffers after full unlock
...
Do not unmap anything until all buffer unlocks
were received.
A buffer can be filled in several threads, and thus
in the case of double locks, it's not possible to know
which unlock is received first.
Thus only unmap the buffers when the last unlock is
received.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
3dd6b79215
st/nine: Clamp GetAvailableTextureMem
...
Previously we used to clamp "available_texture_limit",
which was incorrect. "available_texture_mem" should
have been clamped instead.
The resulting code was noop.
The idea behind that code was that 32 bits executable
would see maximum 4GB video memory.
However it seems according to users that 32 bits apps
should be able to allocate more than 4GB, thus the
clamping is inappropriate.
Instead clamp the return of GetAvailableTextureMem, to
correctly report a high value when there is more than
4GB available.
I do not know what should exactly be the clamp value,
for now have a 64MB margin below UINT_MAX.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
f85f025a05
st/nine: Do not allow depth buffer render targets
...
Without the proposed check, some apps will decide to use depth buffers
as render targets.
Bug found investigating:
https://github.com/iXit/wine-nine-standalone/issues/82
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Axel Davy
3dbc542f97
st/nine: Reduce system memory allocated by D3DUSAGE_AUTOGENMIPMAP
...
For D3DUSAGE_AUTOGENMIPMAP basically, everything behaves
for the application as if the texture had one level.
However the pipe_resource has more levels, and those
get generated automatically.
Previously we did allocate all the Surfaces as if
the texture had all the levels, except of just one.
The app could still just access the first level.
This patch completly removes the useless unaccessible
Surfaces.
In addition removes redundant handling of D3DUSAGE_AUTOGENMIPMAP.
Signed-off-by: Axel Davy <davyaxel0@gmail.com >
Acked-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9177 >
2021-03-02 20:07:07 +01:00
Gert Wollny
ec74a13618
r600/sfn: Update status
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
43816d20dd
r600: Enable GLSL 450 for nir shaders.
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
4d91812d3c
r600: Don't optimize using source modifiers on literals
...
The code improvement is limited and it interferes with using literals
directly in LDS index ops, since here source modifiers are not
supported, but the current assembler code might inject the modifiers.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
49b0e8657e
r600/sfn: Fix loading TES gl_PatchVerticesIn
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
bd57bf6d82
r600/sfn: handle querying the number of layers in cube arrays
...
This has to be loaded from a constant buffer instead of the actual
texture.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
935d9e6863
nir: disaallow reordering for r600 shared load and remove component field
...
The original shared load op can't be reordered, so it might be better to
also not allow this for the lowered variant.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
d1ccf4a0ee
r600/sfn: encode component in address for local IO
...
The backend code was actually assuming this, but the lowering still set
the components and write masks like it would be honoured.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
c0c025c870
r600/sfn: remove some old debug output
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
b07992c4dc
r600/sfn: remove unused emit_alu_op2_split_src_mods
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
ddc5c99402
r600/sfn: remove code for nir_op_fsign since it is lowered
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
4fe0339941
r600: unify nir shader options evaluation
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
04d8d455b7
r600/sfn: Allow any channel for the helper invocation evaluation
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
911c6af2fd
r600/sfn: lower isign and iabs in nir
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
7d94d759fa
r600/sfn: set info about using helper_invocation to skip sb
...
sb can't handle helper invocations, so skip sb when it is used.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Gert Wollny
c427ed7ffe
r600/sfn: Lower FS inputs to temps late and, and lower interpolate at
...
This fixes FS shaders where a var is loaded with two different
interpolators.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330 >
2021-03-02 18:46:17 +01:00
Jose Fonseca
3ba7784b1e
util: Always use timespec_get on Windows.
...
include/c11/threads_win32.h provides a fallback implementation of
timespec_get when necessary.
Fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/4109
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9280 >
2021-03-02 14:37:46 +00:00
Rhys Perry
3a72044ece
aco: add missing usable_read2 check
...
A Hitman 2 shader does: read64(local_invocation_index() * 4 - 4). This was
likely emitting a ds_read2_b32 on GFX6. For local_invocation_index()=0,
because the first dword was out-of-bounds, the second was likely also
considered out-of-bounds (even though it's not, at offset 0).
Likely fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/3882
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: 57e6886f98 ("aco: refactor load_lds to use new helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9332 >
2021-03-02 13:13:59 +00:00
Rhys Perry
941739619e
Revert "radv,aco: allow unaligned LDS access on GFX9+"
...
This reverts commit 1a0b0e8460 .
The bounds checking behaviour of ds_read_b64, ds_read_b96 and ds_read_b128
make this feature very difficult to use safely.
This fixes a blocking artifact in Hitman 2. Previously, it contained:
ds_read_b64(local_invocation_index() * 4 - 4)
For local_invocation_index()=0, the second dword would be considered
out-of-bounds, even though it's at offset 0.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9332 >
2021-03-02 13:13:59 +00:00
Iago Toral Quiroga
acbd4881c2
broadcom/compiler: ldvary pipelining tracking and documentation clean-ups
...
Now that we can pipeline all varyings we should not be referring
specifically to smooth varyings anywhere.
Also, rename the instruction field 'ldvary_pipelining' to
'is_ldvary_sequence', which is more appropriate, since we always
set this for any instruction involved with varying setups,
independently of whether they end up being pipelined or not.
This also does some other minor edits which intend to slightly
simplify the code and make it a bit more compact.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9363 >
2021-03-02 13:54:14 +01:00
Kenneth Graunke
a48151ffad
glsl/float64: Bump #version to 400
...
An earlier commit tried to make this shader compatible with GLSL 3.30,
but it requires, GL_ARB_gpu_shader_int64, which requires GLSL 4.00 and
GL 4.0 according to the extension spec. So we were failing to enable
the required extension, breaking compilation of this shader.
The original intention of that patch was to get this working on zink,
which at the time only supported GL 3.3. But now it supports later
OpenGL versions, so we don't need to do this any longer. Rather than
revert the patch and raise the version all the way back to 430, just
bump it to the require 400 at Ian Romanick's suggestion.
Fixes: 4d47b22bf0 ("glsl/float64: make this compatible with glsl 330")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3991
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9351 >
2021-03-02 09:30:24 +00:00
Karol Herbst
d1eab2b1eb
clover: Fix build with llvm-12.
...
Fix build error after LLVM commit c495dfe0268b ("[clang][cli] NFC:
Decrease the scope of ParseLangArgs parameters").
../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’:
../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector<std::__cxx11::basic_string<char> >&’
252 | c->getPreprocessorOpts(),
| ~~~~~~~~~~~~~~~~~~~~~~^~
| |
| clang::PreprocessorOptions
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8543 >
2021-03-02 09:16:53 +00:00
Iago Toral Quiroga
05f8efbc2c
broadcom/compiler: allow pipelining of flat and noperspective varyings
...
These end up having a NOP between the ldvary and the next instruction
in the sequence (a MOV for flat and an FADD for noperspetive):
nop ; nop ; ldvary.r0
nop ; nop
fadd rf6, r0, r5 ; nop ; ldvary.r1
nop ; nop
fadd rf5, r1, r5 ; nop ; ldvary.r2
nop ; nop
fadd rf4, r2, r5 ; nop ; ldvary.r3
To pipeline these, we can reuse the same infrastructure we have in
place for smooth varyings but we need to avoid breaking the sequence
due to the NOP instruction. We do that by testing if dropping the
sequence when we failed to pick up the next instruction also fails
to choose an instruction.
This is not perfect, because we may be able to choose an instruction
outside the sequence such as an ldunif, and use that to break a
sequence that we could otherwise continue after scheduling the NOP
instruction, but it is still better than nothing.
total instructions in shared programs: 13820690 -> 13819774 (<.01%)
instructions in affected programs: 64026 -> 63110 (-1.43%)
helped: 479
HURT: 62
Instructions are helped.
total max-temps in shared programs: 2326435 -> 2326423 (<.01%)
max-temps in affected programs: 102 -> 90 (-11.76%)
helped: 7
HURT: 0
Max-temps are helped.
total sfu-stalls in shared programs: 30683 -> 30710 (0.09%)
sfu-stalls in affected programs: 13 -> 40 (207.69%)
helped: 2
HURT: 24
Sfu-stalls are HURT.
total inst-and-stalls in shared programs: 13851373 -> 13850484 (<.01%)
inst-and-stalls in affected programs: 62818 -> 61929 (-1.42%)
helped: 466
HURT: 65
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304 >
2021-03-02 07:56:00 +01:00
Iago Toral Quiroga
1784dd22a3
broadcom/compiler: pipeline smooth ldvary sequences
...
Typically, we would schedule smooth varyings like this:
nop ; nop ; ldvary.r4
nop ; fmul r0, r4, rf0
fadd rf13, r0, r5 ; nop ; ldvary.r1
nop ; fmul r2, r1, rf0
fadd rf12, r2, r5 ; nop ; ldvary.r3
nop ; fmul r4, r3, rf0
fadd rf11, r4, r5 ; nop ; ldvary.r0
where we pair up an ldvary with the fadd of the previous sequence
instead of the previous fmul. This is because ldvary has an implicit
write to r5 which is read by the fadd of the previous sequence, so
our dependency tracking doesn't allow us to move the ldvary before the
fadd, however, the r5 write of the ldvary instruction happens in the
instruction after it is emitted so we can actually move it to the fmul
and the r5 write would still happen in the same instruction as the fadd,
which is fine.
This patch allows us to pipeline these sequences optimally. For that,
after merging an ldvary into a previous instruction in the middle of
a pipelineable ldvary sequence, we check if we can manually move it
to the last scheduled instruction instead (the one before the
instruction we are currently scheduling).
If we are successful at moving the ldvary to the previous instruction,
then we flag the ldvary as scheduled immediately, which may promote
its children (the follow-up fmul instruction for that ldvary) to DAG
heads and continue the merge loop so that fmul can be picked and
merged into the final fadd of the previous sequence (where we had
originally merged the ldvary). This leads to a result that looks like
this:
nop ; nop ; ldvary.r4
nop ; fmul r0, r4, rf0 ; ldvary.r1
fadd rf13, r0, r5 ; fmul r2, r1, rf0 ; ldvary.r3
fadd rf12, r2, r5 ; fmul r4, r3, rf0 ; ldvary.r0
Shader-db results:
total instructions in shared programs: 14071591 -> 13820690 (-1.78%)
instructions in affected programs: 7809692 -> 7558791 (-3.21%)
helped: 41209
HURT: 4528
Instructions are helped.
total max-temps in shared programs: 2335784 -> 2326435 (-0.40%)
max-temps in affected programs: 84302 -> 74953 (-11.09%)
helped: 4561
HURT: 293
Max-temps are helped.
total sfu-stalls in shared programs: 31537 -> 30683 (-2.71%)
sfu-stalls in affected programs: 3551 -> 2697 (-24.05%)
helped: 1713
HURT: 750
Sfu-stalls are helped.
total inst-and-stalls in shared programs: 14103128 -> 13851373 (-1.79%)
inst-and-stalls in affected programs: 7820726 -> 7568971 (-3.22%)
helped: 41411
HURT: 4535
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304 >
2021-03-02 07:56:00 +01:00
Iago Toral Quiroga
1d021539a2
broadcom/compiler: track pipelineable ldvary sequences
...
If we have two (or more) smooth varyings like this:
nop t3; ldvary.rf0
fmul t5, t3, t0
fadd t6, t5, r5
nop t7; ldvary.rf0
fmul t9, t7, t0
fadd t10, t9, r5
nop t11; ldvary.rf0
fmul t13, t11, t0
fadd t14, t13, r5
We may be able to pipeline them like this:
nop ; nop ; ldvary.r4
nop ; fmul r0, r4, rf0 ; ldvary.r1
fadd rf13, r0, r5 ; fmul r2, r1, rf0 ; ldvary.r3
fadd rf12, r2, r5 ; fmul r4, r3, rf0 ; ldvary.r0
But in order to do this, we will need to manually tweak the
QPU scheduling.
This patch tracks information about ldvary sequences that are
good candidates for pipelining, and a follow-up patch will
use this information to pipeline them when we emit the QPU
code.
v2 (apinheiro):
- Rename the v3d_compile fields to avoid confusion with the qinst fields.
- Assert that a sequence's start instruction is not the same as the end.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304 >
2021-03-02 07:56:00 +01:00
Iago Toral Quiroga
c2c2cdc3d3
broadcom/compiler: fix indentation style
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304 >
2021-03-02 07:56:00 +01:00
Iago Toral Quiroga
b41edee879
broadcom/compiler: fix DAG pre-remove for merged instructions
...
When selecting an instruction to merge, we want to pre-remove that
instruction from the DAG, not the one we are merging it in, which
we had already pre-removed right before.
The reason this was not causing problems before is that the
consequence of this bug is we will choose the same instruction
again in the merge loop and trying to merge that instruction twice
will fail and we would break out of the merge loop and move on.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304 >
2021-03-02 07:56:00 +01:00
Tapani Pälli
fd7d34f716
anv: toggle on sample shading if it is set in the shader
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4300
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9040 >
2021-03-02 06:19:09 +00:00
Jordan Justen
18bc7d9d3f
intel: Use devinfo genx10 field
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329 >
2021-03-01 22:00:08 -08:00
Jordan Justen
d846901d9d
intel/dev: Add devinfo genx10 field
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329 >
2021-03-01 22:00:08 -08:00
Jordan Justen
36dd7c44f6
intel: Use GEN_VERSIONx10 in more places
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329 >
2021-03-01 22:00:08 -08:00
Eleni Maria Stea
adc575dbf6
iris: fix in fences backend for ext_external_objects edge case
...
EXT_external_objects require we call glSignalSemaphoreEXT followed by a
glFlush. If the rendering workload is small when Signal and Flush
take place the relevant batch buffers with the actual rendering might
have been submitted already. In that case the following condition is met:
(iris_batch_bytes_used(batch) == 0). This causes:
glFlush() --> iris_fence_flush() -> iris_batch_flush() ->
_iris_batch_flush() to no-op, and so the fence doesn't get submitted to the
kernel. Then when anv tries to submit an execuf2 that must wait on the
shared VkSempahore / drm_syncobj fence, there isn't one and the kernel
rejects the batchbuffer causing an -EINVAL return of the execbuf2 ioctl
and a VK_DEVICE_LOST error. Empty batch buffers do have typically one
fence attached, but the ones carrying the extra fence from a
glSignalSempahore() call do have at least 2.
See also: the discussion in MR!4337.
v2: Changed the batch struct to have a contains_fence_signal variable
that is set to true when i915_EXEC_FENCE_SIGNAL fence is added to the
batch and off when batch is reset (Tapani Pälli)
Authored-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8861 >
2021-03-02 05:47:06 +00:00
Timothy Arceri
7186da8e38
util/disk_cache: move cache tests to the util directory
...
The cache has been detangled from glsl and used outside it (with Vulkan drivers)
for years now.
This also cleans up the dependancies in the build file. The test doesn't
depend on the glsl lib but rather the util lib.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9327 >
2021-03-02 02:39:05 +00:00
Dave Airlie
20bd9fc547
lavapipe: VK_EXT_extended_dynamic_state support
...
zink can use this in some paths, and it's not a crazy thing to support
for lavapipe.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9328 >
2021-03-02 01:30:19 +00:00
Marek Olšák
c97ebe1461
radeonsi: don't index si_context::shaders with enum gl_shader_stage
...
Fixes: a8373b3d38 "radeonsi: store si_context::xxx_shader members in union"
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9313 >
2021-03-02 01:14:44 +00:00
Dave Airlie
a0b7e3d83e
lavapipe: Define supported extensions in C
...
One less python generator, like anv/radv
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9075 >
2021-03-02 10:46:32 +10:00
Dave Airlie
6cbc5ac1c1
lavapipe: expose a 1.0 vulkan API for now.
...
lavapipe doesn't have all 1.1 features yet, just return
the baseline 1.0 API always.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9075 >
2021-03-02 10:46:25 +10:00
Dave Airlie
548e41aed1
zink/instance: work with vulkan 1.0 and later loader.
...
If zink is meant to work against Vulkan 1.0 API then it
should expose the 1.0 API as create time as well as always
ask for all the vulkan 1.0 extensions.
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/9075 >
2021-03-02 10:46:04 +10:00
Mike Blumenkrantz
3054921a8d
mesa/st: even better no-oping for clears
...
<imirkin> zmike: re 6a8c51dc5a -- couldn't minx be > maxx after the clamping? in nouveau i did >= for the bail condition
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9350 >
2021-03-01 22:42:30 +00:00
Mike Blumenkrantz
6782f50902
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9276 >
2021-03-01 22:12:15 +00:00
Mike Blumenkrantz
37ad6bfcd8
zink: handle GLSL_SAMPLER_DIM_EXTERNAL in ntv
...
this fixes most of the tests that use it
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9276 >
2021-03-01 22:12:15 +00:00
Kenneth Graunke
cb3dad8ca4
tnl: Call _mesa_matrix_analyse to make sure the inverse MVP is updated
...
A recent commit stopped updating the inverse MVP matrix, because usually
only GLSL built-ins need it. However, TNL also needs it. So make sure
it's correct when needed.
Fixes: 10371c520c ("mesa: don't compute the ModelView * Projection matrix if not used")
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9346 >
2021-03-01 21:11:47 +00:00
Mauro Rossi
1cd3b57db8
android: driconf: Generate a static table when no xmlconfig
...
Fixes the following building error:
FAILED: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_util_intermediates/xmlconfig.o
...
external/mesa/src/util/xmlconfig.c:1030:12: fatal error: 'driconf_static.h' file not found
^~~~~~~~~~~~~~~~~~
1 error generated.
Fixes: a6b0ceb ("driconf: Generate a static table when no xmlconfig")
Acked-by: Rob Clark <robclark@freedesktop.org >
Tested-by: Marijn Suijten <marijn.suijten@somainline.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9294 >
2021-03-01 20:52:28 +00:00
Mauro Rossi
38d5dc9400
driconf: avoid Non-ASCII character error in driconf_static.py
...
MR to move to python3 in Android build gen rules is still pending
The change is to avoid following building error:
FAILED: out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_util_intermediates/driconf_static.h
/bin/bash -c "/usr/bin/python external/mesa/src/util/driconf_static.py external/mesa/src/util/00-mesa-defaults.conf > out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_util_intermediates/driconf_static.h"
File "external/mesa/src/util/driconf_static.py", line 2
SyntaxError: Non-ASCII character '\xc2' in file external/mesa/src/util/driconf_static.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Fixes: a6b0ceb ("driconf: Generate a static table when no xmlconfig")
Acked-by: Rob Clark <robclark@freedesktop.org >
Tested-by: Marijn Suijten <marijn.suijten@somainline.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9294 >
2021-03-01 20:52:28 +00:00
Jesse Natalie
eb27db8681
d3d12: Handle null constant buffers
...
RuneScape ends up hitting this path, and it's easy enough to get
some well-defined behavior instead of a crash.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9342 >
2021-03-01 20:42:58 +00:00
Mike Blumenkrantz
6a8c51dc5a
mesa/st: no-op scissored clear calls with size zero
...
Wx0 and 0xH should result in no-ops in the driver, so they can just
become no-ops before they reach the driver to save some validation later
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9344 >
2021-03-01 20:27:17 +00:00
Mike Blumenkrantz
c5e72eb09d
mesa/st: clamp scissored clear regions to fb size
...
these should never be larger than the fb and drivers shouldn't have to
care about it
Fixes: 1c8bcad81a ("gallium: add pipe cap for scissored clears and pass scissor state to clear() hook")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9344 >
2021-03-01 20:27:17 +00:00
Rob Clark
d7c38af3da
freedreno/a6xx: Fix uncompressed resource vs stale CSO
...
A sequence like:
1) create sampler view CSO with UBWC resource
2) later create another sampler view or image view with the same
resource, but a format that triggers demoting the resource to
uncompressed
3) bind CSO created in step #1
would not work correctly, because the CSO created in step #1 is still
setup for UBWC, despite the fact that the resource had been demoted to
uncompressed.
Fortunately this is easy enough to detect, as the resource's seqno would
have been updated.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9321 >
2021-03-01 20:01:07 +00:00
Rob Clark
73f70d9b5f
freedreno/a6xx: Always pass ctx to fd6_emit_textures()
...
Prep for next patch.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9321 >
2021-03-01 20:01:07 +00:00
Mike Blumenkrantz
21082b4529
zink: force batch flush if batches are using more than 1/10 total system memory
...
this is only tracking memory used by resources referenced in the batch, but it
can be adjusted a bit if we see that we're flushing too often
fixes spec@!opengl 1.1@streaming-texture-leak hogging all system memory and ooming
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9274 >
2021-03-01 19:36:26 +00:00
Mike Blumenkrantz
330b5b351b
zink: track resource mem usage per batch
...
we want to be able to track this so we can check whether a given batch is
going wild with memory usage for resources that might be pending free once
the batch finishes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9274 >
2021-03-01 19:36:26 +00:00
Mike Blumenkrantz
6a3e340288
zink: store total memory size on zink_screen
...
need this for oom handling
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9274 >
2021-03-01 19:36:26 +00:00
Juan A. Suarez Romero
e0b0507635
ci/broadcom: retry always when serial log timeout
...
So far we were retrying the testing (through device rebooting) if we did
not detect the boot sequence.
But found a couple of times that the serial log can also be "lost"
during the testing process. In all those times a manual retry of the job
was enough to complete the test.
Thus, let's apply the retry once automatically in this case.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9335 >
2021-03-01 18:22:24 +00:00
Juan A. Suarez Romero
e45d372968
ci/baremetal: highlight message errors
...
Highlight in red errors from the baremetal run, so user is more aware of
what happened.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9335 >
2021-03-01 18:22:24 +00:00
Samuel Pitoiset
97925cee8d
radv: remove useless decompression of the DS resolve attachment
...
The DS resolve attachment is the destination attachment, it doesn't
need to be decompressed before resolving the depth/stencil attachment.
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/9256 >
2021-03-01 18:10:35 +00:00
Rhys Perry
812dd9c9f6
nir/copy_prop: use nir_{instr,if}_rewrite_{src,condition}_ssa
...
Compile-time (nir_copy_prop):
Difference at 95.0% confidence
-2470.88 +/- 19.8762
-35.7461% +/- 0.247259%
(Student's t, pooled s = 23.4747)
Compile-time (overall):
Difference at 95.0% confidence
-2175.72 +/- 178.786
-1.73627% +/- 0.140826%
(Student's t, pooled s = 211.155)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784 >
2021-03-01 17:38:10 +00:00
Rhys Perry
c2209d836c
nir/copy_prop: visit copies instead of sources
...
There are less copy instructions than sources, so instead of visiting each
source and rewriting it if it's uses a copy instruction, visit each copy
instruction and rewrite it's users.
Besides improving compile time, this also has a side effect of fixing a
rare situation where copy-propagation does not happen:
loop {
a = phi ..., b
c = vec ...
b = mov c.y
}
It might have been the case that a phi source could not be rewritten until
the copy was visited later.
Compile-time (nir_copy_prop):
Difference at 95.0% confidence
-2613.13 +/- 15.2094
-27.4333% +/- 0.150247%
(Student's t, pooled s = 17.963)
Comple-time (overall):
Difference at 95.0% confidence
-2627.89 +/- 201.557
-2.05404% +/- 0.156221%
(Student's t, pooled s = 238.048)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784 >
2021-03-01 17:38:10 +00:00
Rhys Perry
41125bff4f
nir/copy_prop: remove unused copies
...
These were hurting performance of other passes.
Compile-time (overall):
Difference at 95.0% confidence
-5496.3 +/- 219.752
-4.11912% +/- 0.160285%
(Student's t, pooled s = 259.538)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784 >
2021-03-01 17:38:10 +00:00
Rhys Perry
ed9c3c4f19
nir: add nir_ssa_def_is_unused()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784 >
2021-03-01 17:38:10 +00:00
Italo Nicola
0d80dc1588
pan/mdg: prevent csel_v from being scheduled alongside writeout
...
Midgard writeout arguments need to be written to in the same bundle the
writeout happens. Both csel, csel_v and their float variants also
require their conditional to be performed on the same bundle.
This patch prevents scheduling csel the same bundle as a writeout,
fixing the scheduling issue.
But... there's still room for optimizations since in some cases it might
be possible to fit all these instructions in the same bundle.
No shader-db changes.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9340 >
2021-03-01 17:24:06 +00:00
Alyssa Rosenzweig
4f969d796d
panfrost/lcra: Fix constraint counting
...
We need to iterate the whole row, we can't be clever and only look at
one side, the symmetry doesn't work like that. See the original paper.
total instructions in shared programs: 69392 -> 69322 (-0.10%)
instructions in affected programs: 9002 -> 8932 (-0.78%)
helped: 82
HURT: 28
Instructions are helped.
total bundles in shared programs: 32225 -> 32155 (-0.22%)
bundles in affected programs: 4286 -> 4216 (-1.63%)
helped: 82
HURT: 28
Bundles are helped.
total quadwords in shared programs: 56102 -> 56102 (0.00%)
quadwords in affected programs: 0 -> 0
helped: 0
HURT: 0
total registers in shared programs: 4552 -> 4572 (0.44%)
registers in affected programs: 298 -> 318 (6.71%)
helped: 18
HURT: 38
Registers are HURT.
total threads in shared programs: 3772 -> 3775 (0.08%)
threads in affected programs: 84 -> 87 (3.57%)
helped: 15
HURT: 14
Inconclusive result (value mean confidence interval includes 0).
total spills in shared programs: 0 -> 0
spills in affected programs: 0 -> 0
helped: 0
HURT: 0
total fills in shared programs: 0 -> 0
fills in affected programs: 0 -> 0
helped: 0
HURT: 0
Fixes: 66ad64d73d ("pan/midgard: Implement linearly-constrained register allocation")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9338 >
2021-03-01 17:09:58 +00:00
Mike Blumenkrantz
0c18454e8b
zink: track all framebuffers per batch
...
now that 1 batch != 1 renderpass, this needs to be a set
Fixes: 1cb3015a31 ("zink: just end the current renderpass in zink_batch_no_rp()")
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9298 >
2021-03-01 16:59:24 +00:00
Mike Blumenkrantz
b9cb1cae43
zink: handle null src for fb refs
...
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9298 >
2021-03-01 16:59:24 +00:00
Mike Blumenkrantz
4db4616bd1
zink: add more usage bits for buffer resource creation
...
gallium doesn't give us enough info here, so yolo
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9197 >
2021-03-01 16:48:17 +00:00
Mike Blumenkrantz
b2cf50ed6d
zink: don't start renderpasses during descriptor update
...
this is unnecessary
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9292 >
2021-03-01 16:37:08 +00:00
Bas Nieuwenhuizen
ff99faf0cf
radv: Add nodisplaydcc option.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9318 >
2021-03-01 14:42:41 +00:00
Bas Nieuwenhuizen
3c9452c3ae
radv: Add sam option.
...
So that people without large BAR can try this out.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9318 >
2021-03-01 14:42:41 +00:00
Iago Toral Quiroga
8a60bde0cf
v3dv: fix branching to large secondaries with more than one BCL buffer.
...
Fixes:
dEQP-VK.api.command_buffers.record_many_draws_secondary_*
Tested-by: Juan A. Suarez <jasuarez@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9333 >
2021-03-01 15:16:45 +01:00
Bas Nieuwenhuizen
0360ecac73
radv: Enable linear sampling for depth textures.
...
Turns out there are CTS tests.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4258
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9319 >
2021-03-01 13:14:09 +00:00
Samuel Pitoiset
56bff270fe
radeonsi,radv: do not overallocate the SQTT buffer size
...
The number of shader engines isn't always 4.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9307 >
2021-03-01 13:13:36 +01:00
Samuel Pitoiset
24f015eddc
Revert "radv: do not overallocate the SQTT buffer"
...
This fixes computing the thread trace data offset.
This reverts commit c7e6f4ff3d .
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9307 >
2021-03-01 13:09:15 +01:00
Samuel Pitoiset
6b53f7f969
radv: exclude perf counters for SQTT also on GFX10.3
...
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/9300 >
2021-03-01 11:20:19 +00:00
Samuel Pitoiset
859dbf953d
radv: fix exporting SQTT pipelines with LLVM
...
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/9300 >
2021-03-01 11:20:19 +00:00
Samuel Pitoiset
d26bcc0f5c
radv: always select the first active CU when profiling with SQTT
...
This probably fixes instruction tracing on many chips.
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/9300 >
2021-03-01 11:20:19 +00:00
Samuel Pitoiset
b511bf262d
radv: remove duplicate REG_INCLUDE_CONTEXT setting for SQTT
...
It was set twice.
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/9300 >
2021-03-01 11:20:19 +00:00
Andreas Bergmeier
b4772d15ab
v3dv: Output a message if file open fails in physical_device_init
...
In the caller, this error simply gets mapped to VK_ERROR_INIT[...].
Especially for users it is very valuable to know what the driver
tried and what kind of failure occured. Thus just straight out log
to stderr.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9317 >
2021-03-01 09:25:21 +00:00
Tapani Pälli
55e23f32c3
gitlab-ci: bump piglit commit for windows
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8520 >
2021-03-01 08:23:58 +00:00
Tapani Pälli
2683e3b241
mesa: add check that non base level attachment is mipmap complete
...
Patch adds a check for mipmap completeness of framebuffer object texture
attachments. Since a glTexImage call might have updated miplevels
meanwhile, we test the completeness before setting framebuffer object
incomplete.
Fixes some upcoming framebuffer completeness CTS tests that explicitly
test case where we have mipmap incomplete non base level texture which
should make also framebuffer object incomplete. After update to the
texture it should make framebuffer object complete again.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8520 >
2021-03-01 08:23:58 +00:00
Jordan Justen
a1e9a5d653
i965: Call util_cpu_detect() early in screen creation
...
This helps to avoid this assertion in debug builds:
src/util/u_cpu_detect.h:116: util_get_cpu_caps: Assertion `util_cpu_caps.nr_cpus >= 1' failed.
Fixes: a9618e7c42 ("util: Add accessor for util_cpu_caps")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9325 >
2021-02-28 23:12:00 -08:00
Greg V
09bddd6ceb
meson: Add missing lavapipe dep
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7620 >
2021-03-01 09:03:29 +10:00
Bas Nieuwenhuizen
f96a8c7819
frontends/va: Use correct size for secondary planes.
...
And initialize the whandle format while at it.
Fixes: f7a4051b83 ("radeonsi: Check pitch and offset for validity.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4126
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9236 >
2021-02-28 18:35:41 +00:00
Simon Ser
364857ffe8
radeonsi/uvd: make format modifiers-aware
...
When format modifiers are supported, use
resource_create_with_modifiers instead of resource_create. This
allows radeonsi to set the modifier field, and allows VA-API
clients to have a proper modifier instead of
DRM_FORMAT_MOD_INVALID.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9308 >
2021-02-28 18:21:29 +00:00
Pierre Moreau
f1207229f9
docs/features: Add OpenCL status
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/142
Signed-off-by: Pierre Moreau <dev@pmoreau.org >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4979 >
2021-02-28 14:59:30 +00:00
Andres Gomez
3d3f21f0be
ci: add libdrm to the x86_test-vk container
...
Fixes: 5d0ba8b183 (ci: Split building of libdrm to its own script)
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9102 >
2021-02-28 12:51:14 +02:00
Andrii Simiklit
39ea95330f
mesa: ensure parameter list capacity before associating uniform storage
...
We have to reserve at lease 16 program parameters in storage to
avoid its reallocation.
v2: move allocation to `st_deserialise_ir_program` and add helper for that
( Eric Anholt <eric@anholt.net > )
v3 amend comments a bit
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4352
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9282 >
2021-02-28 05:55:50 +00:00
Lionel Landwerlin
0a7224f3ff
anv: group as many command buffers into a single execbuf
...
When semaphores are not involved, try to batch things up as much as
possible across VkSubmitInfo and also batch command buffers within a
VkSubmitInfo.
v2: Reuse anv_cmd_buffer_is_chainable()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371 >
2021-02-27 17:14:25 +02:00
Lionel Landwerlin
83fee30e85
anv: allow multiple command buffers in anv_queue_submit
...
v2: Fixup crash spotted by Mark about missing alloc vfuncs
v3: Fixup double iteration over device->memory_objects (that ought to
be expensive...) (Ken)
v4: Add more asserts for non-softpin cases (Ken)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371 >
2021-02-27 17:13:32 +02:00
Lionel Landwerlin
882fc72442
anv: end command buffer with a potential jump
...
We would like to chain multiple primary command buffer to be submitted
together to i915. For prepare this, add end the command buffers with a
MI_BATCH_BUFFER_START and at submit time, replace it with
MI_BATHC_BUFFER_END if needed.
v2: Don't even consider non softpin platforms
v3: Fix inverted condition
v4: Limit is_chainable() to checking device->use_softpin (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371 >
2021-02-27 13:29:07 +02:00
Lionel Landwerlin
8446f4733f
anv: track the end of the command buffers
...
Where MI_BATCH_BUFFER_END is recorded.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371 >
2021-02-27 13:29:07 +02:00
Lionel Landwerlin
38f6c09086
anv: make use of new helper function directly in anv_QueueSubmit()
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371 >
2021-02-27 13:29:06 +02:00
Bas Nieuwenhuizen
f67259d83b
radv: Expose robustBufferAccessUpdateAfterBind correctly.
...
We do support it.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4351
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9281 >
2021-02-26 23:53:52 +00:00
Marek Olšák
f8c4c46cd3
mesa: skip a subset of _mesa_update_state if no relevant flags are set
...
We only need to check 12 out of 32 flags.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
ebef43e248
mesa: don't update tnl spaces on irrelevant _NEW_POINT/TEXTURE_STATE changes
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
ed37c4d350
mesa: don't update the fixed-func frag prog on irrelevant _NEW_COLOR changes
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
944e6274d6
mesa: don't update fixed-func programs on irrelevant _NEW_RENDER_MODE changes
...
The fixed-func vertex program uses it too, which was ignored. This commit
fixes it.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
6302ffeda4
mesa: don't update fixed-func programs on irrelevant _NEW_FOG changes
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
15580e85cc
mesa: don't update fixed-func programs on irrelevant _NEW_POINT changes
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
9fa766adbe
mesa: don't update fixed-func vert prog on irrelevant _NEW_TRANSFORM changes
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
ec978e002f
mesa: only update fixed-func programs on texture matrix enablement changes
...
This should reduce fixed-func program key recomputations.
I also update the fixed-func fragment program, which was incorrectly
ignored because it's clearly used there.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
10c75ae41c
mesa: move _mesa_update_pixel out of _mesa_update_state
...
This only has to be called in a few places and not in normal draw calls.
egl_image_target_texture doesn't call _mesa_update_pixel because it only
assigns an EGL image to a texture object.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
93c74193fc
mesa: be precise about when to set _NEW_CURRENT_ATTRIB and _NEW_MATERIAL
...
This commit fixes _mesa_update_color_material, which allows cleaning up
the unnecessary state flagging.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
1e18754200
vbo: don't call update_color_material in copy_to_current if it's a no-op
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
c0a893543d
vbo: optimize copy_to_current functions
...
- execute vbo_set_vertex_format in a separate skipable conditional block
- replace dmul with dmul_shift
- don't check <= VBO_ATTRIB_MAT_BACK_INDEXES because there is no attrib
above that
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
e29a466bc2
mesa: merge STATE_LIGHT_ATTENUATION and STATE_LIGHT_POSITION_* parameters
...
This decreases the CPU time spent in fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
272acbed0e
mesa: merge STATE_LIGHTPROD parameters
...
This decreases the CPU time spent in fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
7df3d58f46
mesa: sort state parameters for ffvp to enable better parameter merging
...
_mesa_optimize_state_parameters will benefit from this.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
8dd4adc1e5
mesa: remove the fixed-func vert prog dependency on all texture states
...
Just flag _NEW_FF_VERT_PROGRAM where needed. There are only a few places
that must do it.
Also do the same with _NEW_FF_FRAG_PROGRAM, but this is not sufficient
for the ff frag prog to ignore texture states.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
06a8f852f7
mesa: don't push/pop ctx->Texture._* derived states
...
They are always recomputed by _mesa_update_state, which will need the old
values, so that it can update other dependent states if needed.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
0dd87304ef
mesa: remove _NEW_LIGHT_FF_PROGRAM in favor of _NEW_FF_(VERT|FRAG)_PROGRAM
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
abd57010f3
mesa: remove _NEW_VARYING_VP_INPUTS in favor of _NEW_FF_(VERT|FRAG)_PROGRAM
...
This adds _NEW_FF_FRAG_PROGRAM.
_mesa_set_varying_vp_inputs flags both fixed-func programs because both use
the state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
8e56ad6fae
mesa: don't update derived material values in _mesa_update_state and elsewhere
...
To my great surprise, many drivers don't use these values at all.
Move the update to the places where they are used.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
2060e952ec
mesa: add _NEW_MATERIAL to reduce the weight of _NEW_LIGHT_CONSTANTS
...
This reduces no-op compute_light_positions in _mesa_update_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
10371c520c
mesa: don't compute the ModelView * Projection matrix if not used
...
Only GLSL built-in uniforms use it.
This further reduces the time spent in _mesa_update_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
9f632df4b2
mesa: don't compute the inverted projection matrix if not used
...
Only clip planes and GLSL built-in uniforms use it.
update_projection (called by _mesa_update_state) removes
the _math_matrix_analyse call, reducing the time spent
in _mesa_update_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:02 +00:00
Marek Olšák
bc05833c8a
mesa: rework _MESA_NEW_NEED_EYE_COORDS to reduce fixed-func program updates
...
This eliminates a lot of the remaining no-op fixed-func program key
recomputations in _mesa_update_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:01 +00:00
Marek Olšák
14c933b900
mesa: split _NEW_LIGHT into 3 flags: _NEW_LIGHT_(FF_PROGRAM|CONSTANTS|STATE)
...
_NEW_LIGHT_CONSTANTS: state parameters
_NEW_LIGHT_FF_PROGRAM: keys for fixed-func programs
_NEW_LIGHT_STATE: gallium rasterizer state
This reduces:
- the number of no-op fixed-func program key recomputations
in _mesa_update_state
- the number of no-op rasterizer state updates in st/mesa
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:01 +00:00
Marek Olšák
e4868cd1c4
mesa: move fixed-func-related _mesa_update_state code closer together
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:01 +00:00
Marek Olšák
a9299a9b5e
mesa: remove unnecessary NewState flagging for glPopAttrib(GL_ENABLE_BIT)
...
pop_enable_group calls _mesa_set_enable for every state it changes,
so we don't need do anything else.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850 >
2021-02-26 23:38:01 +00:00
Bas Nieuwenhuizen
5acc115bd8
ac/rgp: Only report double the prims per clock on GFX10.
...
Misinterpreted review comment.
Fixes: 4ded99f99d ("ac/rgp: report the number of primitives per clock")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9312 >
2021-02-27 00:21:00 +01:00
Rhys Perry
f66a7240f9
nir: fix build at -O1
...
At -O1 with GCC 10.2.1, _nir_visit_dest_indirect (declared ALWAYS_INLINE)
will fail to inline if it's caller (nir_foreach_dest) is not inlined,
because _nir_visit_dest_indirect is passed as a function pointer. This
results in a compilation error.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com >
Fixes: 336bcbacd0 ("nir: inline nir_foreach_{src,dest}")
Tested-by: Witold Baryluk <witold.baryluk@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4353
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9301 >
2021-02-26 21:54:53 +00:00
Christian Gmeiner
512d281853
gallium: call util_cpu_detect()
...
Fix undefined behavior from using util_cpu_caps.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9311 >
2021-02-26 21:29:44 +00:00
Danylo Piliaiev
d06c1e4554
turnip/ir3: check for bindless IBOs in atomic dests fixup
...
Otherwise destinations may remain unfixed because ir3_shader_nibo
doesn't count bindless IBOs.
Fixes tests:
dEQP-VK.image.atomic_operations.*intermediate_values
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9309 >
2021-02-26 21:13:04 +00:00
Tamara Schmitz
b0fb1c29d1
util: add mesa_glthread for Valheim in OpenGL mode.
...
Drastically reduces hitching when traversing the landscape.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9296 >
2021-02-26 21:25:52 +01:00
Christian Gmeiner
cfd835b45a
etnaviv: extend lower ubo tests
...
Test a full transformation path (load_uniform -> load_ubo -> load_uniform)
and validate the load_uniform offset.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9305 >
2021-02-26 19:52:53 +00:00
Christian Gmeiner
5705ecb6f4
etnaviv: fix etna_nir_lower_ubo_to_uniform pass
...
The restoring of the acutal uniform offset was wrong.
Fixes: 1837135f7c ("etnaviv: nir: add ubo lowering pass")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9305 >
2021-02-26 19:52:53 +00:00
Adam Jackson
8248af3070
docs: Document GL_EXT_depth_bounds_test
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9287 >
2021-02-26 19:05:34 +00:00
Adam Jackson
5afb3b7f25
softpipe: Implement GL_EXT_depth_bounds_test
...
This is a little bit contorted because the Z storage for the tile is
either float or int depending on the Z format, so we have to be careful
about types when comparing.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9287 >
2021-02-26 19:05:34 +00:00
Adam Jackson
0c55a98330
softpipe: Fix depth comparison with float Z formats
...
We just stuff the Z bits into [bq]zzzz literally for floats, but
comparing those like they're integers only works for == and !=.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9287 >
2021-02-26 19:05:34 +00:00
Adam Jackson
cac0191baa
mesa: Store depth bounds test bounds as GLclampd
...
... instead of truncating to GLfloat. This seems somewhat silly since
the "clamp" part means only values [0.0, 1.0] are defined, but if the
depth buffer is Z32_UNORM then storing as GLfloat means you lose 8 bits
of depth bounds precision. This happens not to matter, yet, since swrast
classic doesn't support Z32_UNORM for depth, and the software gallium
drivers don't support EXT_depth_bounds_test. But the latter part is
about to change.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9287 >
2021-02-26 19:05:34 +00:00
Rob Clark
a9618e7c42
util: Add accessor for util_cpu_caps
...
In release builds, there should be no change, but in debug builds the
assert will help us catch undefined behavior resulting from using
util_cpu_caps before it is initialized.
With fix for u_half_test for MSVC from Jesse Natalie squashed in.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9266 >
2021-02-26 18:31:19 +00:00
Rob Clark
9fb9019beb
util/u_queue: Ensure num_cpu_mask_bits is valid
...
I noticed that we were hitting this before st_create_context() called
util_cpu_detect() and so num_cpu_mask_bits was zero. But there is no
harm in calling util_cpu_detect(), so lets just call it here to be safe.
Fixes: d877451b48 ("util/u_queue: add UTIL_QUEUE_INIT_SET_FULL_THREAD_AFFINITY")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9266 >
2021-02-26 18:31:19 +00:00
Samuel Pitoiset
4ded99f99d
ac/rgp: report the number of primitives per clock
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9303 >
2021-02-26 18:05:47 +01:00
Samuel Pitoiset
435bff34e3
ac/rgp: report the number of memory operations per clock
...
So that RGP reports the memory type and the memory throughput.
Based on AMDVLK.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9303 >
2021-02-26 18:05:45 +01:00
Samuel Pitoiset
c2271f66ea
ac/rgp: report LDS size in CU mode on GFX10+
...
RGP expects that.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9303 >
2021-02-26 18:05:43 +01:00
Samuel Pitoiset
ceded1d0a2
ac/rgp: recognize more memory types
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9303 >
2021-02-26 18:05:42 +01:00
Samuel Pitoiset
597f89f20a
include/drm-uapi: bump AMDGPU headers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9303 >
2021-02-26 18:05:36 +01:00
Gert Wollny
23b87b56b6
r600/sfn: remove old cube texturing code
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9302 >
2021-02-26 15:00:44 +00:00
Gert Wollny
488c93ac11
r600/sfn: use lowering pass for cube textures
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9302 >
2021-02-26 15:00:44 +00:00
Gert Wollny
dc51b75714
r600/sfn: use lower bool to int32 and lower int_tg4 only on shader clone
...
These changes should not be visible to shader variants that may go through
the optimization another time.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9302 >
2021-02-26 15:00:44 +00:00
Gert Wollny
387222c09a
r600/sfn: fix gather with cube lowering
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9302 >
2021-02-26 15:00:44 +00:00
Gert Wollny
510dac76ab
r600/sfn: add lowering pass for cube textures
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9302 >
2021-02-26 15:00:44 +00:00
Gert Wollny
66b67f43c0
r600/sfn: Add support for cube_r600 instruction
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9302 >
2021-02-26 15:00:44 +00:00
Rhys Perry
c3af0c2079
aco: use p_as_uniform for get_sampler_desc and convert_pointer_to_64_bit
...
Since value-numbering no longer works across loops, we no longer need to
use v_readfirstlane_b32.
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/9288 >
2021-02-26 13:33:56 +00:00
Rhys Perry
5f1b354472
aco: calculate all p_as_uniform and v_readfirstlane_b32 sources in WQM
...
We should avoid a situation where a v_readfirstlane_b32 is in WQM but it's
source is calculated in Exact.
Fixes hang when running Assassin's Creed: Valhalla benchmark.
fossil-db (GFX10.3):
Totals from 1021 (0.70% of 146267) affected shaders:
CodeSize: 7835228 -> 7842992 (+0.10%); split: -0.00%, +0.10%
Instrs: 1519208 -> 1521149 (+0.13%); split: -0.00%, +0.13%
SClause: 78921 -> 78920 (-0.00%)
Copies: 44456 -> 45421 (+2.17%); split: -0.05%, +2.22%
Branches: 12987 -> 13933 (+7.28%)
PreSGPRs: 47599 -> 47813 (+0.45%)
Cycles: 10037540 -> 10045304 (+0.08%); split: -0.00%, +0.08%
VMEM: 538381 -> 538777 (+0.07%); split: +0.11%, -0.03%
SMEM: 84553 -> 84554 (+0.00%); split: +0.01%, -0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9288 >
2021-02-26 13:33:56 +00:00
Juan A. Suarez Romero
bb0c659980
ci/piglit: fix parallel piglit results
...
Commit bcea453d4a removed the summary from the expected piglit
results, but handling of results when using parallel jobs was also doing
the same, which ends up on removing too many lines from results.
Fixes: bcea453d4a ("ci/piglit: Stop including the test counts at the
end of expectations.")
Acked-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9286 >
2021-02-26 09:12:12 +00:00
Gert Wollny
e5db9c3dd4
nir: Add r600 specific CUBE opcode to evaluate cube texture coords and
...
face
The opcode evaluates tha unnormalized coordinates, the length of the
major axis, and the cube face.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9200 >
2021-02-26 09:51:37 +01:00
Gert Wollny
4f4e1e5ed9
nir: Add flag to tex instruction to indicate lowering cube to array
...
E.g. r600 a cube texture lookup uses a specific cube instruction
to evaluate the sample coordinates and the face ID, so that the cube
texture lookup can be lowered to a array texture lookup, thereby sharing
the code with the 2D array texture lopkup.
However, for TXD the given gradients still need to be three-component
vectors, so add a flag that the NIR validation knows that we deal with
cube texture that was lowered to an array and can validate accordingly.
v2: Handle new flag in serialization (Marek)
v3: Rebase so that the change does not require the patch to deduct the
number of offset and grad components from sampler type
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com > (v2)
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9200 >
2021-02-26 09:51:37 +01:00
Mike Blumenkrantz
b44c48fd21
zink: use pre-fetched format properties everywhere
...
this is a noticeable perf improvement
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9293 >
2021-02-25 17:58:38 -05:00
Mike Blumenkrantz
ee4b844b12
zink: pre-fetch all format properties during screen init
...
this ends up being a tradeoff where we waste a little startup time and
an extra ~4k memory for the overall screen object in exchange for never having
to fetch format properties again, which is a surprisingly expensive call
to be making as much as we have to make it
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9293 >
2021-02-25 17:58:38 -05:00
Kenneth Graunke
5005cbc7ed
i965: Eliminate all tabs except in brw_defines.h
...
For a while we were doing 3-space indent with 8-space tabs, largely
due to the emacs settings of a couple of contributors. We stopped
using tabs a long time ago, and they're just a nuisance at this point.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
95bd5fc463
i965: Rename DRI extension structs to be "brw" instead of "intel"
...
Matching the rest of the driver, and avoiding confusion with i915.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
9591acb7b1
i965: Rename more camel-case functions to brw and underscore style
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
7ce41b80cb
i965: Rename some camel-case local variables
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
24a5fb7b84
i965: Rename intelInit and brwInit camel-case functions to brw_*
...
The driver style has been to use underscores for internal functions.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
5876d74216
i965: Rename the rest of intel_* functions to brw_*
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
d994090e7c
i965: Rename intel_image_format and intel_buffer to brw_*
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
d2e38c2648
i965: Rename intel_buffer_object to brw_buffer_object
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
b45971e473
i965: Use __func__ in blorp perf_debug macros
...
These had the function name baked into the perf_debug message, which
after a bunch of refactoring, was out of sync with the actual code.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:49 +00:00
Kenneth Graunke
f28f6175e5
i965: Rename intel_mip* to brw_mip*.
...
With lots of indentation fixes.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:48 +00:00
Kenneth Graunke
7f1a408407
i965: Rename intel_renderbuffer to brw_renderbuffer
...
For now, keeping the 'irb' name on local variables.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:48 +00:00
Kenneth Graunke
703084756f
i965: Rename intel_texture_{object,image} to brw_texture_{object,image}
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:48 +00:00
Kenneth Graunke
3733bbe842
i965: Rename intel_screen to brw_screen
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:48 +00:00
Kenneth Graunke
462c9e173c
i965: Rename intel_batchbuffer_* to brw_batch_*.
...
Shorter, matching the convention in iris, and drops use of "intel_"
on i965-specific code that isn't shared.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:48 +00:00
Kenneth Graunke
a56f4f2b4a
i965: Rename use_intel_mipree_map_blit to use_blitter_to_map
...
Mip...ree? Use a more descriptive name instead of just fixing the typo.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207 >
2021-02-25 21:03:48 +00:00
Rob Clark
2ed9dfbe6f
freedreno: Add macro for duration based warns
...
Add a macro to do a perf_debug() if a block of code takes longer than a
specified amount of time.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264 >
2021-02-25 20:09:44 +00:00
Rob Clark
13d0d2db1a
freedreno: Slight perf_debug rework
...
Allow ctx to be NULL in perf_debug_ctx() and make perf_debug() a
shortcut for perf_debug_ctx(NULL, ...) to simplify things slightly
in the next patch.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264 >
2021-02-25 20:09:44 +00:00
Rob Clark
fd4d759622
freedreno: Add FD_DBG() macro
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264 >
2021-02-25 20:09:44 +00:00
Rob Clark
5d217774f2
freedreno/ir3: Fix initial_variants_synchronous() condition
...
This was meant to be an || rather than &&, although it didn't matter for
shaderdb because both conditions would be true. But it did matter if
you were trying to force synchronous compile to avoid having nir/ir3
prints interleaved from multiple threads.
While at it, add a more specific debug flag to force initial variant
compile to be synchronous, because at some point the 'shaderdb' flag
itself will not force this.
Fixes: 75b0c4b5e1 ("freedreno/ir3: Async shader compile")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264 >
2021-02-25 20:09:44 +00:00
Rob Clark
1b2a35509e
freedreno: Fix think-o in fd_resource_wait()
...
Fixes: dabec19b05 ("freedreno: Add perf_debug logging for bo stalls")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264 >
2021-02-25 20:09:44 +00:00
Mauro Rossi
97b7786e6b
android: pan/bi: reorder static dependencies in gallium/dri
...
libpanfrost_lib depends on libpanfrost_bifrost for 'bifrost_compile_shader_nir' symbol
libpanfrost_lib depends on libpanfrost_bifrost_disasm for 'disassemble_bifrost' symbol
LOCAL_STATIC_LIBRARIES requires proper ordering to make the symbols available
Fixes the following building error happening with Android P:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
external/mesa/src/panfrost/lib/decode.c:534: error: undefined reference to 'disassemble_bifrost'
external/mesa/src/panfrost/lib/pan_shader.c:145: error: undefined reference to 'bifrost_compile_shader_nir'
Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org >
Fixes: 166630f ("android: pan/bi: Separate disasm/compiler targets")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9265 >
2021-02-25 20:31:44 +01:00
Eric Anholt
f65a7a8aa3
freedreno/a5xx: Fix cube image load/stores.
...
This is the same thing we do on a6xx for cubes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9270 >
2021-02-25 19:11:19 +00:00
Dave Airlie
5d4a035c1c
ci: try building lavapipe on windows
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9121 >
2021-02-26 04:29:52 +10:00
James Park
98c622a96e
vulkan: Update dispatch table gen for Windows
...
Update entry null test to deal with MSVC not supporting weak functions.
Also fix warnings for returning from void functions.
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9121 >
2021-02-26 04:29:52 +10:00
James Park
10244fe76e
vulkan: Fix source list for vulkan_wsi on Windows
...
I don't think link_whole works right for VS project generation, but MSVC
doesn't support GCC weak functions anyway, so work around it.
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9121 >
2021-02-26 04:29:52 +10:00
Mike Blumenkrantz
bc8e770856
zink: fix dynamic bo lowering for ssbo stores
...
there are no piglit tests for this, so naturally it would not have worked
fixes KHR-GL46.compute_shader.resources-max
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9113 >
2021-02-25 18:03:04 +00:00
Jesse Natalie
3955dd077b
meson/gallium: Add an option to not use LLVM for gallium draw module
...
We'd like to use one Mesa build environment which builds our CL compiler
stack (which needs Clang/LLVM) and which builds our GL driver. The GL
driver doesn't really need LLVM support, and since we're statically
linking LLVM, removing it from the driver drastically reduces our DLL
size on disk.
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9259 >
2021-02-25 17:48:16 +00:00
Roman Stratiienko
3adac6affc
egl: android: use num_planes param in createImageFromDmaBufs()
...
Fixes 972f36d8fa ("egl/android: Call createImageFromDmaBufs directly")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9278 >
2021-02-25 16:15:24 +00:00
Michel Zou
5a2b930014
meson/xmlconfig: win32 regex fallback
...
xmlconfig now uses regex fonctions even without xml support
Fixes: c83400e6
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9261 >
2021-02-25 14:03:27 +00:00
Mike Blumenkrantz
f08670b4ea
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9232 >
2021-02-25 08:38:56 -05:00
Mike Blumenkrantz
190b4ad18e
zink: relax tessellation shader reqs
...
vk memory model isn't actually required for tcs io semantics due
to how control barriers are emitted in GL
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9232 >
2021-02-25 08:38:56 -05:00
Qiang Yu
4aac98f8a6
lima: fix xserver page flip fail for full screen client
...
Need to import client buffer to display drm device, otherwise
get following xserver error log:
[ 190.982] (WW) modeset(0): Page flip failed: No such file or directory
[ 190.982] (EE) modeset(0): present flip failed
With this fix, full screen x11 client can display its window
buffer directly without a copy. Tested on Allwinner H3, 1080p
full screen glxgears go from 163FPS to 173FPS.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Signed-off-by: Zan Dobersek <zdobersek@igalia.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9038 >
2021-02-25 12:16:12 +00:00
Jose Fonseca
d7184aa15b
wgl: Match opengl32.dll export ordinals.
...
Some apps import GL/WGL symbols by ordinal. See
https://github.com/apitrace/apitrace/issues/652
This is not an issue when Mesa is used as an OpenGL ICD, but it might
create troubles when used as a drop-in opengl32.dll replacement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7372 >
2021-02-25 10:47:59 +00:00
Daniel Schürmann
690ac7409a
aco/value_numbering: use can_eliminate() function to avoid unnecessary hashmap lookups
...
No fossil-db changes.
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9195 >
2021-02-25 11:35:42 +01:00
Daniel Schürmann
fbf791e70c
aco: value number VOPC instructions with different exec masks
...
This becomes possible as long as we do
val = s_and_b32/64 exec, val
before any subgroup operations.
This precautional instruction can be removed by the
optimizer if 'val' was computed by a VOPC instruction
using the same exec mask.
Totals from 59 (0.04% of 146267) affected shaders (Navi10):
VGPRs: 2808 -> 2816 (+0.28%)
CodeSize: 340888 -> 340852 (-0.01%); split: -0.20%, +0.19%
Instrs: 61733 -> 61625 (-0.17%); split: -0.18%, +0.01%
Cycles: 470636 -> 469112 (-0.32%); split: -0.33%, +0.01%
VMEM: 8091 -> 7993 (-1.21%)
SMEM: 2736 -> 2719 (-0.62%); split: +0.29%, -0.91%
VClause: 1745 -> 1741 (-0.23%)
SClause: 2394 -> 2392 (-0.08%); split: -0.25%, +0.17%
Copies: 3249 -> 3253 (+0.12%); split: -0.62%, +0.74%
Branches: 1210 -> 1206 (-0.33%)
PreSGPRs: 3126 -> 3176 (+1.60%); split: -0.16%, +1.76%
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9195 >
2021-02-25 11:35:42 +01:00
Aaron Watry
e6ff50f7d3
clover: implement CL_IMAGE_NUM_MIP_LEVELS and CL_IMAGE_NUM_SAMPLES
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Serge Martin <edb@sigluy.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Edward O'Callaghan
44e11aa7b4
clover: Implement CL_MEM_OBJECT_IMAGE1D
...
v2: Consider surface height as valid when unused by using 1.
Fixup width boundary checking.
v3 (Karol): Pull in changes from later commits
Fix validation
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Karol Herbst
f5284a36f9
clover: rework quering image max sizes
...
The 3D one was always wrongly used, also the consumers always wanted the
size, not the levels. This should make it easier to use the interface and
also prevent future bugs like the 3D one.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Aaron Watry
60173853c2
clover: implement CL_IMAGE_ELEMENT_SIZE
...
v2 (Karol Herbst): extracted from other commit
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Serge Martin <edb@sigluy.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Karol Herbst
2afaa60b42
clover: simplify image arguments
...
We don't care how many dimensions the image arg has, so drop it otherwise
we would have to add a lot of variants for arrays, msaa and depth
combinations. Yes, image2d_array_msaa_depth_t is a thing.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Serge Martin <edb@sigluy.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Serge Martin
4cb9df49c2
clover: return CL_INVALID_VALUE when origin or region are NULL
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212 >
2021-02-25 10:28:35 +00:00
Samuel Pitoiset
8a47422d97
radv: do not scale the depth bias for D16_UNORM depth surfaces
...
Scaling the depth bias doesn't seem correct with Vulkan. This is
probably the root cause of the shadow artifacts differences between
RADV and AMDVLK/AMDGPU-PRO.
Fix dEQP-VK.rasterization.depth_bias.d16_unorm.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2217
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/9249 >
2021-02-25 08:17:27 +01:00
Mike Blumenkrantz
9af40b824d
zink: hook up nir_texop_query_levels
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9275 >
2021-02-25 05:18:11 +00:00
Mike Blumenkrantz
7fe5937906
zink: add spirv builder methods for OpImageQueryLevels
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9275 >
2021-02-25 05:18:11 +00:00
Mike Blumenkrantz
0e1742ba02
zink: do batch-program tracking after possibly cycling batch in update_descriptors()
...
ensure we have the right batch here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
c7da40b2eb
zink: increment batch->descs_used during update_descriptors flushing
...
ensure that this actually flushes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
4412d2b69d
zink: properly size descriptorset layout binding stack array
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
f840057700
zink: unref programs last in batch reset
...
we're going to want to make sure all other resources have been handled
at this point so that we can make some better decisions in this block
based on descriptor usage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
992ddf7e4b
zink: ralloc zink program structs
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
747caaa83d
zink: use zink_program in zink_batch_reference_program()
...
this is a little nicer
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Mike Blumenkrantz
5503ffecfb
zink: add zink_program struct as a base class for compute/gfx structs
...
this is going to be useful for managing descriptors
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273 >
2021-02-25 04:52:42 +00:00
Vinson Lee
50ca42dc43
zink: Remove leftover dead code.
...
Fix defect reported by Coverity Scan.
Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached: return progress;
Fixes: d550c5780f ("zink: use nir_shader_instructions_pass for draw params pass")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9182 >
2021-02-25 04:41:53 +00:00
Vinson Lee
9b54272425
gv100/ir: Initialize CodeEmitterGV100 members in constructor.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member prog is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member insn is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9183 >
2021-02-25 04:36:52 +00:00
Vinson Lee
7b934d1ecd
nir/lower_tex: Change coord type to int.
...
nir_tex_instr_src_index returns an int.
Fix defect reported by Coverity Scan.
Macro compares unsigned to 0 (NO_EFFECT)
unsigned_compare: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. coord >= 0U.
Fixes: b154a4154b ("nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9181 >
2021-02-25 04:15:07 +00:00
Vinson Lee
816d28f4a1
llvmpipe: Fix typos.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8542 >
2021-02-25 04:04:28 +00:00
Vinson Lee
6fc3363368
r600: Fix typos.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8293 >
2021-02-25 03:55:43 +00:00
Michel Zou
2944b4b6b4
gallium: remove DROP_PIPE_LOADER_MISC
...
not needed since these code paths are always enabled
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Michel Zou
951f328723
lavapipe: set empty dll prefix
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Michel Zou
e8d63375d2
lavapipe: add mingw32 def file
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Michel Zou
8af568e4ae
vulkan: implement wsi_win32 backend
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Dave Airlie
6c0546f466
lavapipe: use null probe path on win32
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7208 >
2021-02-25 03:41:36 +00:00
Timothy Arceri
fbabd2163d
util/disk_cache: fix crash in fossilize_db
...
We don't need to close the file here check_files_opened_successfully()
already does that for us if needed.
This fixes a crash when invalid filename/paths are provided to the
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS environment variable.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9251 >
2021-02-25 03:27:14 +00:00
Mike Blumenkrantz
ba4bc54dea
zink: rename zink_context::buffers -> vertex_buffers (and usage mask)
...
this is more descriptive
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Mike Blumenkrantz
cfc669585b
zink: use dynamic vertex buffer strides
...
this removes another case of needing to rehash/create a new pipeline
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Mike Blumenkrantz
9d0434bf64
zink: make dynamic state usage in pipeline creation more explicit/flexible
...
we'll be expanding this, so we want to have it very easy to update and read
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Mike Blumenkrantz
51e527a9ba
zink: setup CmdBindVertexBuffers2EXT member in screen for dynamic state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9272 >
2021-02-24 21:41:05 -05:00
Marek Olšák
f827b29234
nouveau_vieux: use align_calloc for the context to fix m32 crashes
...
Fixes: 3175b63a0d "mesa: don't allocate matrices with malloc"
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220 >
2021-02-25 02:33:12 +00:00
Marek Olšák
81cf4bef7e
radeon,r200: use align_calloc for the context to fix m32 crashes
...
Fixes: 3175b63a0d "mesa: don't allocate matrices with malloc"
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220 >
2021-02-25 02:33:12 +00:00
Marek Olšák
75d5c1229e
i915: use align_calloc for the context to fix m32 crashes
...
Fixes: 3175b63a0d "mesa: don't allocate matrices with malloc"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4295
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220 >
2021-02-25 02:33:12 +00:00
Mike Blumenkrantz
22fc869187
zink: set VK_IMAGE_LAYOUT_PRESENT_SRC_KHR on fb resources at eof flush
...
this should maybe fix garbled images on amd?
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Mike Blumenkrantz
55f05638f5
zink: handle VK_IMAGE_LAYOUT_PRESENT_SRC_KHR barriers
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Mike Blumenkrantz
c5292710c4
zink: handle PIPE_FLUSH_DEFERRED
...
these flushes queue the fence to be submitted on the next finish call, so
we have to store the context to the fence to be able to handle threaded calls
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Mike Blumenkrantz
c271ac0066
zink: add util function for returning previous batch
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Mike Blumenkrantz
24b237d3d4
zink: add a define for compute batch count
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Mike Blumenkrantz
ef3dc995a9
zink: only flush batches in pipe_context::flush if they actually have work
...
no need to submit command buffers to the queue which have no commands, so we
can just proceed to give back an inactive fence object that always returns success
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Antonio Caggiano
9dac191f6e
zink: fix destroy batch
...
Extract batch destruction in its own function, then make sure to
release objects.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Mike Blumenkrantz
da2d8f1078
zink: create a single fence per batch on startup and then reuse
...
previously we would be creating a new fence per batch for every submit,
but we can just reset and reuse them if we're careful with it
based on original patch by Antonio Caggiano
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243 >
2021-02-24 21:09:52 -05:00
Mike Blumenkrantz
a27570326f
zink: reorder zink_bind_vertex_buffers()
...
we should be making this a no-op if we have no bindings (somehow)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9241 >
2021-02-24 20:47:51 -05:00
Mike Blumenkrantz
381e92e811
zink: move samplerview referencing around in update_descriptors()
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9241 >
2021-02-24 20:47:51 -05:00
Mike Blumenkrantz
679dd69741
zink: avoid memset during update_descriptors() for resources refs
...
we can simplify this a bit to further reduce cpu usage here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9241 >
2021-02-24 20:47:51 -05:00
Dave Airlie
7826648e14
lavapipe: fix depth texturing swizzle
...
This is pretty much derived from what works and passes
both GL via zink and VK-GL-CTS test suites.
The zink multisample regressions tests rendered black, so
"passed" before, now they render more junk.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9260 >
2021-02-25 01:32:33 +00:00
Eric Anholt
6d2b2515c4
freedreno/a5xx+: Drop the unused no_decode_srgb flag.
...
This was a flag used for a4xx GMEM draws.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9267 >
2021-02-25 00:38:11 +00:00
Eric Anholt
9522087b75
freedreno/a5xx+: Stop recompiling on texture samples changes.
...
The shader only looks at this bit of the key on a3xx, and a4xx already
didn't set it. This will help give us precompile hits for MSAA texture
sampling.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9267 >
2021-02-25 00:38:11 +00:00
Eric Anholt
c93fd1046a
freedreno: Use the mesa/st frontend lowering of GL_CLAMP.
...
350 lines of code for this stupid feature, and we weren't even doing it
right for CS/GS/tess.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9267 >
2021-02-25 00:38:11 +00:00
Mike Blumenkrantz
05d0514a8f
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9115 >
2021-02-24 23:25:01 +00:00
Mike Blumenkrantz
cf8ca77be1
zink: handle point sprite
...
this needs custom yinvert handling and also prim mode detection, which
gallium can't do on its own
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9115 >
2021-02-24 23:25:01 +00:00
Mike Blumenkrantz
b9676976d0
zink: store prim mode to context during draw
...
we need to be able to access this for shader rewrites
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9115 >
2021-02-24 23:25:01 +00:00
Mike Blumenkrantz
2e60929b47
nir/texcoord_replace: add a yinvert param
...
vulkan needs to invert the y coord in order to handle PIPE_SPRITE_COORD_LOWER_LEFT
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9115 >
2021-02-24 23:25:01 +00:00
Mike Blumenkrantz
707dc04b78
zink: no-op descriptor updating for draws without descriptors
...
this is a valid case that we can trivially shortcut to cut down on calls
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9155 >
2021-02-24 22:44:50 +00:00
Eric Anholt
5fa27e6670
freedreno: Drop custom driver lowering of GL's color clamping.
...
The mesa/st frontend can do it for us now that we don't need to worry
about breaking precompiles.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8997 >
2021-02-24 21:48:54 +00:00
Eric Anholt
3b9f6af1a9
freedreno: Drop custom driver lowering of two-sided color.
...
The GL frontend can do it for us now, so just use their code instead of
our own shader variants. In the past we had to do hide the GL shader
variants in the driver to get precompiles from st, but no longer as of
!8601 .
I tested with drawoverhead -test 6 (shader program change, n=30) and -test
1 (no statechanges, n=43) and saw no change in driver overhead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8997 >
2021-02-24 21:48:54 +00:00
Eric Anholt
de17b4aab5
freedreno: Remove uniform variables after finalizing NIR.
...
mesa/st optimizes the uniform storage if you have the finalize hook in
place, causing the uniforms declared to potentially not have storage in
the ParameterValues list any more. If you leave your uniforms around in
the NIR, then a later finalization after variant creation will re-add the
uniforms to parameters, defeating the optimization and likely reallocating
the uniform storage (causing use-after-free). So, we have to do this
before we can start using variants in mesa/st.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8997 >
2021-02-24 21:48:54 +00:00
Eric Anholt
9fcc369770
mesa: Always make sure uniform storage doesn't get reallocated.
...
Every caller of associate_uniform_storage was doing this to safety-check
that the uniform storage didn't get reallocated, except for
st_deserialise_ir_program(). This ended up leaving an opening for
use-after-free without hitting the assert in the hot-cache case (and I
found it on freedreno). Having added it, it also reveals use-after-frees
in the drawpixels shader variant cases on llvmpipe and zink.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8997 >
2021-02-24 21:48:54 +00:00
Mauro Rossi
3468c0dd4d
android: mesa: Move the FXT1 compressor/decompressor to util/
...
After commit a46b73e in order to build mesa for Android
we need to generate $(intermediates)/util/format/u_format_pack.h
instead of $(intermediates)/format/u_format_pack.h
Fixes the following building error in Android build:
external/mesa/src/util/format/u_format_fxt1.c:28:10: fatal error: 'util/format/u_format_pack.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Fixes: a46b73e ("mesa: Move the FXT1 compressor/decompressor to util/")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9240 >
2021-02-24 21:29:14 +00:00
Jose Fonseca
a4ffa25ee8
scons: Add u_format_pack.h include path.
...
Fixes MSVC SCons build.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9263 >
2021-02-24 20:48:47 +00:00
Mike Blumenkrantz
a6c72af908
zink: use 0 as default for spec constants
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9258 >
2021-02-24 19:15:48 +00:00
Eric Anholt
978d244114
ci/iris: Move the traces yml file to the driver-specific dir.
...
Since the job is manual, I missed it in the move and it got dropped from
the artifacts.
Fixes: 60d413b894 ("ci: Move the piglit expectations lists to the per-driver CI dirs.")
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9226 >
2021-02-24 18:55:02 +00:00
Eric Anholt
bcea453d4a
ci/piglit: Stop including the test counts at the end of expectations.
...
It's just a ton of fuss for driver developers fixing piglit tests. This
makes the trace expectation files pretty silly (empty expectation, but
you'll get a diff to a non-empty result when something fails)
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Adam Jackson <ajax@redhat.com >
Acked-by: Andres Gomez <agomez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9226 >
2021-02-24 18:55:02 +00:00
Dave Airlie
1121ea8192
lavapipe: fix descriptor set layout freeing.
...
Have to store the used allocator otherwise ends up being free wrong.
Fix for
dEQP-VK.api.object_management.alloc_callback_fail.descriptor_set_layout*
Fixes: f94a5f30e0 ("lavapipe: add reference counting to descriptor set layout")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9247 >
2021-02-25 04:38:44 +10:00
Kenneth Graunke
b9133e48a6
iris: Pin surface state buffers after possibly updating the clear color
...
On Gen8, updating the clear color will end up allocating new
SURFACE_STATE entries. These might end up living in a different BO
than the original copies, which means that we have to pin _after_
updating the clear color, not before.
Found by inspection.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9257 >
2021-02-24 18:32:29 +00:00
Eric Anholt
60573b443b
v3d: Replace driver lowering of GL_CLAMP with mesa/st's.
...
Mesa core can do this logic for us now.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9228 >
2021-02-24 18:03:46 +00:00
Rob Clark
e6bacd3e9a
v3d: Drop foreach_bit() macro
...
Now that we have a global one.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Rob Clark
0ca5b1a6b9
etnaviv: Drop foreach_bit() macro
...
Now that we have a global one.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Rob Clark
2b020e84e7
freedreno: Drop foreach_bit() macro
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Rob Clark
e5a64e34d8
freedreno/ir3: Drop foreach_bit() macro
...
Now that there is a global one in util/bitscan.h
Note this version had an extra assert which is not really suitable to a
generic foreach_bit().. just move the assert to the two usages of the
iterator macro.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Mike Blumenkrantz
025b57524f
anv: for_each_bit -> foreach_bit
...
Reviewed-by: Rob Clark <robclark@freedesktop.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Mike Blumenkrantz
77cba4b9f2
freedreno/vulkan: for_each_bit -> foreach_bit
...
Reviewed-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Mike Blumenkrantz
6875e10350
radv: for_each_bit -> foreach_bit
...
Reviewed-by: Rob Clark <robclark@freedesktop.org >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Mike Blumenkrantz
e89f158b82
v3dv: remove for_each_bit() macro
...
this was unused
Reviewed-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Mike Blumenkrantz
e7c7150d63
util/bitscan: add u_foreach_bit macros
...
this is a standardized (and very slightly improved for usability) version
of the macro that has been copied into every vulkan driver
includes fixup from Rob Clark <robclark@freedesktop.org >
Reviewed-by: Rob Clark <robclark@freedesktop.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191 >
2021-02-24 17:11:44 +00:00
Mike Blumenkrantz
618f46ee02
zink: add more ci flakes
...
wtf
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9242 >
2021-02-24 17:02:45 +00:00
Mike Blumenkrantz
eb7ec9ae70
zink: support gl_LocalGroupSize
...
this requires setting up a spec constant on the pipeline state which can
then propagate to the shader and be used like a regular constant
all ARB_compute_variable_group_size should pass now
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9242 >
2021-02-24 17:02:45 +00:00
Mike Blumenkrantz
10c05f083f
zink: add some spirv builder functions for spec constants
...
we'll be using these soon
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9242 >
2021-02-24 17:02:45 +00:00
Mike Blumenkrantz
5d503bf783
zink: force 128 fs input components on intel drivers
...
the hardware supports it, the driver supports it, but the driver reports
a lower value due to subtracting some usage that we shouldn't exceed anyway
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9198 >
2021-02-24 16:49:52 +00:00
Mike Blumenkrantz
cdb9a4775b
zink: set PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK
...
non-intel platforms need border colors pre-swizzled
this is an internal khronos spec bug that will (someday) be resolved in
a more detectable manner
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9136 >
2021-02-24 16:40:33 +00:00
Rob Clark
5740ac3701
xmlconfig: Add static driconfig support
...
For platforms which do not have support for parsing driconf from xml
files on the filesystem, build in driconf tables generated from
00-mesa-defaults.conf at compile time and use that for option matching.
This allows us to have game/engine specific overrides built in to mesa.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9179 >
2021-02-24 16:02:51 +00:00
Rob Clark
c83400e673
xmlconfig: Reshuffle to keep attr processing
...
For the static-table alternative to WITH_XMLCONFIG, we are going to want
to re-use the element attribute processing, to avoid duplicating things
like engine name regexp matching and version range matching. This just
shuffles things around a bit so we can re-use useful parts in the next
patch.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9179 >
2021-02-24 16:02:51 +00:00
Rob Clark
a6b0ceb341
driconf: Generate a static table when no xmlconfig
...
For builds without runtime xmlconfig parsing, generate a static table
from 00-mesa-defaults.conf.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9179 >
2021-02-24 16:02:51 +00:00
Andrew McMahon
94ca870617
util: add mesa_glthread for Half Life 2 and Black Mesa.
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4149
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4092
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9252 >
2021-02-24 14:11:05 +00:00
Michel Zou
dfb1c986dd
glapi: keep declspec(thread) msvc-specific
...
gcc ignores with a warning:
glapi.h:83:1: warning: ‘thread’ attribute directive ignored [-Wattributes]
Fixes: ba141b95
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9245 >
2021-02-24 13:47:30 +00:00
Erik Faye-Lund
dd055f6017
zink: correct inaccurate comment
...
PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE translate into
GL_MAX_*_UNIFORM_COMPONENTS, all of which are allowed to be as
low as 1024 by the GL 4.6 spec.
PIPE_CAP_MAX_SHADER_BUFFER_SIZE translate into
GL_MAX_SHADER_STORAGE_BLOCK_SIZE, which has different minimum values in
different versions of the GL spec. In the GL 4.6 spec for instance, it
is required to be 2^27, the same as what Vulkan requires.
But what these limits are in GL is irrelevant at this level of
abstraction. The OpenGL state-tracker cares, but the Gallium driver
shouldn't have to. So let's just delete those parts of the comments.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9216 >
2021-02-24 10:58:15 +00:00
Rhys Perry
71a985d80b
nir/dce: perform DCE for unlooped instructions in a single pass
...
It's unnecessary to iterate twice for instructions outside loops.
Compile-time (nir_opt_dce):
Difference at 95.0% confidence
-630.64 +/- 6.18761
-27.0751% +/- 0.223134%
(Student's t, pooled s = 7.30785)
Compile-time (entire run):
Difference at 95.0% confidence
-749.54 +/- 48.8272
-1.82644% +/- 0.117838%
(Student's t, pooled s = 57.6672)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7691 >
2021-02-24 09:58:59 +00:00
Rhys Perry
336bcbacd0
nir: inline nir_foreach_{src,dest}
...
Compile-time (nir_opt_dce):
Difference at 95.0% confidence
-319.51 +/- 5.67632
-12.0627% +/- 0.208076%
(Student's t, pooled s = 6.70399)
Compile-time (overall):
Difference at 95.0% confidence
-385.025 +/- 42.1124
-0.929489% +/- 0.10139%
(Student's t, pooled s = 49.7367)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7691 >
2021-02-24 09:58:59 +00:00
Rhys Perry
325f627d88
nir/dce: replace instruction worklist with ssa def bitset
...
Instead of a keeping a worklist of live instructions, use a bitset of live
ssa defs and iterate over instructions in reverse.
Compile-time (nir_opt_dce):
Difference at 95.0% confidence
-931.911 +/- 4.41383
-26.0263% +/- 0.105781%
(Student's t, pooled s = 5.21293)
Compile-time (overall):
Difference at 95.0% confidence
-882.245 +/- 28.3492
-2.08541% +/- 0.0665121%
(Student's t, pooled s = 33.4818)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7691 >
2021-02-24 09:58:59 +00:00
Juan A. Suarez Romero
15e1979c51
ci/vc4/v3d: Parallelize piglit jobs
...
Split the piglit jobs in multiple parallel executions to speed up the
runtime.
v2:
- Set parallel in V3D piglit jobs.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Andres Gomez <agomez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9022 >
2021-02-24 09:41:45 +01:00
Juan A. Suarez Romero
e814e23f59
ci/piglit: allow parallel piglit jobs
...
This allows to split a piglit job in several parallel jobs, to speed up
the execution.
Due piglit restrictions, this only works for single profiles. Otherwise
an error will be shown in the runner.
Also, a new gitlab job variable `PIGLIT_TESTS` is introduced that
contains the excluded/included tests with `-x` or `-n`. The rest of the
piglit options go to `PIGLIT_OPTIONS` (like `--timeout n`).
v2 (Andres):
- Replay profile is supported in parallel jobs.
- Bail out inmediately if parallel jobs is tried with multiple
profiles.
- Use testlist only when doing parallel jobs.
- Do not drop pass tests when filtering executed tests.
- Get rid of PIGLIT_FRACTION.
v4:
- uncommit unrelated change (Andres).
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Andres Gomez <agomez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9022 >
2021-02-24 09:41:33 +01:00
Iago Toral Quiroga
b17ec53c81
broadcom/compiler: use nir_opt_sink
...
total instructions in shared programs: 14072341 -> 14062334 (-0.07%)
instructions in affected programs: 1996685 -> 1986678 (-0.50%)
helped: 3038
HURT: 2432
Instructions are helped.
total uniforms in shared programs: 3797720 -> 3794523 (-0.08%)
uniforms in affected programs: 191711 -> 188514 (-1.67%)
helped: 831
HURT: 449
Uniforms are helped.
total max-temps in shared programs: 2340632 -> 2335124 (-0.24%)
max-temps in affected programs: 113632 -> 108124 (-4.85%)
helped: 2728
HURT: 436
Max-temps are helped.
total spills in shared programs: 6050 -> 5931 (-1.97%)
spills in affected programs: 2869 -> 2750 (-4.15%)
helped: 14
HURT: 4
total fills in shared programs: 13970 -> 13371 (-4.29%)
fills in affected programs: 8831 -> 8232 (-6.78%)
helped: 14
HURT: 4
total inst-and-stalls in shared programs: 14103668 -> 14093712 (-0.07%)
inst-and-stalls in affected programs: 2004035 -> 1994079 (-0.50%)
helped: 3009
HURT: 2426
Inst-and-stalls are helped.
LOST: 0
GAINED: 10
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9209 >
2021-02-24 08:02:00 +01:00
Francisco Jerez
4132337b8a
anv/gen12: Implement programming of pixel pipe hashing tables.
...
See previous commit "iris/gen12: Implement programming of pixel pipe
hashing tables." for the rationale.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749 >
2021-02-23 21:15:56 -08:00
Francisco Jerez
11febd50e2
anv/gen11+: Calculate pixel hashing tables instead of hardcoding.
...
See commit "iris/gen11+: Calculate pixel hashing tables instead of
hardcoding." for the rationale.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749 >
2021-02-23 21:15:36 -08:00
Francisco Jerez
17add74dec
iris/gen12: Implement programming of pixel pipe hashing tables.
...
Straightforward by using the pixel hashing table computation helper
previously introduced, assuming we know the fraction of work that
needs to be submitted to each pixel pipe. Note that AFAIA the
hardware maps indices in the table to pixel pipes from largest to
smallest, so it shouldn't be necessary to permute indices based on the
physical IDs of the pixel pipes as we are doing on Gen11.
Improves performance of most non-trivial graphics workloads I've tried
on an 80 EU TGL. E.g. the following testcases improve performance
significantly with sample size 27 and statistical significance 1%:
gputest/pixmark_piano: 62.89% ±0.10%
gputest/pixmark_volplosion: 61.51% ±0.06%
unigine/valley: 26.72% ±0.25%
gfxbench/gl_5_high: 24.70% ±0.19%
unigine/heaven: 23.54% ±0.17%
steam/csgo: 22.75% ±4.36%
gfxbench/gl_manhattan31: 22.43% ±0.29%
gfxbench/gl_4: 20.92% ±0.35%
warsow/benchsow: 19.15% ±2.53%
gfxbench/gl_trex_off: 18.84% ±0.27%
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749 >
2021-02-23 21:15:25 -08:00
Francisco Jerez
f9bcdc5bc7
iris/gen11+: Calculate pixel hashing tables instead of hardcoding.
...
Pixel hashing tables are a pain to type in, review and maintain IMHO.
In order to obtain satisfactory load balancing on all Gen12 parts
currently in production this series would need to add 5 different
additional tables. Instead this introduces a simple algorithm able to
calculate a table on the fly based on a handful of parameters.
Note that the Gen11 tables generated with this algorithm are not
identical to the hardcoded ones, however the only difference should be
a phase shift that isn't expected to have any effect on performance,
since it shouldn't change the fraction of work submitted to each pixel
pipe.
The CPU overhead from this change is negligible since the tables only
need to be programmed once at context init time.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749 >
2021-02-23 21:15:16 -08:00
Francisco Jerez
e2ef1c4676
intel/dev: Implement pixel pipe subslice counting for Gen12+.
...
Unlike Gen11, Gen12 hardware supports up to three pixel pipes per
slice.
Unfortunately the kernel interface is somewhat inconsistent between
Gen11 and Gen12: I915_PARAM_SUBSLICE_MASK returns a mask of enabled
*dual* subslices since TGL, so there is half the number of bits per
pixel pipe in the mask. This is worked around here so we're able to
calculate the correct size of each pixel pipe, but the result is
returned in dual subslice units, inheriting the inconsistency from the
kernel -- Reason is that as of now all our Gen12 subslice counts
returned by gen_device_info.c are really dual subslice counts, and the
num_eu_per_subslice counts are also scaled accordingly, so it seems
like it would only make the matter worse if I fixed the units of this
field only without also fixing the rest.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749 >
2021-02-23 21:15:06 -08:00
Francisco Jerez
ab076e19ed
intel/genxml: Define 3DSTATE_SUBSLICE_HASH_TABLE command for Gen12 and Gen12.5.
...
This command allows programming custom pixel hashing tables
controlling the balancing of load across pixel pipes. Rather
confusingly 3DSTATE_SLICE_TABLE_STATE_POINTERS was serving the same
purpose on Gen11: A pixel is mapped to the pixel pipe with index
specified by the entry in the table corresponding to the LSBs of the
pixel coordinates [Yes you read right the entries are neither subslice
nor slice indices!]. Either a 2-way or a 3-way table can be
programmed based on whether the platform has two or three pixel pipes
per slice. In addition the 16x8 tables defined below can hold two
separate 8x8 tables when in DUAL_TABLE mode (which AFAIA is only
useful for platforms with multiple asymmetric slices -- I.e. no
production platforms as of today to my knowledge).
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749 >
2021-02-23 21:14:57 -08:00
Francisco Jerez
a2a17bf25e
intel/genxml: Fix pixel hashing 3DSTATE_3D_MODE field definitions for Gen12 and Gen12.5.
...
The former "Subslice Hashing Mode" field is no longer used by the
hardware, Gen12 parts always do 16x16 subslice pixel hashing -- Remove
it since it's no longer useful. In addition add a couple of bits that
will be useful in order to make some adjustments to the default pixel
pipe hashing behavior.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749 >
2021-02-23 21:14:42 -08:00
Mike Blumenkrantz
7e77bfb68a
zink: ci updates
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9244 >
2021-02-23 23:04:25 -05:00
Antonio Caggiano
05a5af02bc
zink: support stencil-export
...
Enable pipe capability of exporting stencil from shader when Vulkan
extension is available.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9244 >
2021-02-23 22:27:04 -05:00
Antonio Caggiano
8724d4fb36
zink: check shader stencil output
...
Enable SPV_EXT_stencil_export and SpvCapabilityStencilExportEXT and
mark output with FragStencilRefEXT when fragment shader writes to
reference stencil value.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9244 >
2021-02-23 22:27:04 -05:00
Erik Faye-Lund
ef48d57b77
zink: add X32_S8X24 format
...
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9244 >
2021-02-23 22:26:55 -05:00
Mike Blumenkrantz
f9c7dd744f
zink: improve descriptor set oom handling
...
this attempts to dynamically establish an upper bound for per-batch descriptor
use, flushing all batches and resetting the pools on alloc failure in
an attempt to be more robust about it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9117 >
2021-02-24 02:33:25 +00:00
Mike Blumenkrantz
abce6c5d3d
zink: ci changes
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
5ac0c2c5c9
zink: always do full-fb clears in renderpass begin when possible
...
previously if any of the pending clears required an explicit clear then
we'd clear them explicitly, but with this patch we're shifting the first
pending clear into the renderpass begin if possible and then applying the
remaining clears on top of that in order to reduce gpu operations
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
5fe329e307
zink: move all the clear stuff to zink_clear.h
...
this was getting way too crowded in zink_context.h
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
3c4bc68a05
zink: optimize the remaining read cases of applying pending clear calls
...
we have src regions for all the blit/copy/map calls, so we can use those to
verify whether we actually need to apply the clears now or if we can keep
sitting on them a while longer
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
50281dacad
zink: add yet another clear helper, this time for applying overlap regions
...
if we know we're going to be reading from a region then we can examine the
pending clears to see if there's any overlap, which helps us decide whether
we need to apply them immediately
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
a8e047e8f4
zink: discard pending clears during blit/copy if we'll overwrite the data
...
these operations are redundant, so there's no point in forcing them through
since they'll never be visible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
031e3e68ee
zink: add helper for applying/discarding clears based on a rect
...
this lets us test whether we're going to overwrite a scissored clear
region in order to correctly no-op it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
a48bf14b44
zink: break out fb clear apply into helper function
...
we'll be reusing this shortly...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
f6cf5a64cc
zink: add another helper for checking whether one rect covers another
...
this is going to be used for no-oping writes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
72653ade81
zink: add helper for converting pipe_box -> u_rect
...
how is this not a thing already
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
787412b7eb
zink: break out region overlap testing function into helper
...
this is useful for a lot of copying operations
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
48716b1431
zink: also defer fb clears when conditional render is active
...
this just requires adding an explicit flush for the deferred clears in
case conditional rendering is disabled before a draw happens
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
5c629e9ff2
zink: defer pipe_context::clear calls when not currently in a renderpass
...
instead, we can attach the clear to the next renderpass start and even add it to
the renderpass cache for reuse
also add handling for flushing clears on map or fb switching to avoid brekaing behavior
this should save us a lot of time with potentially beginning/ending renderpasses as well
as allowing drivers to do better batching of clears by passing in all the buffers at
once
this doesn't handle deferring conditional renders yet in a futile attempt to try and keep
the size of the patch down
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
b37cba8271
zink: create framebuffer and renderpass objects just before vkCmdBeginRenderPass()
...
this lets us remove a flush and accumulate clears to perform in the renderpass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Mike Blumenkrantz
bd4f8786e3
zink: ralloc the main context
...
we can start sticking stuff onto this now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9206 >
2021-02-24 01:58:59 +00:00
Rob Clark
9d03dc2537
freedreno: Workaround for UNSYNC+DISCARD_RANGE
...
Dead-cells (and perhaps others) does MapBufferRange(UNSYNC|DISCARD_RANGE)
to update single buffered VBOs every frame in the opening menu screen,
and because we were considering UNSYNC with higher priority than
DISCARD_RANGE, this would result in the game racing VBO updates between
binning and tile passes, causing visibility stream inconsistency between
the two passes, resulting in "tile flicker".
The letter of the gl spec implies this is undefined behavior (at least
to my reading of it). But we already hand DISCARD_RANGE in the !UNSYNC
case, so just go down this path instead. It means we could potentially
end up invalidating (and back-blit) in cases where the app really knows
what it is doing, but oh well.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4337
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9223 >
2021-02-24 00:19:33 +00:00
Rob Clark
dabec19b05
freedreno: Add perf_debug logging for bo stalls
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9223 >
2021-02-24 00:19:33 +00:00
Rob Clark
e96cf1ed63
freedreno: Handle InvalidateBufferData() case
...
We already had all the mechanism, it just wasn't wired up.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9223 >
2021-02-24 00:19:33 +00:00
Dave Airlie
3e7e071ccf
lavapipe: enable KHR_maintenace3
...
At this stage I can't think of any reason a swrast would need to
limit descriptor sets at this point. I'm sure there are some in the
future.
Otherwise it just fixes up a lookup that really is a noop, but
may as well make it correct.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9238 >
2021-02-24 10:07:12 +10:00
Dave Airlie
f7414d9cd5
lavapipe: enable KHR_maintenance2
...
This seems to pass all the CTS tests at least. I think
most of the details are handled already.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9238 >
2021-02-24 10:07:08 +10:00
Dave Airlie
83c4e94196
lavapipe: handle tessellation domain winding
...
Fixes: dEQP-VK.tessellation.winding.*
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9238 >
2021-02-24 10:07:01 +10:00
Ian Romanick
52eb47c8d4
intel/compiler: Relax some conditions in try_copy_propagate
...
Previously can_do_source_mods was used to determine whether a value with
a source modifier or a value from a scalar source (e.g., a uniform)
could be copy propagated. The former is a superset of the latter, so
this always produces correct results, but it is overly restrictive. For
example, a BFI instruction can't have source modifiers, but it can have
scalar sources.
This was originally authored to prevent a small number of shader-db
regressions in a commit that marked SHR has not being able to have
source modifiers. That commit has since been dropped in favor of a
different method.
v2: Refactor register region restriction detection to a helper function.
Suggested by Jason.
No fossil-db changes on any Intel platform.
All Gen7+ platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 20039111 -> 20038943 (<.01%)
instructions in affected programs: 31736 -> 31568 (-0.53%)
helped: 104
HURT: 0
helped stats (abs) min: 1 max: 9 x̄: 1.62 x̃: 1
helped stats (rel) min: 0.30% max: 0.88% x̄: 0.45% x̃: 0.42%
95% mean confidence interval for instructions value: -2.03 -1.20
95% mean confidence interval for instructions %-change: -0.47% -0.42%
Instructions are helped.
total cycles in shared programs: 980309750 -> 980308897 (<.01%)
cycles in affected programs: 591078 -> 590225 (-0.14%)
helped: 70
HURT: 26
helped stats (abs) min: 2 max: 622 x̄: 23.94 x̃: 4
helped stats (rel) min: <.01% max: 2.85% x̄: 0.33% x̃: 0.12%
HURT stats (abs) min: 2 max: 520 x̄: 31.65 x̃: 6
HURT stats (rel) min: 0.02% max: 2.45% x̄: 0.34% x̃: 0.15%
95% mean confidence interval for cycles value: -26.41 8.64
95% mean confidence interval for cycles %-change: -0.27% -0.03%
Inconclusive result (value mean confidence interval includes 0).
No shader-db changes on earlier Intel platforms.
Reviewed-by: Anuj Phogat anuj.phogat@gmail.com [v1]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9237 >
2021-02-23 15:11:37 -08:00
Ian Romanick
3f18faea30
intel: Silence unused parameter warnings in files that include genX_pack.h
...
src/intel/genxml/gen4_pack.h: In function ‘__gen_address’:
src/intel/genxml/gen4_pack.h:115:38: warning: unused parameter ‘start’ [-Wunused-parameter]
115 | NDEBUG_UNUSED uint32_t start, uint32_t end)
| ~~~~~~~~~^~~~~
Reviewed-by: Anuj Phogat anuj.phogat@gmail.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9237 >
2021-02-23 15:11:37 -08:00
Ian Romanick
b5cf60b75d
intel: Silence unused parameter warnings in files that include gen_device_info.h
...
src/intel/dev/gen_device_info.h: In function ‘unsigned int gen_device_info_num_dual_subslices(const gen_device_info*)’:
src/intel/dev/gen_device_info.h:311:66: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
311 | gen_device_info_num_dual_subslices(const struct gen_device_info *devinfo)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Reviewed-by: Anuj Phogat anuj.phogat@gmail.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9237 >
2021-02-23 15:11:37 -08:00
Ian Romanick
0da47c4019
intel/compiler: Silence unused parameter warnings in files that include brw_eu.h
...
src/intel/compiler/brw_eu.h: In function ‘uint32_t brw_btd_spawn_msg_type(const gen_device_info*, uint32_t)’:
src/intel/compiler/brw_eu.h:1040:54: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
1040 | brw_btd_spawn_msg_type(const struct gen_device_info *devinfo,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
src/intel/compiler/brw_eu.h: In function ‘uint32_t brw_btd_spawn_exec_size(const gen_device_info*, uint32_t)’:
src/intel/compiler/brw_eu.h:1047:55: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
1047 | brw_btd_spawn_exec_size(const struct gen_device_info *devinfo,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
src/intel/compiler/brw_eu.h: In function ‘uint32_t brw_rt_trace_ray_desc_exec_size(const gen_device_info*, uint32_t)’:
src/intel/compiler/brw_eu.h:1065:63: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
1065 | brw_rt_trace_ray_desc_exec_size(const struct gen_device_info *devinfo,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Reviewed-by: Anuj Phogat anuj.phogat@gmail.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9237 >
2021-02-23 15:11:37 -08:00
Mike Blumenkrantz
41bd5f7cd7
lavapipe: fix color-only renderpass clears
...
not all attachments must be cleared
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9234 >
2021-02-23 21:21:21 +00:00
Eric Anholt
5e0e04f288
llvmpipe: Enable FXT1 texture decompression.
...
We have the software decode hooked up now, and it's not like this
decompression is more expensive than a lot of other software decompression
we have. One less feature to be missing from the old swrast classic driver.
Reviewed-by: Adam jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9194 >
2021-02-23 20:38:50 +00:00
Eric Anholt
a46b73ee25
mesa: Move the FXT1 compressor/decompressor to util/
...
softpipe failed at handling FXT1, despite exposing it, because we didn't
have a fetch function for it in the util/ format table.
Fixes : #3968
Reviewed-by: Adam jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9194 >
2021-02-23 20:38:50 +00:00
Eric Anholt
db0c2ef979
mesa: Get the FXT1 compressor/decompressor off of GL types.
...
We can use stdint now. This is preparation for moving to util/
Reviewed-by: Adam jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9194 >
2021-02-23 20:38:50 +00:00
Eric Anholt
e08a04a140
softpipe: Fix the const buffer overflow check.
...
The size is in bytes, pos is a dword index.
Fixes these asan failures (not tested in CI since we run a fraction):
dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_expression_compute,Crash
dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_literal_compute,Crash
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9162 >
2021-02-23 19:26:53 +00:00
Mike Blumenkrantz
f88d03c16c
zink: actually disable sample mask tests on ci
...
Fixes: 5edbc6148d ("zink: disable some builtin-gl-sample-mask sample shading tests on ci")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9227 >
2021-02-23 19:13:34 +00:00
Adam Jackson
292d45497f
gallium/xlib: Partial fix for glXCopySubBufferMESA
...
xmesa_copy_st_framebuffer would attempt to flush from the front buffer
to the display, but we don't actually have an attachment for the front
buffer (just the back) so nothing would happen. Fix this by flushing
fron the back to the display, threading the dirty box through so we
don't update more than we were told to.
This has the virtue of displaying correctly, but glx-copy-sub-buffer
still fails since there is no real front buffer, reads from GL_FRONT
actually read from the back buffer. The test does: clear to red, swap,
clear to green, copy sub-buffer, expect a green square inside of a red
one from the front buffer. Since you're really reading from the back you
instead get solid green.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9140 >
2021-02-23 18:57:57 +00:00
Mauro Rossi
6635a47038
android: ac/rgp: fix building error
...
Include "util/list.h" as per "util/simple_mtx.h" one line later
Fixes the following building error in Android:
In file included from external/mesa/src/amd/common/ac_rgp.c:24:
external/mesa/src/amd/common/ac_rgp.h:31:10: fatal error: 'list.h' file not found
^~~~~~~~
1 error generated.
Fixes: 12515d6b ("ac/rgp: add rgp co, col, pso data structures")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4334
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9202 >
2021-02-23 18:26:42 +00:00
Juan A. Suarez Romero
4675121ea6
ci/v3d: Update expected resuls for piglit
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Andres Gomez <agomez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9224 >
2021-02-23 18:14:51 +00:00
Eric Anholt
c80ddf9d74
zink: Remove NULL checks after GET_PROC_ADDR_INSTANCE().
...
They're already done inside GET_PROC_ADDR*().
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8891 >
2021-02-23 18:01:47 +00:00
Eric Anholt
c43e8da535
zink: Use mesa_loge() for should-never-be-reached initialization errors.
...
dEQP in CI was hitting these, and debug_printf is not enabled on non-debug
(such as debugoptimized or release) builds. Besides, mesa_loge() gets you
logging on Android, should someone ever do zink for that.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8891 >
2021-02-23 18:01:47 +00:00
Eric Anholt
d53fa9d9ff
ci/zink: Add tests of gles2, gles3, and gl33 on lavapipe.
...
This catches a bunch of conformance issues on the current driver stack.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8891 >
2021-02-23 18:01:47 +00:00
Jesse Natalie
a77eedd6bb
docs: Document USE_ELF_TLS can work on Windows too
...
Reviewed-by: Jose Fonseca <jfonseca@vmware.com .>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9165 >
2021-02-23 17:06:48 +00:00
Jesse Natalie
ba141b95a7
glapi: Support "ELF" TLS on Windows
...
To avoid a massive rename, I'm leaving this as a misnomer, it's not
really ELF TLS, but it's the same concept.
Note that Windows doesn't support thread-local variables imported
or exported between modules, so we can only support this when we're
not using a shared glapi.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4050
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9165 >
2021-02-23 17:06:48 +00:00
Bas Nieuwenhuizen
d7e1f492bc
radv: Disable displayable DCC for GFX8 properly.
...
On scanout the GFX8 ac_surface doesn't clear the size but only
doesn't allocate space and hence dcc_offset is 0. This is the same
as radeonsi.
Fixes: 7acb30de8a ("radv: Enable displayable DCC.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4346
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9221 >
2021-02-23 16:57:04 +00:00
Mike Blumenkrantz
5edbc6148d
zink: disable some builtin-gl-sample-mask sample shading tests on ci
...
these are super flaky
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9219 >
2021-02-23 16:46:53 +00:00
Pierre-Eric Pelloux-Prayer
e346f61a91
mesa: update vao _EnabledWithMapMode in copy_array_object
...
Otherwise it can be out of sync.
Fixes: 306f1ef417 ("mesa: precompute _mesa_get_vao_vp_inputs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4331
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com >
Tested-by: Witold Baryluk <witold.baryluk@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9199 >
2021-02-23 15:48:01 +00:00
Lionel Landwerlin
b0b1bf9957
anv: Fix wait_count missing increment
...
If we don't wait on anything, I bet it makes the QueuePresent faster,
but also completely wrong...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 02f94c3306 ("anv: don't wait for completion of work on vkQueuePresent()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9211 >
2021-02-23 15:39:42 +00:00
Jan Beich
97ff5160d1
ac/rgp: define EM_AMDGPU if missing for compatibility
...
EM_AMDGPU isn't defined on DragonFly, FreeBSD, OpenBSD, so use the
same workaround as ac_rtld.c.
src/amd/common/ac_rgp_elf_object_pack.c:382:24: error: use of undeclared identifier 'EM_AMDGPU'
elf_hdr.e_machine = EM_AMDGPU;
^
Fixes: 110bb2c77d ("ac/rgp: add helper function to write rgp elf oject")
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9169 >
2021-02-23 15:19:41 +00:00
Jan Beich
ec35c4b57c
ac: prefer system EM_AMDGPU definition
...
May improve compatibility with systems where EM_AMDGPU value is
different from Linux.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9169 >
2021-02-23 15:19:41 +00:00
Christian Gmeiner
dba692c618
etnaviv: use nir_lower_uniforms_to_ubo(..)
...
This removes our local copy and fixes the following nir validation problem:
error: nir_intrinsic_range(instr) != 0 (../src/compiler/nir/nir_validate.c:646)
No piglit or deqp regression seen.
shader-db results for GC3000:
instructions helped: shaders/deqp_gles2/23470.shader_test VERT: 328 -> 316 (-3.66%)
instructions helped: shaders/deqp_gles2/23473.shader_test FRAG: 328 -> 316 (-3.66%)
instructions helped: shaders/glamor/88.shader_test FRAG: 472 -> 452 (-4.24%)
instructions helped: shaders/chromeos/36.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/chromeos/24.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/chromeos/18.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/chromeos/45.shader_test VERT: 60 -> 56 (-6.67%)
instructions helped: shaders/deqp_gles2/23494.shader_test VERT: 176 -> 164 (-6.82%)
instructions helped: shaders/deqp_gles2/23497.shader_test FRAG: 176 -> 164 (-6.82%)
instructions helped: shaders/glamor/82.shader_test FRAG: 280 -> 260 (-7.14%)
instructions helped: shaders/chromeos/21.shader_test VERT: 56 -> 52 (-7.14%)
instructions helped: shaders/chromeos/15.shader_test VERT: 56 -> 52 (-7.14%)
instructions helped: shaders/tesseract/268.shader_test VERT: 152 -> 136 (-10.53%)
instructions helped: shaders/tesseract/270.shader_test VERT: 184 -> 164 (-10.87%)
instructions helped: shaders/tesseract/272.shader_test VERT: 216 -> 192 (-11.11%)
instructions helped: shaders/tesseract/266.shader_test VERT: 88 -> 76 (-13.64%)
instructions helped: shaders/deqp_gles2/23488.shader_test VERT: 112 -> 96 (-14.29%)
instructions helped: shaders/deqp_gles2/23491.shader_test FRAG: 112 -> 96 (-14.29%)
instructions helped: shaders/chromeos/102.shader_test VERT: 168 -> 144 (-14.29%)
instructions helped: shaders/deqp_gles2/23449.shader_test FRAG: 64 -> 52 (-18.75%)
instructions helped: shaders/deqp_gles2/23446.shader_test VERT: 64 -> 52 (-18.75%)
instructions helped: shaders/deqp_gles2/23461.shader_test FRAG: 124 -> 100 (-19.35%)
instructions helped: shaders/deqp_gles2/23458.shader_test VERT: 124 -> 100 (-19.35%)
instructions helped: shaders/chromeos/39.shader_test VERT: 124 -> 100 (-19.35%)
temps helped: shaders/chromeos/102.shader_test VERT: 6 -> 5 (-16.67%)
temps helped: shaders/deqp_gles2/23470.shader_test VERT: 5 -> 4 (-20.00%)
temps helped: shaders/deqp_gles2/23473.shader_test FRAG: 5 -> 4 (-20.00%)
temps HURT: shaders/tesseract/272.shader_test VERT: 6 -> 7 (16.67%)
immediates helped: shaders/deqp_gles2/23470.shader_test VERT: 24 -> 20 (-16.67%)
immediates helped: shaders/deqp_gles2/23473.shader_test FRAG: 24 -> 20 (-16.67%)
immediates helped: shaders/chromeos/102.shader_test VERT: 8 -> 4 (-50.00%)
immediates helped: shaders/chromeos/39.shader_test VERT: 8 -> 4 (-50.00%)
immediates HURT: shaders/glamor/88.shader_test FRAG: 32 -> 36 (12.50%)
immediates HURT: shaders/deqp_gles2/23494.shader_test VERT: 4 -> 8 (100.00%)
immediates HURT: shaders/deqp_gles2/23497.shader_test FRAG: 4 -> 8 (100.00%)
total instructions in shared programs: 1123728 -> 1123392 (-0.03%)
instructions in affected programs: 3644 -> 3308 (-9.22%)
helped: 24
HURT: 0
helped stats (abs) min: 4 max: 24 x̄: 14.00 x̃: 12
helped stats (rel) min: 3.66% max: 19.35% x̄: 10.74% x̃: 8.83%
95% mean confidence interval for instructions value: -17.11 -10.89
95% mean confidence interval for instructions %-change: -13.03% -8.45%
Instructions are helped.
total temps in shared programs: 86978 -> 86976 (<.01%)
temps in affected programs: 22 -> 20 (-9.09%)
helped: 3
HURT: 1
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 16.67% max: 20.00% x̄: 18.89% x̃: 20.00%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 16.67% max: 16.67% x̄: 16.67% x̃: 16.67%
95% mean confidence interval for temps value: -2.09 1.09
95% mean confidence interval for temps %-change: -38.40% 18.40%
Inconclusive result (value mean confidence interval includes 0).
total immediates in shared programs: 141464 -> 141460 (<.01%)
immediates in affected programs: 104 -> 100 (-3.85%)
helped: 4
HURT: 3
helped stats (abs) min: 4 max: 4 x̄: 4.00 x̃: 4
helped stats (rel) min: 16.67% max: 50.00% x̄: 33.33% x̃: 33.33%
HURT stats (abs) min: 4 max: 4 x̄: 4.00 x̃: 4
HURT stats (rel) min: 12.50% max: 100.00% x̄: 70.83% x̃: 100.00%
95% mean confidence interval for immediates value: -4.53 3.38
95% mean confidence interval for immediates %-change: -48.17% 70.79%
Inconclusive result (value mean confidence interval includes 0).
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9039 >
2021-02-23 14:55:34 +00:00
Christian Gmeiner
1837135f7c
etnaviv: nir: add ubo lowering pass
...
Adds a pass to lower the load_ubo intrinsics for block 0 back
to load_uniform intrinsic.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9039 >
2021-02-23 14:55:34 +00:00
Daniel Schürmann
ffebe48013
aco: don't rematerialize exec
...
Since exec is not considered a temporary anymore,
we accidentally allowed to rematerialize it.
Fixes: a56ddca4e8 ('aco: make all exec accesses non-temporaries')
Closes : #4327
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9215 >
2021-02-23 14:41:31 +00:00
Christian Gmeiner
337ba88293
vc4: let st lower rect tex
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
9c67324542
etnaviv: let st lower rect tex
...
Before this change we used a dummy load_uniform to represent texcoord
scale. That dummy load was converted to a load_const where we are using
the upper 32 bits to store the uniform content type and that breaks nir's
validation. With the new nir_intrinsic_load_texture_scaling we know the
uniform type and do not need to go from load_ubo->load_const (with type
information).
shader-db for GC3000:
instructions helped: shaders/tesseract/491.shader_test FRAG: 260 -> 248 (-4.62%)
instructions helped: shaders/tesseract/494.shader_test FRAG: 256 -> 244 (-4.69%)
instructions helped: shaders/tesseract/238.shader_test FRAG: 244 -> 232 (-4.92%)
instructions helped: shaders/tesseract/241.shader_test FRAG: 244 -> 232 (-4.92%)
instructions helped: shaders/tesseract/127.shader_test FRAG: 80 -> 76 (-5.00%)
instructions helped: shaders/tesseract/130.shader_test FRAG: 156 -> 148 (-5.13%)
instructions helped: shaders/tesseract/226.shader_test FRAG: 204 -> 192 (-5.88%)
instructions helped: shaders/tesseract/229.shader_test FRAG: 204 -> 192 (-5.88%)
instructions helped: shaders/tesseract/217.shader_test FRAG: 164 -> 152 (-7.32%)
instructions helped: shaders/tesseract/214.shader_test FRAG: 164 -> 152 (-7.32%)
instructions helped: shaders/tesseract/205.shader_test FRAG: 124 -> 112 (-9.68%)
instructions helped: shaders/tesseract/202.shader_test FRAG: 124 -> 112 (-9.68%)
instructions helped: shaders/tesseract/169.shader_test FRAG: 36 -> 32 (-11.11%)
instructions helped: shaders/tesseract/166.shader_test FRAG: 36 -> 32 (-11.11%)
instructions helped: shaders/tesseract/118.shader_test FRAG: 32 -> 28 (-12.50%)
instructions helped: shaders/tesseract/181.shader_test FRAG: 60 -> 52 (-13.33%)
instructions helped: shaders/tesseract/178.shader_test FRAG: 60 -> 52 (-13.33%)
instructions helped: shaders/tesseract/121.shader_test FRAG: 60 -> 52 (-13.33%)
instructions helped: shaders/tesseract/193.shader_test FRAG: 84 -> 72 (-14.29%)
instructions helped: shaders/tesseract/190.shader_test FRAG: 84 -> 72 (-14.29%)
temps HURT: shaders/tesseract/494.shader_test FRAG: 6 -> 7 (16.67%)
temps HURT: shaders/tesseract/491.shader_test FRAG: 6 -> 7 (16.67%)
total instructions in shared programs: 1122112 -> 1121920 (-0.02%)
instructions in affected programs: 2676 -> 2484 (-7.17%)
helped: 20
HURT: 0
helped stats (abs) min: 4 max: 12 x̄: 9.60 x̃: 12
helped stats (rel) min: 4.62% max: 14.29% x̄: 8.92% x̃: 8.50%
95% mean confidence interval for instructions value: -11.14 -8.06
95% mean confidence interval for instructions %-change: -10.65% -7.18%
Instructions are helped.
total temps in shared programs: 86942 -> 86944 (<.01%)
temps in affected programs: 12 -> 14 (16.67%)
helped: 0
HURT: 2
total immediates in shared programs: 141216 -> 141216 (0.00%)
immediates in affected programs: 0 -> 0
helped: 0
HURT: 0
total loops in shared programs: 0 -> 0
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
LOST: 0
GAINED: 0
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
06f409a8c1
etnaviv: nir: support nir_intrinsic_load_texture_rect_scaling
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
7c40e9a322
ttn: lower rectangle textures if not supported
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
08e072015a
gallium/st: lower rectangle textures if not supported
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
758a2d5343
gallium: add PIPE_CAP_TEXRECT
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
8cb52f6735
nir/lower_tex: wider usage of nir_tex_instr_src_index(..)
...
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Suggested-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
a403ff4d70
nir/lower_tex: 'txs free' tex_rect lowering
...
GPUs without native txs support (and without an emulation in sw)
can use this new lowering. Also it saves us from doing int/float
conversions.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
3fbde2fd93
nir: add has_txs flag
...
Some nir lowerings might need to know if txs is supported by
the backend.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Christian Gmeiner
b0e23c92b3
nir: add load_texture_rect_scaling
...
Will be used in a different form of lower_rect tex lowering.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8898 >
2021-02-23 14:04:30 +00:00
Samuel Pitoiset
765097eac4
radv: add support for instruction timing with RGP
...
This is probably the most useful feature with SQTT/RGP.
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/9130 >
2021-02-23 13:03:39 +00:00
Samuel Pitoiset
a72b7a9b6c
radv: add support for exporting pipelines with RGP
...
This is still experimental and only enabled with
RADV_THREAD_TRACE_PIPELINE to avoid breaking existing support.
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/9130 >
2021-02-23 13:03:39 +00:00
Samuel Pitoiset
884e14d784
radv: store a pointer to the code in radv_shader_variant
...
This will be used by SQTT to dump the disassembly.
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/9130 >
2021-02-23 13:03:39 +00:00
Bas Nieuwenhuizen
7acb30de8a
radv: Enable displayable DCC.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:42 +01:00
Bas Nieuwenhuizen
f848f2adfa
radv: Use ac_surface DCC settings for shareable images.
...
On GFX10 the settings for displayable DCC are different than those
for normal texturing.
This is technically a slight pessimization as ac_surface does not
know about textures that don't have to be sampled. However, for color
surfaces this is a very unlikely situation as presumably even MSAA
images have to be resolved (potentially using texture HW).
So in practice this should be equal for everything except displayable DCC.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:36 +01:00
Bas Nieuwenhuizen
0e189dd3fd
radv: Add DCC info to the metadata.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:33 +01:00
Bas Nieuwenhuizen
54f3ed224d
radv: Implement displayable DCC retiling.
...
Straightforward implementation using the retile map from radeonsi.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:29 +01:00
Bas Nieuwenhuizen
e34542bdf1
radv: Implement initialization of displayable DCC.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:26 +01:00
Bas Nieuwenhuizen
d78389ea5f
amd/common: Add retile map size helper.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:23 +01:00
Bas Nieuwenhuizen
e59847f67f
radv: Use shared code for setting opaque metadata.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:20 +01:00
Bas Nieuwenhuizen
9c5c995cbe
radv: Handle UMD metadata on import.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:32:16 +01:00
Bas Nieuwenhuizen
1a88805ded
amd/common: constify ac_surface_set_umd_metata.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9042 >
2021-02-23 13:31:55 +01:00
Rhys Perry
75c9adf039
aco/lower_phis: fix all_preds_uniform with continue_or_break
...
Found in a Death Stranding shader with loop unrolling disabled.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: 9a089baff1 ("aco: optimize boolean phis with uniform selections")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9193 >
2021-02-23 10:46:56 +00:00
Iago Toral Quiroga
54c17e45ae
broadcom/compiler: skip unnecessary unifa writes
...
If a new UBO load happens to read exactly at the offset right after the
previous UBO load (something that is fairly common, for example when
reading a matrix), we can skip the unifa write (with its 3 delay slots)
and just continue to call ldunifa to continue reading consecutive addresses.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
e1cf2406da
broadcom/compiler: add a constant alu optimization pass
...
Currently this is useful to clean up after DCEing leading ldunifa
instructions, but it can be expanded to handle more cases which
may allow to simplify the compiler code in places where we have
been trying to optimize manually for similar cases.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
89de085055
broadcom/compiler: remove unused leading ldunifa
...
This requires that we go back to the unifa write and update the address
to jump over the unused leading component.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
9d16d2d0be
broadcom/compiler: allow dead code elimination of unused trailing ldunifa
...
If a ldunifa is the last in a sequence and is not used, we can safely
eliminate it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
Iago Toral Quiroga
e20ae14978
broadcom/compiler: fix ldunif optimization
...
When we look back for a previous uniform definition we want to
start looking from the current position of the cursor, not the
end of the current block. The latter only works when translating
from NIR, since in that case both always match, but any optimization
pass may rewrite code and emit uniforms at any place in the middle of
the program.
Also, ntq_store_dest expects result to be written by the last instruction
to handle the case where it is stored to a NIR register. That won't be
the case if the result comes from an optimized uniform, so in that case
we need to insert a MOV, like we do in non-uniform control flow.
v2: fix ntq_store_dest for optimized uniforms.
Fixes: 14af7b3085 ('broadcom/compiler: don't emit redundant ldunif')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9128 >
2021-02-23 08:08:01 +00:00
James Park
9f30370654
vulkan: Use typed outarray API
...
MSVC cannot perform GCC __typeof__ for C code. (C++ has decltype.)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:18:11 +10:00
Dave Airlie
054dd668a6
meson/llvm: add native for gallium swrast
...
If we are building llvmpipe and lavapipe we want native in this
list.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:17:28 +10:00
Dave Airlie
611e9f29e2
lavapipe: fix icd generation for windows
...
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:17:12 +10:00
Dave Airlie
34ed5e4e60
lavapipe: add dll definition file instead of using PUBLIC
...
This avoids conflicts with the definitions in vk_icd.h
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:17:06 +10:00
Dave Airlie
deb44bc317
lavapipe: fix msvc initialiser
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:16:55 +10:00
Dave Airlie
4eada33223
lavapipe: use the common icd generator
...
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9208 >
2021-02-23 17:16:40 +10:00
Mike Blumenkrantz
806577cbcc
zink: update ci results
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 22:50:52 -05:00
Mike Blumenkrantz
445dd1906f
zink: handle PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in transfer_map for buffers
...
when discarding the whole resource on an unused resource, we can deinit the buffer
range here
in the future, ideally we should be doing something like creating a new vk buffer/image
entirely here and demoting the existing one to a queue that destroys/caches it when
the batch finishes in order to avoid fencing
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:33 -05:00
Mike Blumenkrantz
4d5f7b3a6d
zink: change some transfer_map cases of waiting on cs batch to flushing cs
...
we don't actually have to stall here, we just have to make sure the cs batch
is submitted before the subsequent buffer copy command goes into a gfx
batch in order to preserve the ordering
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:32 -05:00
Mike Blumenkrantz
07df65d45f
zink: only wait on last write-batch for resources during transfer_map
...
if we need to sync a resource for read-only mapping, we only need to wait on
the fence that was last flagged as having writes to the resource, not batches
that may have reads, as reads don't affect memory coherency
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:32 -05:00
Mike Blumenkrantz
16792ccaa1
zink: beef up zink_transfer_flush_region
...
this now takes over from previous call sites in zink_transfer_unmap
we add a flush here if we had pending usage to ensure that the resource
gets properly synced
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9146 >
2021-02-22 21:20:29 -05:00
Mike Blumenkrantz
211437c938
zink: simplify barrier usage
...
this simplifies the barrier helper callsites as we no longer need
to check whether a barrier is needed beforehand in order to avoid potentially
ending a renderpass too early
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9205 >
2021-02-23 01:44:34 +00:00
Mike Blumenkrantz
98250d42b7
zink: only reset pipeline hash conditionally when updating fb state
...
if we aren't changing anything here then we don't need to update the pipeline
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9189 >
2021-02-23 01:17:38 +00:00
Mike Blumenkrantz
b1843879c1
zink: move gfx pipeline creation closer to the bind point
...
ensure that the renderpass has already been started by this point so
we have a valid object
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9189 >
2021-02-23 01:17:38 +00:00
Dave Airlie
1f5cd19ac9
zink/ci: disable arb_timer_query tests
...
These are going to be flaky in CI so don't bother
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9204 >
2021-02-23 10:48:29 +10:00
Mike Blumenkrantz
60726ed0d3
zink: rename 'has_draw' flag on batches and set it when the batch is used
...
this lets us add some tracking later for handling no-op fencing
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9190 >
2021-02-23 00:20:34 +00:00
Mike Blumenkrantz
90bcb91cd5
zink: destroy renderpass objects on context destroy
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9192 >
2021-02-23 00:13:23 +00:00
Dave Airlie
3b9357727b
zink/ci: update results for GL 3.3 testing enables
...
There are some new crashes/fails but I don't think the lavapipe
change is at fault for those.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8909 >
2021-02-23 09:49:00 +10:00
Dave Airlie
fd55eea2ba
lavapipe: add calibrated timestamp support
...
This is a bit of a lie, but it's enough to get zink support
for timer queries to work.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8909 >
2021-02-23 09:42:06 +10:00
Eric Anholt
60d413b894
ci: Move the piglit expectations lists to the per-driver CI dirs.
...
Now changing piglit expectations won't retest everyone else's drivers.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9161 >
2021-02-22 23:02:43 +00:00
Eric Anholt
ad77170b85
ci: Move the dEQP and traces expectations to the per-driver CI dirs.
...
This means less custom test-source-dep stuff for these drivers, though it
means that touching the CI expects files will cause a bit more retesting:
- broadcom drivers retest as a group (but Igalia requested that
organization of CI files)
- radv+radeonsi retest as a group
- lvp+llvmpipe retest as a group
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9161 >
2021-02-22 23:02:42 +00:00
Ian Romanick
f2656569c6
nir/range_analysis: Handle vectors better in ssa_def_bits_used
...
If a query is made of a vector ssa_def (possibly from an intermediate
result), return all_bits. If a constant source is a vector, swizzle
the correct component.
Unit tests were added for the constant vector cases. I don't see a
great way to make unit tests for the other cases.
v2: Add a FINIHSME comment about u16vec2 hardware.
Fixes: 96303a59ea ("nir: Add some range analysis for used bits")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9123 >
2021-02-22 22:37:17 +00:00
Ian Romanick
ce649e54f1
nir/range-analysis: C++ linkage
...
Fixes: 96303a59ea ("nir: Add some range analysis for used bits")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9123 >
2021-02-22 22:37:17 +00:00
Dave Airlie
cccac5e14f
zink/ci: update results now that we are testing zink/lavapipe
...
Once the extension fix is merged the CI results change appreciably.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9185 >
2021-02-22 21:48:42 +00:00
Dave Airlie
40ea20c5f7
zink: use extensioned draw indirect functions.
...
The code was using the core versions, but for vulkan 1.0 at
least the extension versions are what is required to be asked for.
This fixes zink loading on lavapipe, and blows up the CI.
v2: Use LOCAL device extension variant (zmike)
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9185 >
2021-02-22 21:48:42 +00:00
Lionel Landwerlin
02f94c3306
anv: don't wait for completion of work on vkQueuePresent()
...
Another mistake which is that we don't use the right wait API.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 829699ba63 ("anv: implement shareable timeline semaphores")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9188 >
2021-02-22 21:43:05 +00:00
Lionel Landwerlin
cb74cd816c
anv: reset binary syncobj to be signaled before submission
...
Before we introduced the submission thread in 829699ba63 , once we
returned from vkQueueSubmit, all signaled syncobj would have a
i915_request/dma-fence waiting to be signaled by some work that would
submitted to HW by i915.
After this submission thread that is no longer the case. We added a
few checks in places like vkQueuePresentKHR() to wait for the binary
semaphores to materialize before we would hand things over to the WSI
code.
Unfortunately 829699ba63 forgot to reset the signaled binary
semaphore.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 829699ba63 ("anv: implement shareable timeline semaphores")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9188 >
2021-02-22 21:43:05 +00:00
Jeremy Huddleston Sequoia
38ae84b8da
Adjust dylib compatibility versions to match what was set by mesa-18.3's autotools-based builds
...
Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4113
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8796 >
2021-02-22 21:27:19 +00:00
Dave Airlie
279d170552
glx: proposed fix for setSwapInterval
...
When mesa gets a DRI2 1.1 connection (as experienced with
vmwware DDX) we don't get a pointer for this.
Don't explode just keep going.
Fixes: 60ebeb4608 ("glx: Implement GLX_EXT_swap_control for DRI2 and DRI3")
Reviewed-by: Adam Jackson <ajaX@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9184 >
2021-02-22 20:48:42 +00:00
Gert Wollny
ee27ca68f8
r600/sfn: Base instr lowering class on nir_lower_instruction code
...
Now that the lowering pass has been update there is no need to
duplicate the code to scan the shader.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9167 >
2021-02-22 20:43:02 +00:00
Gert Wollny
a877ce1aba
r600/sfn: remove duplicate barriers
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9167 >
2021-02-22 20:43:02 +00:00
Gert Wollny
fa588edf15
r600/sfn: Fix indirect_file flag for IMAGES
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9167 >
2021-02-22 20:43:02 +00:00
Gert Wollny
66f4cac69e
r600/sfn: Handle memory_barrier_atomic_counters
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9167 >
2021-02-22 20:43:02 +00:00
Mauro Rossi
099938d0f8
android: util/fossilize_db: add missing sources to Makefile.sources
...
Fixes the following building errors:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/i915_dri_intermediates/LINKED/i915_dri.so
ld.lld: error: undefined symbol: foz_read_entry
>>> referenced by disk_cache_os.c:945 (external/mesa/src/util/disk_cache_os.c:945)
ld.lld: error: undefined symbol: foz_write_entry
>>> referenced by disk_cache_os.c:951 (external/mesa/src/util/disk_cache_os.c:951)
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.anv_intermediates/LINKED/vulkan.anv.so
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.radv_intermediates/LINKED/vulkan.radv.so
ld.lld: error: undefined symbol: foz_destroy
>>> referenced by disk_cache.c:237 (external/mesa/src/util/disk_cache.c:237)
ld.lld: error: undefined symbol: foz_read_entry
>>> referenced by disk_cache_os.c:945 (external/mesa/src/util/disk_cache_os.c:945)
ld.lld: error: undefined symbol: foz_write_entry
>>> referenced by disk_cache_os.c:951 (external/mesa/src/util/disk_cache_os.c:951)
Fixes: eca6bb9540 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Acked-by: Timothy Arceri <tarceri@itsqueeze.com >
Tested-by: Marijn Suijten <marijns95@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9178 >
2021-02-22 19:49:05 +00:00
Eric Anholt
419758abc8
ci/a5xx: Increase our dEQP GLES3 fraction by 4x.
...
Now that we've got SMP, we can get a lot more of this test suite covered
in our 10-minute job window.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144 >
2021-02-22 19:31:46 +00:00
Eric Anholt
6e89593752
ci/a5xx: Update the piglit expectations.
...
Now with -j4 in place, we can actually complete a manual piglit job in
less than an hour! (barely)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144 >
2021-02-22 19:31:46 +00:00
Eric Anholt
fcc2ed6299
ci/bare-metal: Use an upstream kernel for db820c.
...
On top of the last kernel tree I added a couple of DT changes for db820c
from the qcom landing tree necessary for bringing up the GPU, and a fix to
my OOB cleanups fro cheza. I also enabled the CPU clock driver for db820c
so we can turn on SMP and not leave jobs stranded on a 19Mhz CPU or whatever.
This causes us to need a bit of updating of our TF expectations since the
order of jobs changes a bit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144 >
2021-02-22 19:31:46 +00:00
Eric Anholt
8c539275d9
ci/freedreno: Remove stray BM_DTB definition.
...
It's unused -- cheza uses an image with kernel+dtb glued together, and
this var does nothing (which is good, given that it was pointing to
db820c.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144 >
2021-02-22 19:31:46 +00:00
Eric Anholt
63a7f1fa29
ci/freedreno: Fix a5xx piglit runs.
...
I missed this regression in the "start using Xorg" branch since the piglit
runs are manual. I made the piglit runs accidentally require a core
context, which a5xx can't do (it's only GL 3.1).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144 >
2021-02-22 19:31:46 +00:00
Alyssa Rosenzweig
856b71bef0
pan/bi: Do copyprop in linear-time
...
Per discussion with Daniel Schürmann on IRC about the joys of SSA form
and why you don't actually need use-def chains. Indeed, I didn't. No
shader-db changes, time difference in shader-db is neglible since the
win from this is particularly for large shaders.
Total runtime of
dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.std430_instance_array
reduced from 1.04s to 0.77s (25%)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
07456bcde2
pan/bi: Remove unused definitions
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
4f71801aa2
pan/bi: Adapt builder to dest count
...
If there are no destinations, don't produce a _to version, and let the
bare version return the bi_instr.
If there are multiple destinations, take each in the _to version and
don't produce a bare version.
Both cares are probably what you wanted anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
ac3722fd83
pan/bi: Annotate instructions by destination count
...
Allows for better builders.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
c4ed4cbf14
pan/bi: Allow spilling with multiple destinations
...
Now that we fixed this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
8cbded63fb
pan/bi: Make bi_writemask take a destination
...
Assuming it's only the first destination breaks assumptions across the
compiler. Add a destination source and fix up the many corresponding
issues. Nothing to backport as far as I understand since multidest
instruction are new.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
35e24aef6f
pan/bi: Mark DISCARD as having side effects
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
25da85880e
pan/bi: Mark branches as having side effects
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
11fbe5aeb5
pan/bi: Inline bytemask of read components
...
Only used in one place (and should never be used elsewhere -- even this
use is questionable). By inlining we avoid O(N^2) behaviour on the
number of sources in liveness updates.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
9882a59a2f
pan/bi: Reduce liveness calculations in DCE
...
Forward port of fc06b8b7 ("pan/mdg: Optimize liveness computation in
DCE")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
3a4d985997
pan/bi: Use nir_opt_sink/move for constants
...
Fixes excessive (and failing) spilling in dEQP-GLES31.functional.ssbo.layout.*
shader-db results are a toss up (I suspect we'd see better results if we
tracked register pressure directly):
total instructions in shared programs: 161377 -> 161377 (0.00%)
total nops in shared programs: 121159 -> 121203 (0.04%)
nops in affected programs: 1839 -> 1883 (2.39%)
Nops are HURT.
total clauses in shared programs: 31604 -> 31606 (<.01%)
clauses in affected programs: 38 -> 40 (5.26%)
Inconclusive result (value mean confidence interval includes 0).
total quadwords in shared programs: 130847 -> 130845 (<.01%)
quadwords in affected programs: 1246 -> 1244 (-0.16%)
Inconclusive result (value mean confidence interval includes 0).
total loops in shared programs: 18 -> 18 (0.00%)
total spills in shared programs: 705 -> 705 (0.00%)
total fills in shared programs: 1645 -> 1645 (0.00%)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
5eff64e3a3
panfrost: Don't advertise OES_copy_image
...
We don't support it yet.
Fixes: 61d3ae6e0b ("panfrost: Initial stub for Panfrost driver")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
af46efaf60
panfrost: Fix typo in midgard.xml
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:50 +00:00
Alyssa Rosenzweig
f1964bde50
panfrost: Reinterpret format for reload blits
...
Fixes dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.r32ui_rgb10_a2.texture2d_to_texture2d
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
56047fb64d
panfrost: Fix UNORM 16 rendering
...
fp16 loses precision.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
1b239a3786
panfrost: Hide MSAA 8x/16x support
...
dEQP-GLES31.functional.texture.multisample.samples_16.sample_position is
failing on Bifrost, and we already weren't advertising on Midgard. Until
someone gets spare cycles to debug all the problems, keep it hidden
behind a debug flag to avoid introducing bugs.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
3f21b089f8
panfrost: Raise TEXTURE_BUFFER_OFFSET_ALIGNMENT
...
The blob advertises 64 for this, so let's use the same value. Small
alignments are observed to raise an IMPRECISE_FAULT at least on Bifrost.
As a bonus this forces cache line alignment which will help perf. Fixes
dEQP-GLES31.functional.texture.texture_buffer.render.as_vertex_texture.offset_1_alignments
Fixes: 5f7bafa316 ("panfrost: Enable ARB_texture_buffer_object")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
76fb3961b1
panfrost: Fix NULL deref in pan_sfbd
...
The last of the nr_cbufs audit changes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
a124c47b9f
panfrost: Fix NULL derefs in pan_cmdstream.c
...
Auditing nr_cbufs. Note we have to augment the blending logic a bit to
use the same 'no blend' case for missing RTs as we do for depth-only
passes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
4f17852474
panfrost: Fix NULL deref in pan_mfbd.c
...
Auditing all uses of nr_cbufs
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
8db8b72951
panfrost: Remove redundant NULL check
...
Already checked in the callee, no need to check in the caller.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
03c2c0f0c4
panfrost: Fix NULL dereference adding cbuf to batch
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
7af037fc11
panfrost: Fix infinite loop spilling
...
At least this way failed RA will crash (by having no spill node to pick)
instead? Seen in
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.21 on
Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164 >
2021-02-22 19:17:49 +00:00
Alyssa Rosenzweig
04be7934df
pan/bi: Fix elimination of repeated branches
...
How many times can I break such a small pass?
Fixes: a805d999c0 ("pan/bi: Fix jumps to terminal block again")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137 >
2021-02-22 17:12:55 +00:00
Alyssa Rosenzweig
a496b41d50
pan/bi: Optimize out redundant jumps to #0x0
...
If it's the last instruction, that's silly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137 >
2021-02-22 17:12:55 +00:00
Alyssa Rosenzweig
46384d0dcc
pan/bi: Fix more jumps to terminal blocks
...
Here's another edge case: there could be instructions in the last block
after NIR->BIR but they could be optimized out by backend DCE, causing
the block to become a terminal block.
Noticed while toying with geometry shaders.
Fixes: a805d999c0 ("pan/bi: Fix jumps to terminal block again")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137 >
2021-02-22 17:12:55 +00:00
Samuel Pitoiset
0d5a88c6cb
ac/rgp: fill CPU info by parsing /proc/cpuinfo
...
The current CPU clock speed can't be retrieved from CPUID, so I think
parsing /proc/cpuinfo for all information is fine.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9133 >
2021-02-22 16:16:25 +00:00
Mike Blumenkrantz
4d0d678c9f
zink: set conformant ubo/ssbo size limits
...
these caps correspond to descriptor binding limits provided by vulkan drivers
fixes KHR-GL46.shader_storage_buffer_object.basic-max
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9174 >
2021-02-22 15:53:30 +00:00
Mike Blumenkrantz
f1f75fda9c
zink: add available|visible masks to all barriers in ntv
...
we shouldn't need to consider whether these get added since we always want them
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9055 >
2021-02-22 15:38:03 +00:00
chenli
df29245720
mesa: update oudated members for debug and check
...
Signed-off-by: Chen Li <chenli@uniontech.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7896 >
2021-02-22 15:12:50 +00:00
Mike Blumenkrantz
54cb05b46c
zink: always set VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT for non-staging resources
...
this is weird but sometimes gallium makes resources with bind==0, which will
crash later if we don't add this
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9066 >
2021-02-22 14:32:02 +00:00
Mike Blumenkrantz
bc37d882fc
zink: remove 'scissors' member of viewport state
...
this is the vulkan-transformed value, but we can just apply it at draw
time and save ourselves some memory
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9153 >
2021-02-22 14:04:29 +00:00
Mike Blumenkrantz
547e982e8e
zink: handle scissor+viewport states dynamically if extension is available
...
this is a huge perf win since it means we don't have to create a new pipeline
every time this state changes
also we can now move the viewport state back to zink_context since that's the
real value we're using and the pipeline state value is just for the hash
ref mesa/mesa#3359
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9153 >
2021-02-22 14:04:29 +00:00
Mike Blumenkrantz
8bae8ca723
zink: always use 64bit flag for query results
...
this is just much, much easier to handle, and it also lets us fix some
lingering bugs with query handling that led to inconsistent results
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152 >
2021-02-22 13:54:14 +00:00
Mike Blumenkrantz
8dec725bf0
zink: improve batch flushing for queries when compute batches are involved
...
we can reduce some flushing here by only doing a flush if we're about to
copy a compute batch resource that has gfx batch access pending
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152 >
2021-02-22 13:54:14 +00:00
Mike Blumenkrantz
ab82e2c4f1
zink: better handling for availability queries on qbos when query/resource is busy
...
in this case, we can queue a result copy onto a staging buffer and then queue
a copy from staging onto our real buffer to avoid stalling
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152 >
2021-02-22 13:54:14 +00:00
Mike Blumenkrantz
7d1ad50c75
zink: simplify some of the qbo direct buffer write code
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152 >
2021-02-22 13:54:14 +00:00
Mike Blumenkrantz
da051b06a7
zink: break out query result buffer copying into util function
...
we can reuse this a bit
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152 >
2021-02-22 13:54:14 +00:00
Mike Blumenkrantz
7026ea7171
zink: fix buffer resource usage flags
...
* VK_BUFFER_USAGE_STORAGE_BUFFER_BIT should be enabled always because we might need it
* VK_FORMAT_FEATURE* flags need to be used for detection
I hate these enums so much.
Fixes: 2bfa998960 ("zink: add more usage bits for buffer types")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9175 >
2021-02-22 13:44:01 +00:00
Bas Nieuwenhuizen
38ce8d4d00
vulkan/device_select: Stop using device properties 2.
...
We have to choose between:
1) Stop handling two identical GPUs
2) Stop having crashes with other layers active.
3) Fix the Vulkan Loader.
Since nobody seems to want to spend enough effort to do 3 the
effective choice is between 1 and 2. This is choosing 2, as
two identical GPUs is pretty uncommon since crossfire doesn't
work on Linux anyway.
(And it would only work sporadically as the game needs to enable the
extension)
CC: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3801
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8414 >
2021-02-22 13:18:53 +00:00
Bas Nieuwenhuizen
2d520b6923
radv: Don't use dedicated memory info to indicate sharing.
...
Can be used without sharing, so if only the dedicated memory info
is set we know it isn't shareable. Use that.
Fixes: a639d40f13 ("radv: add support for local bos. (v3)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4330
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9176 >
2021-02-22 13:08:40 +00:00
Simon Ser
2b10bff7b3
frontends/va: add pipe to DRM format mapping for NV12 and P010
...
These are used when VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9015 >
2021-02-22 13:02:55 +00:00
Simon Ser
b85c6531f6
frontends/va: add support for VA_EXPORT_SURFACE_COMPOSED_LAYERS
...
The libva docs say:
> If VA_EXPORT_SURFACE_SEPARATE_LAYERS is specified on export, each
> layer will contain exactly one plane. For example, an NV12
> surface will be exported as two layers, one of DRM_FORMAT_R8 and
> one of DRM_FORMAT_GR88.
> If VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified on export,
> there will be exactly one layer.
VA_EXPORT_SURFACE_COMPOSED_LAYERS is desirable in many scenarios,
for instance when directly importing the DMA-BUFs into APIs such
as GL (as a single EGLImage), KMS or Wayland.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9015 >
2021-02-22 13:02:55 +00:00
Simon Ser
be916e3653
frontends/va: extract pipe format to DRM format mapping
...
This allows the table to be used from multiple call sites, and makes
it a little smaller.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9015 >
2021-02-22 13:02:55 +00:00
Lionel Landwerlin
8b44e45347
intel/perf: fix roll over PERF_CNT counter accumulation
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 5ba6d9941b ("intel/perf: add mdapi writes for register perf counters")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9163 >
2021-02-22 12:15:54 +00:00
Lionel Landwerlin
018393d851
intel/perf: Add Alderlake metrics
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9186 >
2021-02-22 13:49:53 +02:00
Lionel Landwerlin
65b6eacb0b
intel/dev: identify alderlake
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9186 >
2021-02-22 13:49:41 +02:00
Samuel Pitoiset
e5d8b731e4
radv: emit missing subpass resolve marker for SQTT
...
RGP now shows CmdEndRenderPassResolve() in the Event timing panel.
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/9106 >
2021-02-22 08:30:38 +01:00
Samuel Pitoiset
491a1949eb
radv: rework radv_cmd_buffer_resolve_subpass() a bit
...
To emit the subpass resolve marker properly.
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/9106 >
2021-02-22 08:30:36 +01:00
Vinson Lee
7cc83f237e
aco: Initialize ds_state.front.writeMask.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value ds_state.front. Field ds_state.front.writeMask is uninitialized.
Fixes: d488d0fd7b ("aco: add framework for testing isel and integration tests")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9033 >
2021-02-21 19:33:00 -08:00
Timothy Arceri
9f474bd4b4
nir: handle negatives in ffma reassociation optimisation
...
shader-db results Iris (BDW):
total instructions in shared programs: 16632076 -> 16631057 (<.01%)
instructions in affected programs: 48010 -> 46991 (-2.12%)
helped: 47
HURT: 6
total cycles in shared programs: 915266726 -> 915263622 (<.01%)
cycles in affected programs: 1182283 -> 1179179 (-0.26%)
helped: 18
HURT: 27
total loops in shared programs: 4929 -> 4929 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
total spills in shared programs: 18834 -> 18801 (-0.18%)
spills in affected programs: 525 -> 492 (-6.29%)
helped: 3
HURT: 0
total fills in shared programs: 23008 -> 22981 (-0.12%)
fills in affected programs: 435 -> 408 (-6.21%)
helped: 3
HURT: 0
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8608 >
2021-02-22 00:49:13 +00:00
Dave Airlie
b4f7535ba2
lavapipe: use clear interface for renderpass clears
...
For llvmpipe this means clears happen in the raster threads
rather than in the single cpu thread.
This path can't be used for scissored or clears with different
clear colors per mrt.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041 >
2021-02-22 00:30:46 +00:00
Dave Airlie
2ecb47abda
llvmpipe: zs clear use 64-bit memset
...
Use the newly added memset64 path
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041 >
2021-02-22 00:30:46 +00:00
Dave Airlie
3116f9801b
u_surface: use optimised memset64
...
Use the newly added optimised memset64 path
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041 >
2021-02-22 00:30:46 +00:00
Dave Airlie
83f0bc5d84
util: add optimised memset64
...
This just adds a memset64 along the lines of the previously
added memset32.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041 >
2021-02-22 00:30:46 +00:00
Rob Clark
2ff397c00e
util/fossilize_db: Fix compile error with clang
...
../src/util/fossilize_db.c:178:58: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
char hash_str[FOSSILIZE_BLOB_HASH_LENGTH + 1] = {};
Fixes: eca6bb9540 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9180 >
2021-02-22 00:06:35 +00:00
Dave Airlie
226c7ae2a8
lavapipe: reset object base on recycled command buffers
...
The loader_set_dispatch overwrites the magic with the dispatch
pointer, however when cmd buffers get recycled, and the loader
is in debug mode, it asserts that the magic isn't set anymore.
When recycling command buffers, reset the object base.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145 >
2021-02-22 09:32:57 +10:00
Dave Airlie
7b1568b7a3
tu: reset object base on recycled command buffers
...
The loader_set_dispatch overwrites the magic with the dispatch
pointer, however when cmd buffers get recycled, and the loader
is in debug mode, it asserts that the magic isn't set anymore.
When recycling command buffers, reset the object base.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145 >
2021-02-22 09:32:49 +10:00
Dave Airlie
bd98fc39ae
radv: reset object base on recycled command buffers
...
The loader_set_dispatch overwrites the magic with the dispatch
pointer, however when cmd buffers get recycled, and the loader
is in debug mode, it asserts that the magic isn't set anymore.
When recycling command buffers, reset the base object.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145 >
2021-02-22 09:32:45 +10:00
Dave Airlie
5a340c0929
vulkan/util: add api to reset object magic + private data.
...
This will be used to for reissuing dispatchable objects like
command buffers.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145 >
2021-02-22 09:32:13 +10:00
Alyssa Rosenzweig
5b6ed24cb8
gallium/tessellator: Rename D3D11 defines
...
We're Gallium, c'mon!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9118 >
2021-02-21 22:17:35 +00:00
Alyssa Rosenzweig
248a5a330d
gallium/tessellator: Remove unused includes
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9118 >
2021-02-21 22:17:35 +00:00
Alyssa Rosenzweig
bca9e7fe23
gallium/tessellator: Remove XBOX 360 code
...
Unused.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9118 >
2021-02-21 22:17:35 +00:00
Erico Nunes
f3d47ba0c7
lima: fix max sampler views
...
If this is not defined, mesa may not deallocate sampler views,
which can result in memory leaks.
Just define it to the same as max texture samplers, like other
mesa drivers do.
Cc: mesa-stable
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9172 >
2021-02-21 19:21:45 +00:00
Erico Nunes
8f339eb036
docs/features: add lima features
...
This was mostly generated through scripts parsing glxinfo and then some
manual adjustments.
Note that lima is mostly a GLES 2.0 driver so its usefulness on this
list is a bit limited. But there was a long standing user request to
include it here and I guess it's better to be on the radar.
The extension list might not be fully correct, hopefully putting it here
for comparison also helps tracking if something is wrong or missing.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9031 >
2021-02-21 14:27:25 +00:00
Timothy Arceri
644fcd9486
util/disk_cache: make use of single file cache when env var set
...
When the MESA_DISK_CACHE_SINGLE_FILE environment variable is set
we make use of the new single file shader cache implementation.
The new cache uses the following directory structure based on the
first defined name as follows:
$MESA_GLSL_CACHE_DIR/driver_id/gpu_name/foz_cache.foz
$MESA_GLSL_CACHE_DIR/driver_id/gpu_name/foz_cache_idx.foz
$XDG_CACHE_HOME/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache.foz
$XDG_CACHE_HOME/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache_idx.foz
<pwd.pw_dir>/.cache/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache.foz
<pwd.pw_dir>/.cache/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache_idx.foz
Where foz_cache_idx.foz is a database of offsets pointing to the location of
the shader cache entries in foz_cache.foz
This initial implementation doesn't have any max cache size handling and is
initially intended to be use by applications such as steam that will handle
cache management for us.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725 >
2021-02-21 02:50:45 +00:00
Timothy Arceri
eca6bb9540
util/fossilize_db: add basic fossilize db util to read/write shader caches
...
My benchmarking shows no significant change in cache load times with a
single shader cache file vs the existing cache implementation of many
small files (tested with my spinning rust HDD).
However this new single file cache implementation does reduce the total
size on disk used by the shader cache. We have a problem with the existing
cache where writing tiny files to disk causes more disk space to be used than
is actually needed for the files due to the minimum size required for a file.
In pratice this tends to inflate the size of the cache on disk to over 3x
larger.
There are other advantages of using a single file for shader cache entries
such as allowing better removal of cache entries once we hit the max cache
size limit (although we don't implement any max cache size handling in this
initial implementation).
The primary reason for implementing a single file cache for now is to allow
better performance and handling by third party applications such as steam
that collect and distribute precompiled cache entries.
For this reason we also implement a new environment variable
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS which allows a user to pass in a path
to a number of external read only shader cache dbs. There is an initial
limit of 8 dbs that can be passed to mesa like so:
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS=/full_path/filename1, ... ,/full_path/filename8
Where the filename represents the cache db and its index file e.g.
filename1.foz and filename1_idx.foz
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725 >
2021-02-21 02:50:45 +00:00
Timothy Arceri
1fabc4ecbe
util/mesa_sha1: add helper to reconvert sha1 hex strings
...
Converts the sha1 hex string representation back into its original
more compact format.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725 >
2021-02-21 02:50:45 +00:00
Timothy Arceri
f88c13f26d
util/disk_cache: use a new cache dir for the single file cache feature
...
This allows us to guarantee the different cache implementations will not
interfere with each other and should make it more clear that the max cache
size limits are applied separately for each cache implementation.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725 >
2021-02-21 02:50:45 +00:00
Timothy Arceri
c1e4810221
util/disk_cache: move cache path strdup call back into disk_cache.c
...
This code is already OS agnostic and moving it here enables code
sharing in the following patches.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725 >
2021-02-21 02:50:45 +00:00
Timothy Arceri
48d7c4e0f3
util/disk_cache: do crc32 check on compressed data for ZSTD
...
This will be faster and avoids checking for errors with the
compression implementation which we shouldn't need to do. Instead
we trust the compression library does the correct thing and simply
error check the data loaded from disk.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725 >
2021-02-21 02:50:45 +00:00
Mark Janes
f54a65c69b
intel: check setuid before writing output file in INTEL_MEASURE
...
Without this check, the INTEL_MEASURE environment variable could be
misused to overwrite arbitrary files.
Fixes: 0f4143ec37 ("intel: Print GPU timing data based on INTEL_MEASURE")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9166 >
2021-02-20 11:53:33 -08:00
Ian Romanick
3250e04d25
nir/algebraic: Add some max/min optimizations with 3 variables
...
Specifically, ARB assembly shaders with code like
SLT r0, r0, c[0].xxxx;
...
KIL r0.xyzx;
can result in this pattern. The other cases (e.g., 'KIL r0.xxxx' and
'KIL r0.xyxx') are handled by existing patterns.
Reviewed-by: Matt Turner <mattst88@gmail.com >
All Intel platforms had similar results. (Tiger Lake shown)
total instructions in shared programs: 21050098 -> 21050065 (<.01%)
instructions in affected programs: 2062 -> 2029 (-1.60%)
helped: 31
HURT: 1
helped stats (abs) min: 1 max: 3 x̄: 1.10 x̃: 1
helped stats (rel) min: 1.14% max: 4.35% x̄: 1.89% x̃: 1.69%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.65% max: 0.65% x̄: 0.65% x̃: 0.65%
95% mean confidence interval for instructions value: -1.23 -0.84
95% mean confidence interval for instructions %-change: -2.12% -1.50%
Instructions are helped.
total cycles in shared programs: 855105466 -> 855105055 (<.01%)
cycles in affected programs: 50136 -> 49725 (-0.82%)
helped: 33
HURT: 0
helped stats (abs) min: 3 max: 22 x̄: 12.45 x̃: 12
helped stats (rel) min: 0.13% max: 1.57% x̄: 0.86% x̃: 0.92%
95% mean confidence interval for cycles value: -13.78 -11.13
95% mean confidence interval for cycles %-change: -0.97% -0.76%
Cycles are helped.
No fossil-db changes on any Intel platform.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9122 >
2021-02-19 17:31:27 -08:00
Ian Romanick
d9b5bce85a
nir/algebraic: Remove some redundant b2f logic-op reduction patterns
...
There are patterns that will re-write the fmin or fmax part into a form
that other patterns will gradually convert to the same ior or iand. For
example,
fmax(b2f(a), b2f(b)) != 0
b2f(a || b) != 0
a || b
No shader-db or fossil-db changes on any Intel platform.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9122 >
2021-02-19 17:31:24 -08:00
Ian Romanick
7e127c1fca
nir/algebraic: Fix some min/max of b2f replacements
...
fmin(-A, -B) is -fmax(A, B), and fmax(-A, -B) is -fmin(A, B). Therefore
the logic joining A and B should toggle between ior and iand for the
negated versions.
At the very least, a shader from Euro Truck Simulator 2 in shader-db is
affected by this. The KIL instruction in the (ARB assembly) shader ends
up with the wrong logic. This is _probably_ the source of
https://gitlab.freedesktop.org/mesa/mesa/-/issues/1346 .
That said, the issue mentions that Mesa 18.0.5 works, but commit
68420d8322 ("nir: Simplify min and max of b2f") was added in 17.3.
Moreover, I was not able to reproduce the error in the ETS2 shader from
shader-db from any Mesa commit near the time the original fd.o bugzilla
was submitted (December 2018). 🤷
In fact, the current error in that shader starts with 9167324a86
("nir/algebraic: Mark some logic-joined comparison reductions as
exact"). That's a bit of a red herring as 9167324a86 just sets off a
chain of replacements that eventually leads to the incorrect min/max of
b2f patterns fixed by this commit.
The other affected shaders in the shader-db results are from Cargo
Commander. These are also ARB assembly shaders.
I think any ARB assembly shader that uses the pattern
SLT r0, ...;
...
KIL -r0;
will suffer from issues related to this.
This change fixes the piglit
tests/spec/arb_fragment_program/kil-of-slt.shader_test test added in
https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/454 .
shader-db results:
All Gen6+ platforms had similar result. (Ice Lake shown)
total instructions in shared programs: 20034604 -> 20034486 (<.01%)
instructions in affected programs: 3885 -> 3767 (-3.04%)
helped: 47
HURT: 2
helped stats (abs) min: 2 max: 4 x̄: 2.64 x̃: 2
helped stats (rel) min: 2.33% max: 8.33% x̄: 3.48% x̃: 3.39%
HURT stats (abs) min: 3 max: 3 x̄: 3.00 x̃: 3
HURT stats (rel) min: 13.64% max: 16.67% x̄: 15.15% x̃: 15.15%
95% mean confidence interval for instructions value: -2.83 -1.99
95% mean confidence interval for instructions %-change: -3.84% -1.60%
Instructions are helped.
total cycles in shared programs: 979881379 -> 979879406 (<.01%)
cycles in affected programs: 119873 -> 117900 (-1.65%)
helped: 46
HURT: 3
helped stats (abs) min: 10 max: 756 x̄: 45.41 x̃: 26
helped stats (rel) min: 0.53% max: 19.72% x̄: 1.67% x̃: 1.26%
HURT stats (abs) min: 28 max: 56 x̄: 38.67 x̃: 32
HURT stats (rel) min: 1.44% max: 3.54% x̄: 2.75% x̃: 3.27%
95% mean confidence interval for cycles value: -70.83 -9.70
95% mean confidence interval for cycles %-change: -2.23% -0.57%
Cycles are helped.
Iron Lake and GM45 had similar results. (Iron Lake shown)
total instructions in shared programs: 8115098 -> 8115076 (<.01%)
instructions in affected programs: 2592 -> 2570 (-0.85%)
helped: 32
HURT: 2
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.88% max: 2.70% x̄: 1.35% x̃: 1.31%
HURT stats (abs) min: 5 max: 5 x̄: 5.00 x̃: 5
HURT stats (rel) min: 17.24% max: 18.52% x̄: 17.88% x̃: 17.88%
95% mean confidence interval for instructions value: -1.15 -0.15
95% mean confidence interval for instructions %-change: -1.83% 1.39%
Inconclusive result (%-change mean confidence interval includes 0).
total cycles in shared programs: 238189718 -> 238189802 (<.01%)
cycles in affected programs: 75076 -> 75160 (0.11%)
helped: 3
HURT: 31
helped stats (abs) min: 2 max: 130 x̄: 44.67 x̃: 2
helped stats (rel) min: 0.18% max: 5.70% x̄: 2.02% x̃: 0.19%
HURT stats (abs) min: 2 max: 70 x̄: 7.03 x̃: 4
HURT stats (rel) min: 0.07% max: 6.41% x̄: 0.53% x̃: 0.15%
95% mean confidence interval for cycles value: -7.27 12.21
95% mean confidence interval for cycles %-change: -0.33% 0.94%
Inconclusive result (value mean confidence interval includes 0).
No fossil-db changes on any Intel platform.
Fixes: 68420d8322 ("nir: Simplify min and max of b2f")
Closes : #1346
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9122 >
2021-02-19 17:30:53 -08:00
Rob Clark
a983a87a5f
freedreno/ir3/print: Improve branch printing
...
Handle the instruction suffix better, and don't try to print src regs in
a generic way, since that doesn't really work out.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9142 >
2021-02-19 22:56:56 +00:00
Rob Clark
03762a956e
freedreno/ir3/print: More sane ssa src/dst display
...
Give src/dst a "ssa_%u" name generated from the instruction's unique
serialno.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9142 >
2021-02-19 22:56:56 +00:00
Yevhenii Kharchenko
1516b6bd9a
st/mesa: fix PBO download for TEXTURE_1D_ARRAY textures
...
Fixes 'nir_tex_src_coord' param was provided to NIR 'txf' operation as a
vec3 for TEXTURE_1D_ARRAY target, causing an assert.
Only following targets require vec3: TEXTURE_2D_ARRAY, TEXTURE_3D,
TEXTURE_CUBE, TEXTURE_CUBE_ARRAY. The rest must use vec2.
Packing layer value into Y-coordinate the same way it was done in
'create_fs' in commit 2bf6dfac .
Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download
shaders. ")
Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9014 >
2021-02-19 19:29:57 +00:00
Kenneth Graunke
4c4a91abe5
iris: Reference the shader variant for last_vue_map as well
...
We call update_last_vue_map after updating the shaders, which compares
the new and old VUE maps. Except...updating the shaders may have
dropped the last reference to the variant that ice->shaders.last_vue_map
belonged to, leading to a classic use-after-free.
Fix this by taking a reference to the variant for the last VUE stage,
so it stays around until we're done with it.
Fixes: 1afed51445 ("iris: Store a list of shader variants in the shader itself")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4311
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9143 >
2021-02-19 18:49:19 +00:00
Danylo Piliaiev
0fa7ec1473
turnip,freedreno/a6xx: tell hw the size of shared mem used by CS
...
Before, we only used 2k of shared memory.
It was found that 5 lower bits of SP_CS_UNKNOWN_A9B1 do control
the available size of shared memory for compute shaders, with
AVAILABLE_SIZE = (SP_CS_UNKNOWN_A9B1_SHARED_SIZE + 1) * 1k
up to 32k. And SP_CS_UNKNOWN_A9B1_SHARED_SIZE being zero enables
all 32k of shared memory.
Fixes tests:
dEQP-VK.rasterization.line_continuity.line-strip
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.buffer.guard_nonlocal.workgroup.comp
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_nonlocal.workgroup.guard_local.buffer.comp
dEQP-VK.memory_model.write_after_read.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.image.guard_nonlocal.workgroup.comp
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9157 >
2021-02-19 20:28:44 +02:00
Eric Anholt
dab845d457
ci: Move specific driver testing to separate files in separate dirs.
...
The top-level gitlab-ci.yml is big and unwieldy when one wants to work on
CI for a single driver. Move the drivers to separate include files for
ease of finding all your driver's tests, and also to pave the way for work
on a single driver's CI to not retest all other drivers.
Reviewed-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9139 >
2021-02-19 17:30:36 +00:00
Jesse Natalie
8a3dbf1ca6
microsoft/clc: Add a test with an unused kernel arg
...
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9160 >
2021-02-19 16:36:46 +00:00
Jesse Natalie
11061c4e28
microsoft/clc: Re-order dead variable removal after uniform vars_to_explicit_types
...
Since vars_to_explicit_types is now where driver_location/offset is filled out,
we need to make sure that we still have all app-provided kernel arg variables
at that point in time so they all get assigned unique offsets. That means
that we can't have removed dead uniforms yet, which also means we can't have
filled out metadata for inline samplers (since usage of them generates tons
of duplicate uniforms).
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9160 >
2021-02-19 16:36:46 +00:00
Danylo Piliaiev
14a0004232
turnip: consider tile_max_h when calculating tiling config
...
Otherwise we may get a tile height exceeding the maximum.
Fixes tests:
dEQP-VK.pipeline.render_to_image.core.2d.huge.height.r8g8b8a8_unorm
dEQP-VK.pipeline.render_to_image.core.2d.huge.height.r8g8b8a8_unorm_d16_unorm
dEQP-VK.pipeline.render_to_image.core.2d.huge.height.r8g8b8a8_unorm_s8_uint
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9159 >
2021-02-19 15:24:30 +00:00
Adam Jackson
c763d238c6
xlib: Fix build regression since 99e25d183d
...
Just named the variable wrong. Can't really fault anyone for breaking a
target we don't build in CI...
Fixes: 99e25d183d mesa: optimize set_varying_vp_inputs by precomputing the conditions
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9132 >
2021-02-19 10:10:02 -05:00
Yogesh Mohan Marimuthu
455ca9226a
ac/rgp: set gfxip in elf_hdr.e_flags
...
This patch will set the gfxip into elf_hdr.e_flags by reading data
from struct rad_info->chip_class instead of hardcoding.
v2: remove unused #define
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609 >
2021-02-19 14:29:47 +00:00
Yogesh Mohan Marimuthu
9ce8b5024a
ac/rgp: dump co, col, pso database to rgp profile file
...
This patch dumps code object, code object loader events, pso correlation
databses to given rgp profile file. The data to dump is taken from
struct rgp_code_object, struct rgp_loader_events and
struct rgp_pso_correlation.
v2: fix sqtt_file structure name to match existing names in file.
fix checking wrong variable for pso correlation record_count.
remove freeing rgp database here.
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609 >
2021-02-19 14:29:47 +00:00
Yogesh Mohan Marimuthu
5d51ccd7d1
ac/rgp,radeonsi,radv: pass struct thread_trace_data to ac_sqtt_dump_data()
...
struct thread_trace_data holds struct rgp_code_object, struct
rgp_loader_events, struct rgp_pso_correlation data. This data is required
in function ac_sqtt_dump_data(). This patch makes the code changes
required to pass struct thread_trace_data to function ac_sqtt_dump_data().
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609 >
2021-02-19 14:29:47 +00:00
Yogesh Mohan Marimuthu
c544e56fb5
ac/rgp: expose data structure to populate co, col, pso database
...
This patch exposes struct rgp_code_object, struct rgp_loader_events and
struct rgp_pso_correlation into struct ac_thread_trace_data. Other modules
can fill in this data structure. The code object, code object loader events,
pso correlation database is written to rgp profile file using data from
these data structure exposed by this patch.
v2: move the data structures to struct ac_thread_trace_data
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609 >
2021-02-19 14:29:47 +00:00
Yogesh Mohan Marimuthu
110bb2c77d
ac/rgp: add helper function to write rgp elf oject
...
This patch adds helper function ac_rgp_write_elf_object() which
creates elf object from struct rgp_code_object_record. The elf
object is written to given output rgp profile file.
v2: for newly added files, change copyright year from 2020 to 2021
v3: fix 32bit compilation failure
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609 >
2021-02-19 14:29:47 +00:00
Yogesh Mohan Marimuthu
12515d6b59
ac/rgp: add rgp co, col, pso data structures
...
This patch adds data structures used to collect data for code object,
code object loader event and pso correlation databases present in
a rgp profile.
v2: fix code review comments from Pierre-Eric
v3: Make loader_event_type into enum
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609 >
2021-02-19 14:29:47 +00:00
Yogesh Mohan Marimuthu
27ff46bde6
ac/rgp: add ac_msgpack.h/c
...
This patch adds functions to create msgpack formatted data.
For msgpack specification refer to
github.com/msgpack/msgpack/blob/master/spec.md
This patch only adds formats from msgpac specification that
are required for rgp profile data.
v2: for newly added files, change copyright year from 2020 to 2021
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609 >
2021-02-19 14:29:46 +00:00
Michel Zou
34d6ce28e3
util: fix gcc vsnprintf overflow
...
Anything higher than INT_MAX results in overflow although the parameter is declared as size_t.
Worse, with (size_t)-1 it is silently ignored and Woverflow is not emitted.
Closes #4226
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9134 >
2021-02-19 11:05:38 +00:00
Danylo Piliaiev
b6b3b38434
turnip: consider HW limit on number of views when apply multipos opt
...
Blob doesn't apply multipos optimization starting from 11 views
even on a650, however in practice, with the limit of 16 views,
tests pass on a640/a650 and fail on a630.
Fixes tests:
dEQP-VK.multiview.draw_indexed.max_multi_view_view_count
dEQP-VK.multiview.input_attachments.max_multi_view_view_count
dEQP-VK.multiview.masks.max_multi_view_view_count
dEQP-VK.multiview.multisample.max_multi_view_view_count
dEQP-VK.multiview.queries.max_multi_view_view_count
dEQP-VK.multiview.renderpass2.index.fragment_shader.max_multi_view_view_count
dEQP-VK.multiview.secondary_cmd_buffer.max_multi_view_view_count
Fixes: 8d275778 ("tu: Enable multi-position output")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9135 >
2021-02-19 09:16:00 +00:00
Samuel Pitoiset
88f42ea93e
radv: emit the trap handler registers earlier
...
Directly into the GFX init IB.
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/9076 >
2021-02-19 08:58:19 +00:00
Samuel Pitoiset
2c6104d3d1
radv: make the TMA/TBA BOs resident buffers
...
They are always used if the trap handler is enabled.
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/9076 >
2021-02-19 08:58:19 +00:00
Samuel Pitoiset
918838cd24
radv: make the trace BO a resident buffer
...
It's always used if RADV_DEBUG=hang is set.
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/9076 >
2021-02-19 08:58:19 +00:00
Samuel Pitoiset
d96c0a2263
radv: make the border color BO a resident buffer
...
It's always used if the feature is enabled.
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/9076 >
2021-02-19 08:58:19 +00:00
Michel Zou
834b69d1ef
zink: fix win32 build
...
Fixes: 57575627 , c4cc3d91
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9126 >
2021-02-19 08:49:47 +00:00
Samuel Pitoiset
e3bdf815b7
radv: set correct value for OFFCHIP_BUFFERING on GFX10+
...
Higher values break tessellation. I was only able to reproduce this
by switching back/from AMDVLK which was really weird...
According to Marek (1c6eca23fd ), it looks like it's related to
register shadowing and PAL enables it, that probably explains a bit.
Copied from PAL and RadeonSI.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4207
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2498
Fixes: 74d69299d1 ("radv/gfx10: double the number of tessellation offchip buffers per SE")
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/9141 >
2021-02-19 08:52:26 +01:00
Vinson Lee
bf535c082b
nv50/ir: Initialize Instruction members.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member serial is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member sched is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member bb is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9037 >
2021-02-19 04:43:58 +00:00
Mike Blumenkrantz
31dd0a4a1e
zink: use vkGetFenceStatus when we're obviously checking for status
...
a timeout of 0 indicates that gallium wants to know whether a fence is done,
so we can use a simpler call here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9154 >
2021-02-19 04:32:25 +00:00
Mike Blumenkrantz
79861e3d88
zink: break out even more of zink_blit state saving
...
for reuse in upcoming clear refactoring
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9150 >
2021-02-19 04:24:49 +00:00
Jonathan Marek
ec54166a2b
freedreno/a6xx: set SP_PERFCTR_ENABLE in computerator
...
Set this register to have properly working SP perfcntrs in computerator.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423 >
2021-02-19 04:04:03 +00:00
Jonathan Marek
46f64aa3be
freedreno/a6xx: update some registers
...
Some sorting, adding unknown fields, documenting some fields, etc.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423 >
2021-02-19 04:04:03 +00:00
Jonathan Marek
b94c652afe
freedreno/a6xx: always use reg64 for address registers (no LO/HI)
...
Reduce noise in a6xx.xml by removing LO/HI versions of address registers.
Also fix type="address" registers in register packing (use bit size instead
of checking for "waddress" to use qword)
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423 >
2021-02-19 04:04:02 +00:00
Jonathan Marek
b15d4484f8
freedreno/a6xx: update perfcntr registers (declare as arrays)
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423 >
2021-02-19 04:04:02 +00:00
Jonathan Marek
72f00fe72e
freedreno/registers: use macro instead of inline function for array regs
...
This is to allow use in places where an inline function isn't allowed,
such as a static initializer.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423 >
2021-02-19 04:04:02 +00:00
Connor Abbott
79921b81bc
freedreno/a6xx: Document threadsize-related fields
...
We'll need to use if we want to start playing around with thread sizes.
At least now we know what the actual threadsize is.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423 >
2021-02-19 04:04:02 +00:00
Mike Blumenkrantz
1cb3015a31
zink: just end the current renderpass in zink_batch_no_rp()
...
since we aren't (currently) parallelizing and now have barriers, we don't need to cycle
the batch here, which lets us avoid submitting too-small command buffers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9148 >
2021-02-19 03:44:51 +00:00
Mike Blumenkrantz
f3080eca75
zink: break out buffer copying into util function with batch param
...
if we want to explicitly specify compute batch, we need to be able
to pass that along
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9147 >
2021-02-19 03:34:30 +00:00
Mike Blumenkrantz
46a04672af
zink: add buffer barriers for resource_copy_region
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9147 >
2021-02-19 03:34:30 +00:00
Mike Blumenkrantz
034657bf6c
zink: just call context destructor on creation fail
...
this more reliably handles the failure case
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9149 >
2021-02-19 03:24:29 +00:00
Mike Blumenkrantz
66d5966426
zink: update relnotes
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9151 >
2021-02-19 03:20:39 +00:00
Mike Blumenkrantz
90b6d97c75
zink: tag some missing ES features
...
we're only missing advanced blend
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9151 >
2021-02-19 03:20:39 +00:00
Mike Blumenkrantz
0a6b8685aa
zink: fix surface creation for cube slices
...
if first==last layer, this should be a 2D slice of the cube
else if this isn't all the layers, this should be an array of slices
fixes a bunch of spec@arb_shader_image_size@builtin cases
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9080 >
2021-02-19 03:10:17 +00:00
Dave Airlie
44f76d5fc7
lavapipe: use os_time for timing related things
...
drop the use of the Linux code.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
368c804383
lavapipe: make OPT macro MSVC compatible
...
This macros is ugly, make it uglier but msvc compatible.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
0bd707ba17
lavepipe: some misc msvc fixes
...
drop some headers, get rid of printflike, drop the __builtin_ffs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
c1e0249e90
lavapipe: use msvc compatible 0 init
...
trivial changes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
ab42e49ea7
lavapipe: fix some void ptr arithmetic
...
msvc disagrees with it, and they are trivial to fix.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
f3dd9529fa
lavapipe/meson: drop megadrivers build req
...
This just seems to be cut-n-paste, so lose it.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
c0c03f29e0
lavapipe: implement physical device group enumeration
...
This was missing when I added physical device groups, and
was causing crashes on win32.
Fixes: 6af87193c ("lavapipe: add basic vulkan device group support.")
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Mike Blumenkrantz
0fd58b4537
zink: be more explicit with image barriers for copy operations
...
we know the access and pipeline stage here, so we can pass those along
to ensure synchronization
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
466efcb247
zink: add general zink_resource_barrier() wrapper
...
this simplifies a bit of code where we may want to be throwing in barriers
regardless of the resource type
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
6cbd25c04b
zink: zink_resource_barrier -> zink_resource_image_barrier
...
need this namespace
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
55a0eb6e0a
zink: improve barrier usage for clear functions
...
ensure that we're always using the right layout for images that are
being cleared
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
77b0533d75
zink: add batch references for resources in clear functions
...
need to make sure we track these writes
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
7d6c90826d
zink: add access info for update_descriptor image barriers
...
this forces resources to transition where necessary to ensure that
data from previous ops have been made available (e.g., clear -> shader image)
we also switch needs_barrier over to a more accurate signature here since we
can now do it without breaking update_descriptors()
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
ab3a2fa690
zink: add access param for image resource barriers
...
we need more detail on some of these to ensure proper synchronization
and availability/visibility of image data between commands/stages
the signature for needs_barrier() is still funky here to avoid breaking
usage in update_descriptors()
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
3f6d104ba8
zink: add barriers for index and draw param buffers
...
need to ensure synchronization here too
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
5d664166c8
zink: assert batch is not in a renderpass when emitting pipeline barrier
...
this is only valid for subpasses which have self-dependencies set, and we
don't currently do that
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
9df8c4ba96
zink: take struct zink_batch param instead of direct cmdbuf in barrier helpers
...
this is weird and prevents us from verifying batch states
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
9d3935a0b3
zink: combine resource barriers where possible during update_descriptors
...
if we have a resource in the same state for multiple shader stages, we can
emit a single barrier for all the stage bits instead of multiple barriers
this also helps with detecting potentially redundant barriers when we go to
emit them later on
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
4b2fb61831
zink: break out barrier transitioning in update_descriptors
...
this hopefully makes the code a little more readable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
017dbd63fb
zink: avoid emitting unnecessary pipeline barriers during update_descriptors
...
if the current state of the resource matches the desired state, we don't need
to emit anything, and we can potentially avoid ending a renderpass
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
5d7cb2495a
zink: add generic wrapper for checking whether a resource needs a barrier
...
handy to not need to check ahead of time
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
4536607ea0
zink: use define for max descriptor array size
...
this was getting a bit unwieldy
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
03030f87a1
zink: add helper for image resource barriers and avoid unnecessary barriers
...
same as buffer barriers now
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
b00f407996
zink: add a VkPipelineStageFlags param to zink_resource_barrier()
...
this matches the buffer variant in its flexibility now
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
061e4e2293
zink: remove aspect param from zink_resource_barrier
...
we have a helper function for this now that we can reuse
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
73e84c33a2
zink: rework xfb barrier transitions when reusing as vertex inputs
...
if we have proper barrier usage to start with, then we don't need to do
any kind of weird flushing upon changing vertex inputs and can also remove
a flag from zink_resource
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
fb14793ebb
zink: rework xfb counter resource barriers
...
using the new helper functions, we can now more accurately determine
exactly which barriers we need/want and avoid setting unnecessary barriers
or ending a renderpass early
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
dd858be011
zink: set buffer resource barriers for descriptor resources in update_descriptors()
...
need to make sure these are properly synchronized
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Mike Blumenkrantz
69304052e3
zink: add helper function for getting pipeline stage from shader stage
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945 >
2021-02-19 02:05:13 +00:00
Alyssa Rosenzweig
cf6794eb8e
panfrost/ci: Mark flaky test
...
I cannot reproduce the issue in local runs.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
2346a94de0
docs/features: Mark atomics/images done on Bifrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
10b9e3ca0a
panfrost: Advertise FRAMEBUFFER_NO_ATTACHMENTS
...
Passes dEQP-GLES31.functional.fbo.no_attachments.*, it doesn't look like
we need to do anything special.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
91d2171902
panfrost: Comment on state of ARB_shader_clock
...
Pending on kernel work.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
ed29a2beb8
pan/bi: Use explicit move even for RT#0 of MRT
...
Otherwise we get a bad RA if RT 0 = RT 3 (for example), fixes
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.fragment.sampler2d
Fixes: a6f1500bed ("pan/bi: Workaround BLEND precolour with explicit moves")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
02d68b9b83
pan/bi: Allow dynamically uniform tex indices
...
Passes the relevant tests of
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.*, a few
failures that seem to relate to MRT instead of this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
dfe309e707
pan/bi: Implement interpolateAtOffset
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
7ec9dc98d7
pan/bi: Add imm_f16 helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
e4ae458df8
pan/bi: Implement interpolateAtSample
...
Passes dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
1f265ef6c1
pan/bi: Preload sample ID for sample shading
...
Used in the LD_VAR_IMM. Wondering if preload requirements shouldn't
instead be pushed from the compiler based on actual usage instead of
guessing from the NIR...
Fixes dEQP-GLES31.functional.shaders.multisample_interpolation.sample_qualifier.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
96ea2c3e9d
pan/bi: Elucidate slot 6/7 operation
...
Used to order fragments. With that clarified it's clear that we need to
wait on slot 7 for LD_TILE too (outside the limited context of a blend
shader).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
7f2d618867
pan/bi: Flesh out LD_TILE emit
...
Needs to support non-blend shader operation (conversion descriptor
sourced from a sysval), as well as MRT. Fixes fbfetch on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
cff5c40fc3
pan/bi: Fix blend shaders using LD_TILE with MRT
...
Don't hardcode the RT to 0. Affects ES3.0 which already exposes MRT --
despite no dEQP coverage of this particular corner case, apps could hit
this in the wild on 21.0. Fixes
dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_blend_func_buffer_blend_func
Fixes: c7e1ef7c0c ("panfrost: Advertise ES3.0 on Bifrost")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
9151329fd2
pan/bi: Implement shader_clock intrinsic
...
Trivial.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
8081811f2e
pan/bi: Implement image_atomic_comp_swap
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
078a84f474
pan/bi: Implement image_atomic_exchange
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Icecream95
afe4f0e6b1
pan/bi: nir_intrinsic_image_size support
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Icecream95
075d9a1084
pan/bi: Implement image load/store
...
v2 (Alyssa): Split out functions, support 3D/array
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
1c495323ce
pan/bi: Materialize *DTSEL_IMM in the scheduler
...
We want to be able to set a descriptor table and have the instruction
pair "magically" come to be. To do so, we adjust the definition of
DTSEL_IMM (deviating a bit from the architectural definition but in
practice simplifying disassembly immensely) and add a scheduler
lowering. This ensures DTSEL is always paired correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Icecream95
71f849a292
pan/bi: Remove check for first_ubo_is_default_ubo
...
It won't be set for OpenCL.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
cd21f0e1c5
pan/bi: Handle computational atomics
...
All the same formula: calculate an address, emit a pseudoinstruction for
the atomic, emit a postprocess that can be DCE'd if not needed.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
8358321801
pan/bi: Add ATOM_C1 promotion check
...
Optimizes atomic counters.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
b9d277f644
pan/bi: Extract bi_atom_opc from NIR intrinsic
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
f1adbd5d33
pan/bi: Lower atomic pseudo-instructions
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
c51c3a8fe3
pan/bi: Add 32-bit atomic pseudoinstruction
...
To enable scheduler lowering to an ATOM_CX pair.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
a687d11093
pan/bi: Add SEG_ADD.i64 pseudoinstruction
...
Expands to a pair *SEG_ADD/+SEG_ADD, which is used for lowering shared
atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
d31df8416b
pan/bi: Allow @rNULL with tied operands
...
Will enable DCE of atomics.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
111255512a
pan/bi: Don't read alpha out of bounds
...
RT#0 may not have alpha, do something safe instead of risking issues
with RA later.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
68539ba5eb
pan/bi: Fix LD_GCLK staging count
...
64-bit result
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
5f84568a71
pan/bi: Don't inline 64-bit constants
...
Will drop the upper bits incorrectly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
69f11f9e26
pan/bi: Fix RA of node 0 again
...
Botched rebase.
Fixes: c578ca7393 ("pan/bi: Add interference per clause")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
88ede65be8
panfrost: Remove useless check
...
Already checked in format_supported (only difference being cube map
arrays but the extension isn't advertised yet anyway due to missing
geometry shaders.)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
2be7c89d48
panfrost: Set border colour on Bifrost sampler
...
Passes dEQP-GLES31.functional.texture.border_clamp.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
fa251afb82
panfrost: Take panfrost_dev for AFBC selection
...
This appears to be architecture dependent.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
6a5052d836
panfrost: Spell fix
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
50f32bb6e2
panfrost: Fix NULL deref for an empty frag shader
...
Fixes debug builds of dEQP-GLES31.functional.stencil_texturing.render.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
fa9046b262
panfrost: Add RT conversion sysval
...
Contains the InternalConversionDescriptor corresponding to the selected
render target, ready to be fed into LD_TILE.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
7dc60fc3c8
panfrost: Export bifrost_get_blend_desc with type size
...
Will be used to lower EXT_shader_framebuffer_fetch on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
9d2b2e3c67
panfrost: Flesh out allow_forward_pixel_to_kill check
...
A few cases missed, probably some more bugs hidden here!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
2e83481a1a
panfrost: Handle PIPE_FORMAT_NONE as 'constant'
...
We can use the constant format anywhere safely as a 0-component format,
which will map fine for PIPE_FORMAT_NONE. Used so
ARB_framebuffer_no_attachments can probe.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
b3e3daa603
panfrost: Flesh out pixel kill / zs update
...
Add some notes on what the useful combinations do and flesh out the
logic. Fixes fails in
dEQP-GLES31.functional.image_load_store.early_fragment_tests.*
It's still not entirely clear to me what the difference between "force
early" and "weak early" is from the driver's perspective, though I
suspect there are performance implications to getting it wrong. Follow
what the blob does in case of doubt..
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
a25b9cd8d0
panfrost: Track coverage, early fragment tests
...
These extra pieces of data are needed to correctly compute pixel kill /
zs update settings.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
3399673ba4
panfrost: Label groups in GenXML
...
Helps debug pandecode issues.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
ba3ad38260
pan/decode: Disambiguate border colours
...
Can be small ints that will just be 0.0 if interpreted as float.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:22 +00:00
Alyssa Rosenzweig
bc494b30b7
pan/decode: Pretty print 22-bit pixel formats
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Suggested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:21 +00:00
Alyssa Rosenzweig
61584bb4e8
pan/decode: Fix tiler printing on Bifrost
...
Fixes: 9d682ad7f9 ("pan/decode: Only print local storage for vertex jobs")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:21 +00:00
Alyssa Rosenzweig
9dd9e0200d
pan/bi: Implement barriers
...
Only control barriers are meaningful upon a closer read.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:21 +00:00
Alyssa Rosenzweig
60bee70103
pan/bi: Stub scoreboarding
...
This is not a real implementation. But I'm working on barriers right
now.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105 >
2021-02-18 21:48:21 +00:00
Jesse Natalie
5b0a10823b
microsoft/clc: Use driver_location for metadata instead of re-computing offsets
...
Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138 >
2021-02-18 21:33:54 +00:00
Jesse Natalie
3ee8f2ccba
microsoft/clc: Move inline samplers to the end of the variable list
...
Since inline samplers are uniforms, just like kernel args, and
nir_lower_vars_to_explicit_types will assign driver_location based
on order in the variable list, move the inline samplers to the end
of the list to prevent them from creating gaps in the kernel arg
offsets.
Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138 >
2021-02-18 21:33:54 +00:00
Jesse Natalie
d773257012
microsoft/clc: Fix wrap modes for inline samplers for integer textures
...
Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138 >
2021-02-18 21:33:54 +00:00
Jesse Natalie
9da8179a1e
microsoft/clc: Let lower_vars_to_explicit_types fill kernel input driver_location
...
Importantly, also run that before mucking with the variable list via image lowering,
which removes and inserts variables, making the driver_location no longer line up
with metadata.
Fixes: ff05da7f ("microsoft: Add CLC frontend and kernel/compute support to DXIL converter")
Reviewed-By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9138 >
2021-02-18 21:33:54 +00:00
Jason Ekstrand
7c8c14a988
intel/mi_builder: Add tests for gen_mi_z and gen_mi_nz
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116 >
2021-02-18 21:28:40 +00:00
Jason Ekstrand
9145d77707
intel/mi_builder: Rewrite unit tests in terms of constant folding
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116 >
2021-02-18 21:28:40 +00:00
Jason Ekstrand
efdbe53eda
intel/mi_builder: Add constant folding
...
This also serves as pretty clear documentation of each helper's
semantics.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116 >
2021-02-18 21:28:40 +00:00
Jason Ekstrand
dbcbb321ad
intel/mi_builder: Short-circuit shifts in more cases
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116 >
2021-02-18 21:28:40 +00:00
Jason Ekstrand
c64d7aa8e3
intel/mi_builder: Fix a misleading comment
...
This doesn't actually assume the top 32 bits of the source value are
zero. Instead, it does (src >> shift) & UINT32_MAX regardless of what
the top bits of src are.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116 >
2021-02-18 21:28:40 +00:00
Jason Ekstrand
40df12d4ce
intel/mi_builder: Delete a bogus comment
...
It actually returns ~0/0. We're about to make things more self-
documenting so we can delete the comment instead of fixing it.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116 >
2021-02-18 21:28:40 +00:00
Jason Ekstrand
749ae5af93
intel/mi_builder: Create a context in the tests
...
This makes them work on the simulator
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9116 >
2021-02-18 21:28:40 +00:00
Adam Jackson
3f290b4f65
nouveau: Silence a warning at -Og
...
../src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp: In member function ‘void nv50_ir::AlgebraicOpt::handleCVT_EXTBF(nv50_ir::Instruction*)’:
../src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp:2238:57: warning: ‘offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Just set it to 0 to handle the corner case.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
86b85798bd
nouveau: Silence some warnings at -Og
...
../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp: In member function ‘bool {anonymous}::Converter::handleInstruction(const tgsi_full_instruction*)’:
../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:3419:22: warning: ‘src1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
3419 | geni = mkOp3(op, dstTy, dst0[c], fetchSrc(0, c), src1, mkImm(0x1f));
../src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:3272:15: warning: ‘val1’ may be used uninitialized in this function [-Wmaybe-uninitialized]
3272 | mkOp1(OP_EX2, TYPE_F32, dst0[1], val1);
Can't happen, just initialize them to NULL.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
ba4b9cc0c7
gallivm: Silence a warning at -Og
...
../src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c: In function ‘lp_build_sample_image_linear’:
../src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c:1412:24: warning: ‘have_corners’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1412 | have_corner = LLVMBuildLoad(builder, have_corners, "");
I don't think you can get here and really not have it initialized, but
if you _could_ then it would clearly be wrong to do anything, so do
nothing instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
109f9f3910
vl: Silence a warning at -Og
...
../src/gallium/auxiliary/vl/vl_winsys_dri.c: In function ‘vl_dri2_screen_texture_from_drawable’:
../src/gallium/auxiliary/vl/vl_winsys_dri.c:239:34: warning: ‘back_left’ may be used uninitialized in this function [-Wmaybe-uninitialized]
239 | dri2_handle.stride = back_left->pitch;
The server would be broken if it failed to inform us of the back left
buffer, but let's leave nothing to chance.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
5cf6c9e609
nir/ttn: Silence some warnings at -Og
...
../src/gallium/auxiliary/nir/tgsi_to_nir.c: In function ‘ttn_mem’:
../src/gallium/auxiliary/nir/tgsi_to_nir.c:1724:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1724 | instr = nir_intrinsic_instr_create(b->shader, op);
../src/gallium/auxiliary/nir/tgsi_to_nir.c:1697:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1697 | instr = nir_intrinsic_instr_create(b->shader, op);
Add some more unreachable() to make this go away.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
10bcf25766
gallivm: Silence a warning at -Og
...
../src/gallium/auxiliary/gallivm/lp_bld_arit.c: In function ‘lp_build_round_arch’:
../src/gallium/auxiliary/gallivm/lp_bld_arit.c:2042:7: warning: ‘intrinsic_root’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2042 | lp_format_intrinsic(intrinsic, sizeof intrinsic, intrinsic_root, bld->vec_type);
Can't happen, mark it unreachable.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
36ea1758fd
loader: Silence a warning at -Og
...
../src/loader/loader_dri3_helper.c: In function ‘dri3_free_buffers’:
../src/loader/loader_dri3_helper.c:2022:46: warning: ‘n_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2022 | for (buf_id = first_id; buf_id < first_id + n_id; buf_id++) {
Can't happen, mark it unreachable.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
b882857d28
glsl: Silence a warning at -Og
...
../src/compiler/glsl/gl_nir_link_uniforms.c:1786:50: warning: ‘blocks’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1786 | const struct gl_uniform_block *const block =
Just do nothing if we somehow fail to initialize blocks.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
89acceda60
glsl: Silence some warnings at -Og
...
./src/compiler/glsl/link_uniforms.cpp: In member function ‘virtual void parcel_out_uniform_storage::visit_field(const glsl_type*, const char*, bool, const glsl_type*, glsl_interface_packing, bool)’:
../src/compiler/glsl/link_uniforms.cpp:1171:61: warning: ‘id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1171 | calculate_array_size_and_stride(prog, &this->uniforms[id],
../src/compiler/glsl/link_uniform_initializers.cpp: In function ‘gl_uniform_storage* linker::get_storage(gl_shader_program*, const char*)’:
../src/compiler/glsl/link_uniform_initializers.cpp:41:42: warning: ‘id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
41 | return &prog->data->UniformStorage[id];
Can't happen, but flow control apparently can't prove it.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
831eff15f8
glsl: Silence a warning at -Og
...
../src/compiler/glsl/gl_nir_link_uniforms.c: In function ‘gl_nir_link_uniforms’:
../src/compiler/glsl/gl_nir_link_uniforms.c:1747:39: warning: ‘num_blocks’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1747 | for (unsigned i = 0; i < num_blocks; i++) {
Don't have the patience to seee how you'd hit this but doing nothing is
clearly the right edge case behavior.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
f2b3ecb84f
softfloat: Silence a warning at -Og
...
../src/util/softfloat.c: In function ‘_mesa_shift_right_jam_m’:
../src/util/softfloat.c:432:16: warning: ‘tmp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
432 | *tmp++ = 0;
You could actually hit this if you called _mesa_shift_right_jam_m with
size_words = 0 and dist < 32. Not that you'd _do_ that, but. In this
case do nothing instead of writing through an uninitialized pointer.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Adam Jackson
fad353d7f8
nir: Silence a warning at -Og
...
This throws a curious warning:
In file included from ../src/compiler/nir/nir.h:32,
from ../src/compiler/nir/nir_opt_if.c:24:
../src/compiler/nir/nir_opt_if.c: In function ‘opt_if_loop_last_continue’:
../src/compiler/glsl/list.h:415:64: warning: ‘nif’ may be used uninitialized in this function [-Wmaybe-uninitialized]
415 | return !exec_list_is_empty(list) ? list->tail_sentinel.prev : NULL;
| ^
What's going on here is not enough of the optimizer has run to be able
to prove that nif is always initialized. So just handle the "can't
happen" case as if it could.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724 >
2021-02-18 20:59:43 +00:00
Mike Blumenkrantz
03d3294e35
gallium/trace: remove transfer_map assert
...
this breaks tracing with tc due to the "latest" mechanism which maintains
copies of resources
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9107 >
2021-02-18 18:26:15 +00:00
Alyssa Rosenzweig
c6ed8bf77c
panfrost: Fix uniform_count on Midgard
...
The compiler ABI specifies push uniforms at a 4-byte granularity (like
Bifrost), but Midgard require a 16-byte granularity. As such if the
number of pushed words is not a multiple of 4, there is a buffer overrun
at shader load time. Ordinarily this is inaccessible so the garbage is
ignored.
However, there was a great deal of confusion around the `uniform_cutoff`
variable. In some cases (such a full glmark2 run on a 64-bit processor),
the push uniforms would be at the end of a BO and the overrun would
cause a page fault.
Remove uniform_cutoff entirely and work with count directly to avoid
faulting, and round the count up to be defensive.
Closes : #4289
Fixes: ed810eb0a0 ("panfrost: Don't truncate uniform_count")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Robin Murphy <robin.murphy@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9109 >
2021-02-18 16:06:36 +00:00
Mike Blumenkrantz
0fc146e7da
zink: enable GL_CLAMP cap
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756 >
2021-02-18 14:32:05 +00:00
Mike Blumenkrantz
e8f71f6ac4
mesa/st: add PIPE_CAP_GL_CLAMP
...
when this is not set, this triggers shader and sampler state updates any time a sampler
starts or stops using GL_CLAMP, applying bitmasks needed to run nir_lower_tex
and setting CLAMP_TO_BORDER/CLAMP_TO_EDGE as necessary to mimic the behavior
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756 >
2021-02-18 14:32:05 +00:00
Mike Blumenkrantz
10e71d5c9a
mesa/st: add pipe_sampler_state::border_color_is_integer
...
some drivers need to know whether the border color format is integer,
so this allows disambiguation between samplers based on format types
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756 >
2021-02-18 14:32:05 +00:00
Mike Blumenkrantz
b154a4154b
nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs
...
this fixes mipmapping with saturate by saturating the coord param while
passing an additional param (partial derivatives or lod) that uses the
unsaturated coord value
Reviewed-by: Eric Anholt <eric@anholt.net >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756 >
2021-02-18 14:32:05 +00:00
Timur Kristóf
a6e1178f91
aco: Disallow LSHS temp-only I/O when VS output is written indirectly.
...
Cc: mesa-stable
Signed-off-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/9100 >
2021-02-18 12:10:56 +00:00
Timur Kristóf
72c348f85c
radv/llvm: Fix reporting LDS stats of tess control shaders.
...
The LLVM backend forgot to set config->lds_size, which is used
for reporting LDS stats.
Fixes: cf89bdb9ba "radv: align the LDS size in calculate_tess_lds_size()"
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9098 >
2021-02-18 11:57:22 +00:00
Timur Kristóf
48f349971f
aco: Fix LDS statistics of tess control shaders.
...
The calculate_tess_lds_size function already returns the size in blocks
of the encoding granule, but we forgot to adjust config->lds_size.
This variable is not used to actually set the LDS size used for TCS,
but by ACO to make scheduling decisions.
Fossil DB stats on Sienna Cichlid:
Please note that the +3729.43% is NOT a regression.
The real LDS size used didn't change, it was just reported incorrectly.
Totals from 1342 (0.96% of 139391) affected shaders:
VGPRs: 60880 -> 80240 (+31.80%); split: -0.05%, +31.85%
CodeSize: 3378456 -> 3381224 (+0.08%); split: -0.23%, +0.31%
LDS: 687104 -> 26312192 (+3729.43%)
MaxWaves: 29794 -> 23962 (-19.57%)
Instrs: 644194 -> 644610 (+0.06%); split: -0.32%, +0.39%
Cycles: 2675068 -> 2676804 (+0.06%); split: -0.31%, +0.38%
VMEM: 428840 -> 517418 (+20.66%); split: +22.53%, -1.88%
SMEM: 91831 -> 88587 (-3.53%); split: +5.70%, -9.23%
VClause: 22740 -> 19384 (-14.76%); split: -16.18%, +1.42%
SClause: 19116 -> 18373 (-3.89%); split: -4.34%, +0.46%
Copies: 66662 -> 63448 (-4.82%); split: -5.55%, +0.73%
Fixes: cf89bdb9ba "radv: align the LDS size in calculate_tess_lds_size()"
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/9098 >
2021-02-18 11:57:22 +00:00
Lionel Landwerlin
d8ce76977f
anv: track buffer creation flags
...
So we know a buffer is protected.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127 >
2021-02-18 11:21:14 +02:00
Lionel Landwerlin
d6294a13a6
anv: track command buffer pool flags
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127 >
2021-02-18 11:21:03 +02:00
Lionel Landwerlin
207ee2b6a9
isl: add external parameter to isl_mocs()
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127 >
2021-02-18 11:20:59 +02:00
Lionel Landwerlin
e484478727
genxml: Add PIPE_CONTROL protected memory bits
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127 >
2021-02-18 11:20:55 +02:00
Lionel Landwerlin
1b43528ade
genxml: add MI_SET_APPID on Gen12+
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9127 >
2021-02-18 11:20:51 +02:00
Samuel Pitoiset
b02c709b70
radv: use the pipeline key as hash for pipeline bind markers
...
It's way easier to identify a pipeline compared to a random CPU addr.
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/9083 >
2021-02-18 08:28:49 +00:00
Samuel Pitoiset
51f3855cc4
radv: only emit pipeline bind markers for application pipelines
...
We don't want to emit markers for internal operations.
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/9083 >
2021-02-18 08:28:49 +00:00
Samuel Pitoiset
7a377708fd
radv: add support for user event markers with SQTT
...
This enables VK_EXT_debug_marker only if SQTT is enabled, otherwise
it's just useless.
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/9099 >
2021-02-18 08:17:59 +01:00
Jason Ekstrand
7c63be7ffc
anv/android: Re-implement AcquireImageANDROID
...
Instead of doing a vkQueueSubmit() and hoping for the best, use the
actual sync FD that gets passed in from SurfaceFlinger. The semaphore
and fence FD import functions already handle the -1 case for us so the
implementation is almost trivial.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8814 >
2021-02-18 06:11:05 +00:00
Vinson Lee
fa3cd19697
nv50/ir: Initialize ValueDef member origin in constructors.
...
Fix defects reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member origin is not initialized in this
constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9036 >
2021-02-17 20:30:23 -08:00
Dave Airlie
620afb0956
lavapipe: set viewport state dirty on first execute
...
This makes sure the viewport state gets emitted so that
draw gets viewports setup and the vertex shader doesn't crash.
Fixes bug uncovered with dEQP-VK.api.descriptor_set_layout_lifetime.graphics
once asan fix was done.
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093 >
2021-02-18 01:07:32 +00:00
Dave Airlie
5c00efec23
lavapipe: avoid pointer to pipeline layout in execution
...
pipeline layout lifetime is only during command buffer recording,
Don't store pointers to it, just extract them around it.
Fixes asan use-after-free in
dEQP-VK.api.pipeline.pipeline_layout.lifetime.destroy_after_end
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093 >
2021-02-18 01:07:32 +00:00
Dave Airlie
f94a5f30e0
lavapipe: add reference counting to descriptor set layout
...
asan flagged some use after frees, copy the anv solution
of refcounting the descriptor set layout objects.
dEQP-VK.api.descriptor_set.descriptor_set_layout_lifetime.*
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9093 >
2021-02-18 01:07:32 +00:00
Eric Anholt
d12cecbd53
ci/freedreno: Drop the "arm64" in front of job names.
...
All our jobs are arm64, and it made it hard to find jobs in the gitlab UI
which loves to truncate names.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070 >
2021-02-18 00:49:00 +00:00
Eric Anholt
9500341847
ci/freedreno: Add a fractional gles31 run with asan enabled.
...
We have to disable the GLSL unit tests because with asan it runs way too
much code under qemu and times out. Those unit tests have coverage on
x86, anyway.
I also included a vulkan run, which is disabled by default due to timeouts
that I need to sort out still. It should be a useful tool for turnip
devs, though.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070 >
2021-02-18 00:49:00 +00:00
Eric Anholt
d1b63211c4
ci: Allow better customization of the name of the artifacts for minio.
...
To have asan testing, we need two different sets of artifacts per arch.
Plus, "UPLOAD_FOR_LAVA" was misnamed at this point anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070 >
2021-02-18 00:49:00 +00:00
Eric Anholt
82392e0bb9
mesa/st: Make sure to unbind cb0 on transition away from gs/tess shaders.
...
This atom tries to unbind cb0 when it's not used any more (the params &&
params->NumParameters check), but if you transitioned to not having a
gs/tess enabled at all, you'd skip unbinding it. This was mostly
harmless, since if you don't have a GS, why are you looking at GS
constants? However, if a new program came along that didn't use cb0 at
all, we wouldn't end up in this atom to get the disable, and now you have
a GS enabled but a GS constbuf pointing at potentially freed data.
Dereferencing the freed cb0 data ended up happening in freedreno's
fallback UBO upload path with this combination of tests (which execute in
that order):
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.uniform.geometry.sampler2darray
dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_literal_fragment
dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.dynamically_uniform_geometry
and it seems also affected softpipe as well.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070 >
2021-02-18 00:49:00 +00:00
Eric Anholt
a687e71afd
v3d/qpu: Avoid leaking memory in the QPU disasm test.
...
Required to run this test under ASan, as we'll be soon doing for building
ARM drivers with asan testing.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9070 >
2021-02-18 00:49:00 +00:00
Rob Clark
3f77604623
freedreno: driver-thread annotations
...
Use clangs thread-safety annotations to implement a virtual lock
protecting context fields that should only be accessed from driver-
thread. This should let the compiler help us detect problems where
ctx is used unsafely from things that could be called by the fe/st
thread.
This does end up sprinkled far and wide, it would be nice if the
compiler could be a bit smarter about understanding call-graphs
(at least with static fxns), but at least it makes it clear where
things are called from which thread.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9061 >
2021-02-18 00:27:49 +00:00
Rob Clark
e7e19c6a4f
freedreno: Split batch_flush_reset_dependencies()
...
Flushing a batch needs to happen on driver thread, but the reset-but-
dont-actually-flush case does not. Decouple these two different cases
to prepare for thread-safety annotations.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9061 >
2021-02-18 00:27:49 +00:00
Rob Clark
8a54c4a335
freedreno: Quiet fallthrough warnings
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9061 >
2021-02-18 00:27:49 +00:00
Kristian Høgsberg
0d5fe24c9b
macros: Add thread-safety annotation macros
...
Extracted from !7529
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9061 >
2021-02-18 00:27:49 +00:00
Mike Blumenkrantz
1cef1a34bb
zink: move command pool to the batch
...
this simplifies things for the future when batches will have multiple
cmdbufs, letting us skip having to track/apply resets for them
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9064 >
2021-02-18 00:13:43 +00:00
Mike Blumenkrantz
575756274a
zink: handle dual blending override from driconf
...
when this is enabled, we need to push gl_FragData[1] to location 0 and
index 1 so that it gets blended like the application expects
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9095 >
2021-02-18 00:02:17 +00:00
Jason Ekstrand
56d005c21c
anv/formats: Advertise linear sampling on depth formats
...
They've all supported it since either forever or Iron Lake which is
equivalent to forever for Vulkan.
From Kenneth Graunke's GitLab review:
"Linear blending of depth buffer data is usually fairly nonsense
(something's 2 meters away? another thing's 6 meters away? let's
just report 4 meters?)...but it's definitely a thing we can do, so
we may as well let apps do it, and trust them not when it doesn't
make sense."
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9110 >
2021-02-17 23:43:22 +00:00
Anuj Phogat
69e94e8939
intel/anv: Fix condition for planar yuv surface
...
Test the sampler->conversion for NULL pointer before dereferencing it.
Fixes: Regressions in VulkanCTS.
Fixes: 226316116c "intel/anv: Fix condition to set MipModeFilter for YUV surface"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
2021-02-17 15:08:44 -08:00
Daniel Schürmann
29b866fef6
aco: remove special handling of load_helper_invocation
...
These should now behave the same as is_helper_invocation.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9058 >
2021-02-17 21:53:52 +00:00
Daniel Schürmann
2e6c9e54f1
nir: lower is/load_helper to zero if no helper lanes are needed
...
If there are no helper invocations required during the
execution of the shader, we can assume that there also
are no helper invocations active.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9058 >
2021-02-17 21:53:52 +00:00
Daniel Schürmann
b689a65316
nir: lower load_helper to is_helper if the shader uses demote()
...
load_helper_invocation is an Input Builtin, for which the
value should not change during the execution of a shader.
This new pass inserts an is_helper intrinsic before any
demote() instruction and re-uses its value.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9058 >
2021-02-17 21:53:52 +00:00
Ian Romanick
3c31364f5e
intel/compiler: Use CMPN for min / max on Gen4 and Gen5
...
On Intel platforms before Gen6, there is no min or max instruction.
Instead, a comparison instruction (*more on this below) and a SEL
instruction are used. Per other IEEE rules, the regular comparison
instruction, CMP, will always return false if either source is NaN. A
sequence like
cmp.l.f0.0(16) null<1>F g30<8,8,1>F g22<8,8,1>F
(+f0.0) sel(16) g8<1>F g30<8,8,1>F g22<8,8,1>F
will generate the wrong result for min if g22 is NaN. The CMP will
return false, and the SEL will pick g22.
To account for this, the hardware has a special comparison instruction
CMPN. This instruction behaves just like CMP, except if the second
source is NaN, it will return true. The intention is to use it for min
and max. This sequence will always generate the correct result:
cmpn.l.f0.0(16) null<1>F g30<8,8,1>F g22<8,8,1>F
(+f0.0) sel(16) g8<1>F g30<8,8,1>F g22<8,8,1>F
The problem is... for whatever reason, we don't emit CMPN. There was
even a comment in lower_minmax that calls out this very issue! The bug
is actually older than the "Fixes" below even implies. That's just when
the comment was added. That we know of, we never observed a failure
until #4254 .
If src1 is known to be a number, either because it's not float or it's
an immediate number, use CMP. This allows cmod propagation to still do
its thing. Without this slight optimization, about 8,300 shaders from
shader-db are hurt on Iron Lake.
Fixes the following piglit tests (from piglit!475):
tests/spec/glsl-1.20/execution/fs-nan-builtin-max.shader_test
tests/spec/glsl-1.20/execution/fs-nan-builtin-min.shader_test
tests/spec/glsl-1.20/execution/vs-nan-builtin-max.shader_test
tests/spec/glsl-1.20/execution/vs-nan-builtin-min.shader_test
Closes : #4254
Fixes: 2f2c00c727 ("i965: Lower min/max after optimization on Gen4/5.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Iron Lake and GM45 had similar results. (Iron Lake shown)
total instructions in shared programs: 8115134 -> 8115135 (<.01%)
instructions in affected programs: 229 -> 230 (0.44%)
helped: 0
HURT: 1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9027 >
2021-02-17 19:52:24 +00:00
Ian Romanick
684ec33c79
intel/compiler: Make the CMPN builder work like the CMP builder
...
Since the CMPN builder was never used, there was no reason to make its
interface usable. :)
Fixes: 2f2c00c727 ("i965: Lower min/max after optimization on Gen4/5.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9027 >
2021-02-17 19:52:24 +00:00
Ian Romanick
6c8e2e9317
intel/compiler: Enable the ability to emit CMPN instructions
...
v2: Move checks to the EU validator. Suggested by Jason.
Fixes: 2f2c00c727 ("i965: Lower min/max after optimization on Gen4/5.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9027 >
2021-02-17 19:52:24 +00:00
Ian Romanick
b0d7434c71
intel/eu/validate: Add some checks for CMP and CMPN
...
These checks were originally assertions elsewhere either in the existing
code or later in this MR.
Suggested-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9027 >
2021-02-17 19:52:24 +00:00
Eric Anholt
a212d08296
virgl: Drop a context dependency from part of the shader compile path.
...
We should be exposing PIPE_CAP_SHAREABLE_SHADERS, but we aren't. Clear up
one place that was using it so the next person has less to look through,
and document what's left.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9088 >
2021-02-17 19:31:07 +00:00
Eric Anholt
175c827e72
gallium: Flip the default value of PIPE_CAP_SHAREABLE_SHADERS.
...
We should be exposing it in every driver, since it's required eventually
to reduce jank. Make drivers have to explicitly opt out instead of opt
in.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9088 >
2021-02-17 19:31:07 +00:00
Andres Gomez
64ffe0ad25
ci: build gfxreconstruct v0.9.5
...
https://github.com/LunarG/gfxreconstruct/issues/328 and
https://github.com/LunarG/gfxreconstruct/issues/402 are already fixed
in the "master" branch.
Updated the piglit version so it supports this version.
Additionally, LunarG's VulkanTools are not built any more since
GFXReconstruct is now able to generate screenshots on its own without
using the VK_LAYER_LUNARG_screenshot layer.
v2:
- Explain the VulkanTools removal in the commit log (Martin).
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9032 >
2021-02-17 19:10:42 +00:00
Andres Gomez
5ddabe00c5
ci: only install piglit dependencies when installing piglit
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9032 >
2021-02-17 19:10:42 +00:00
Andres Gomez
eba962dda4
ci: remove pytest since we don't need it any more
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9032 >
2021-02-17 19:10:42 +00:00
Jesse Natalie
6f729a7c9d
microsoft/clc: Only apply float scaling to 32bit fdiv
...
Reviewed By: Bill Kristiansen <billkris@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9091 >
2021-02-17 19:01:02 +00:00
Anuj Phogat
226316116c
intel/anv: Fix condition to set MipModeFilter for YUV surface
...
Mip Mode Filter must be set to MIPFILTER_NONE for Planar YUV surfaces.
Add the missing condition to check for planar format.
Fixes: b24b93d584 "anv: enable VK_KHR_sampler_ycbcr_conversion"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
2021-02-17 18:06:07 +00:00
Andres Gomez
c1d33c758e
ci: piglit runner colors diff output on failures
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Martin Peres <martin.peres@mupuf.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9104 >
2021-02-17 17:39:28 +00:00
Alyssa Rosenzweig
2104135f38
nir: Fix grammar error
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9103 >
2021-02-17 17:23:09 +00:00
Samuel Pitoiset
8e97fc3a29
radv: do not allow to capture SQTT on the compute queue
...
This currently hangs and I don't know why. It looks better to
print a message instead of hanging the whole system.
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/9097 >
2021-02-17 16:08:07 +00:00
Samuel Pitoiset
6d8516bd74
radv: stop emitting pipeline bind markers
...
RGP actually crashes if pipeline bind markers are emitted without
PSO correlation objects.
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/9097 >
2021-02-17 16:08:07 +00:00
Samuel Pitoiset
de542784f8
radv: make sure to allocate enough space when emitting SQTT userdata
...
If we emit a lot of markers, we might reach the limit easily.
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/9097 >
2021-02-17 16:08:07 +00:00
Samuel Pitoiset
80709d11d2
radv: remove an outdated TODO about SQTT cache flushes
...
It's fully implemented now.
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/9097 >
2021-02-17 16:08:07 +00:00
Samuel Pitoiset
09b23c42f9
radv: move SQTT parameters initialization to radv_thread_trace_init()
...
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/9097 >
2021-02-17 16:08:07 +00:00
Samuel Pitoiset
388bde7e82
radv: create the start/stop CS for SQTT dynamically
...
This seems much cleaner and will help for future work. Also, this
might help if we want to dynamically change some SQTT parameters
in the future.
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/9097 >
2021-02-17 16:08:07 +00:00
Andres Gomez
0f7379e308
ci: tracie dashboard URLs only in the failure after the testcase
...
When adding the direct link to the diff page in the resulting
JUnit XML file we were not correctly skipping the first line from the
matching range.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4261
Fixes: 27f8c46648 ("ci: recover tracie dashboard URLs for failing traces")
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8939 >
2021-02-17 16:56:58 +02:00
Andres Gomez
7393303637
ci: correct artifacts location for piglit's runner messages
...
We are now using pages.
v2:
- Define a helper variable for the artifacts base URL (Juan).
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Eric Anholt <eric@anholt.net > [v1]
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9092 >
2021-02-17 14:37:35 +00:00
Andres Gomez
87153b8f1c
ci: make sure piglit's artifacts are not overwritten
...
The ".test" template defines a generic artifact location to upload and
the ".piglit-test" a custom one we don't want to get overwritten by
the generic one.
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9092 >
2021-02-17 14:37:35 +00:00
Andres Gomez
4ae5b84a67
ci: correct piglit's HTML summary location for artifacts upload
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9092 >
2021-02-17 14:37:35 +00:00
Andres Gomez
88a6c6a438
ci: clean paths used in the piglit runner
...
When running with baremetal, the results path becomes //results. The
unexpected double backslash causes troubles when using sed
later.
Signed-off-by: Andres Gomez <agomez@igalia.com >
Acked-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9092 >
2021-02-17 14:37:35 +00:00
Pierre-Eric Pelloux-Prayer
90d6365ad4
radeonsi: force dcc clear to use compute clear
...
After the previous commit, when running the following
deqp-gles31 caselist:
dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32f_rgba32ui
dEQP-GLES31.functional.image_load_store.2d.format_reinterpret.rgba32f_rgba32i
The second test always fails on gfx10. I don't know why,
but forcing the dcc clear from si_decompress_dcc to use
compute fixes the problem.
The test caselist wasn't failing before because the dcc
disable step was done in si_resource_copy_region, before
calling si_compute_copy_image.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8958 >
2021-02-17 14:57:26 +01:00
Pierre-Eric Pelloux-Prayer
1d64a1045e
radeonsi: enable dcc image stores on gfx10+
...
This was implemented in 1d3bffaf9c ,
but missing the WRITE_COMPRESS_ENABLE bit, then disabled by
4dc6ed2a59040f04648eadbffeb1522587d00f3.
This commits reimplements it to:
- avoid disabling dcc when uploading FP16 textures
(see si_use_compute_copy_for_float_formats)
- being able to use compute to upload textures in more cases, rather
than using the blit path
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8958 >
2021-02-17 14:57:26 +01:00
Pierre-Eric Pelloux-Prayer
f18bceac72
radeonsi: replace force_cp_dma arg of si_clear_buffer by enum
...
The new enum has 3 values:
- SI_CP_DMA_CLEAR_METHOD: equivalent to force_cp_dma = true
- SI_COMPUTE_CLEAR_METHOD: to force the clear to use compute
- SI_AUTO_SELECT_CLEAR_METHOD: equivalent to force_cp_dma = false
No functional change yet, but this will be used later.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8958 >
2021-02-17 14:57:26 +01:00
Rhys Perry
1a0b0e8460
radv,aco: allow unaligned LDS access on GFX9+
...
fossil-db (GFX10.3):
Totals from 223 (0.16% of 139391) affected shaders:
SGPRs: 10032 -> 10096 (+0.64%)
VGPRs: 7480 -> 7592 (+1.50%)
CodeSize: 853960 -> 821920 (-3.75%); split: -3.76%, +0.01%
MaxWaves: 5916 -> 5908 (-0.14%)
Instrs: 154935 -> 150281 (-3.00%); split: -3.01%, +0.01%
Cycles: 3202496 -> 3080680 (-3.80%); split: -3.81%, +0.00%
VMEM: 48187 -> 46671 (-3.15%); split: +0.29%, -3.44%
SMEM: 13869 -> 13850 (-0.14%); split: +1.52%, -1.66%
VClause: 3110 -> 3085 (-0.80%); split: -1.03%, +0.23%
SClause: 4376 -> 4381 (+0.11%)
Copies: 12132 -> 12065 (-0.55%); split: -2.61%, +2.06%
Branches: 5204 -> 5203 (-0.02%)
PreVGPRs: 6304 -> 6359 (+0.87%); split: -0.10%, +0.97%
See https://reviews.llvm.org/D82788
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/8762 >
2021-02-17 12:57:12 +00:00
Rhys Perry
c2d57f55a8
radv: relax shared alignment requirements in mem_vectorize_callback
...
fossil-db (GFX10.3):
Totals from 13 (0.01% of 139391) affected shaders:
CodeSize: 241316 -> 238684 (-1.09%)
Instrs: 42251 -> 41912 (-0.80%); split: -0.81%, +0.01%
Cycles: 1991192 -> 1974668 (-0.83%); split: -0.83%, +0.00%
VMEM: 4067 -> 4102 (+0.86%)
SMEM: 569 -> 578 (+1.58%)
SClause: 848 -> 858 (+1.18%)
Copies: 3077 -> 2992 (-2.76%); split: -3.12%, +0.36%
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/8762 >
2021-02-17 12:57:12 +00:00
Mike Blumenkrantz
4feca7ecde
gallium/trace: add a pipe_screen::get_compiler_options method
...
this fixes crashes on startup
Fixes: a3512ddfdf ("st/mesa: don't enable NV_copy_depth_to_color if NIR doesn't support FP64")
fixes mesa/mesa#4312
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9082 >
2021-02-17 12:24:33 +00:00
Marek Olšák
c59fd3acb9
glthread: ignore the return value of glUnmapBuffer, don't sync, and return true
...
We always return GL_TRUE from the Unmap functions.
gl_marshal.py is modified so as not to use "return" in the unmarshal
function, which always returns void.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9029 >
2021-02-17 05:47:27 -05:00
Marek Olšák
638a184849
glthread: don't sync when using pixel buffer objects
...
The pointer is a GPU offset if a PBO is bound.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9029 >
2021-02-17 05:47:25 -05:00
Marek Olšák
0b6739ef80
glthread: don't declare pointers with const in unmarshal functions
...
so that GL functions with a non-const pointer don't print a warning when
we call them, such as glGetTexImage with a PBO where the pointer is really
just an offset.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9029 >
2021-02-17 05:47:23 -05:00
Marek Olšák
2804d489e3
glthread: assume all parameters are fixed if marshal_sync is present
...
We want glthread to ignore variable-sized parameters if the only thing
we want is to pass the pointer parameter as-is, e.g. when a PBO is bound.
Making it conditional on marshal_sync is kinda hacky, but it's the easiest
path towards handling PBOs, which will use marshal_sync to check whether
a PBO is bound.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9029 >
2021-02-17 05:47:21 -05:00
Marek Olšák
8288882965
radeonsi: set MEM_ORDERED optimally
...
It must be 1 only if both sampler and non-sampler VMEM instructions
that return something are used. BVH counts as a sampler instruction.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
e9e385b084
radeonsi: gather shader info about VMEM usage for MEM_ORDERED
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
27e22f025c
radeonsi: gather shader info about indirect UBO/SSBO/samplers/images
...
A future commit will use it.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
d47c44add8
radeonsi: gather info about bindless images and memory stores with strstr(intr)
...
This is only code simplification.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
5e47d6fc73
radeonsi: fix the value of uses_bindless_samplers
...
We don't have any nir_variables for uniforms, so this code wasn't
doing anything. Also, uniform handles are almost always uniforms.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
19e6601413
radeonsi: do late NIR optimizations after uniform inlining
...
This was missing.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
33ac9dec91
radeonsi: allocate filled_size for streamout targets in set_streamout_buffers
...
so that create_stream_output_target doesn't use the context and can be
called from any thread. This is for u_threaded_context.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
9db4b331f9
radeonsi: improve comments in si_emit_derived_tess_state
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
98ea523e00
radeonsi: for tess, determine the minimum num_patches before optimizing tg size
...
Doing these MINs at the end could have undone optimizations for the LDS
size and threadgroup size, so move the MINs up.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Marek Olšák
4fe37b850a
ac/surface: use family_id so as not to crash with SI_FORCE_FAMILY in addrlib
...
We can't invoke gfx6 addrlib (overridden by SI_FORCE_FAMILY) with a gfx9
family ID.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9028 >
2021-02-17 04:49:24 -05:00
Pierre-Eric Pelloux-Prayer
a67d3e7c9e
radeonsi: fix si_check_render_feedback
...
si_check_render_feedback only relied on si_images::enabled_mask and
si_samplers::enabled_mask to determine if a texture was being used
both as input and output.
Given that some samplers/images can be considered active (so accounted
for by enabled_mask) but not used by the current shader this could
lead to false-positive.
This commit fixes this by and-ing the above mask with the information
from shader_info for each active shader.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4227
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8869 >
2021-02-17 09:11:46 +00:00
Pierre-Eric Pelloux-Prayer
bddc0e023c
radeonsi: fix read from compute / write from draw sync
...
A compute dispatch should see the result of a previous draw command.
radeonsi was missing this implicit sync, causing rendering artifacts:
the compute shader was reading from a texture still being written to
by the previous draw.
Framebuffer BOs are marked with RADEON_USAGE_NEEDS_IMPLICIT_SYNC,
so compute jobs will sync.
v2: use RADEON_USAGE_NEEDS_IMPLICIT_SYNC
v3: unconditionally make CB coherent after a flush
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com > (v3)
Reviewed-by: Marek Olšák <marek.olsak@amd.com > (v3)
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4032
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2878
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1336
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8869 >
2021-02-17 09:11:46 +00:00
Pierre-Eric Pelloux-Prayer
a8373b3d38
radeonsi: store si_context::xxx_shader members in union
...
This allows to access them individually (sctx->shader.ps) or
using array indexing (sctx->shaders[PIPE_SHADER_FRAGMENT]).
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8869 >
2021-02-17 09:11:46 +00:00
Pierre-Eric Pelloux-Prayer
47ed009194
radeonsi: fix indentation issue in si_texture.c
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8869 >
2021-02-17 09:11:46 +00:00
Iago Toral Quiroga
064b846949
broadcom/compiler: don't dump shader-db stats for failed shaders
...
Shaders that fail register allocation were dumped with an instruction
count of 0, so getting them to compile would show up as an instruction
count regression. Also, the LOST/GAINED stats depend on us not dumping
data for failed shaders, which is why we were always seeing 0/0 there.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9077 >
2021-02-17 09:01:02 +01:00
Iago Toral Quiroga
df6c19c1fd
broadcom/compiler: use a helper function to decide on TMU spilling
...
As we add more compiler optimizations that can increase register pressure
we may decide to disallow TMU spilling in more cases so it is probably
better to move this to its own helper function.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9077 >
2021-02-17 09:01:02 +01:00
Iago Toral Quiroga
14af7b3085
broadcom/compiler: don't emit redundant ldunif
...
If we emit a new uniform and that uniform has already been emitted
in the same block we can just reuse that.
There is a balancing game here between reducing ldunif instructions
and not increasing register pressure too much though, so we put
a limit to how far back we are willing to look for a previous
definition of the uniform. Based on shader-db results, 20 instructions
produces best results.
total instructions in shared programs: 14928266 -> 14907432 (-0.14%)
instructions in affected programs: 6431841 -> 6411007 (-0.32%)
helped: 15270
HURT: 10772
Instructions are helped.
total uniforms in shared programs: 3944672 -> 3840276 (-2.65%)
uniforms in affected programs: 1827184 -> 1722788 (-5.71%)
helped: 30423
HURT: 845
Uniforms are helped.
total inst-and-stalls in shared programs: 14957813 -> 14936873 (-0.14%)
inst-and-stalls in affected programs: 6475349 -> 6454409 (-0.32%)
helped: 15287
HURT: 10852
Inst-and-stalls are helped.
v2 (Eric):
- consider ldunifrf too
- check that no other instruction writes to the register
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9077 >
2021-02-17 09:01:01 +01:00
Samuel Iglesias Gonsálvez
8dd54778fa
turnip: VK_EXT_memory_budget implementation
...
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8524 >
2021-02-17 08:07:33 +01:00
Samuel Iglesias Gonsálvez
4342dec09a
turnip: keep track of memory heap usage, size and flags
...
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8524 >
2021-02-17 08:07:19 +01:00
Samuel Iglesias Gonsálvez
182fb988c8
util: fix parsing of /proc/meminfo MemAvailable value
...
It was interpreting the value as hexadecimal when it is unsigned.
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8524 >
2021-02-17 08:06:15 +01:00
Vinson Lee
a7a7d25e5b
etnaviv: Fix memory leak in etna_vertex_elements_state_create.
...
Fix defect reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable cs going out of scope leaks the storage it points to.
Fixes: c9e8b49b88 ("etnaviv: gallium driver for Vivante GPUs")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9034 >
2021-02-16 20:53:51 -08:00
Jason Ekstrand
3ce6ca7214
intel/fs: Shuffle can't handle source modifiers
...
On Gen7, we have to split shuffles into two MOVs for 64-bit types so we
can't handle source modifiers. On Gen12.5, we have to use integer types
all the time so we can't use them there either. Fixing that will be a
different commit but it interacts with this one.
Fixes: 90c9f29518 "i965/fs: Add support for nir_intrinsic_shuffle"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9068 >
2021-02-17 03:59:25 +00:00
Jason Ekstrand
12fa219768
nir/opt_large_constants: Handle generic pointers
...
We already throw out any variables which may have a complex use so we
just need to make sure that our mode checks don't assert if we have a
deref which may_be but not must_be nir_var_function_temp.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9068 >
2021-02-17 03:59:25 +00:00
Jason Ekstrand
8b133a1b25
nir: Fix parameter order in the bcsel-of-shuffle optimization
...
Fixes: 4ff4d4e569 "nir/opt_intrinsic: Optimize bcsel(b, shuffle..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9068 >
2021-02-17 03:59:25 +00:00
Jason Ekstrand
ceb6986d34
nir: Don't optimize bcsel-of-shuffle across blocks
...
We can't move the shuffle to a new block so this only works if the
shuffle and the bcsel are in the same block. Fortunately, in the
motivating case, this is true.
Also, we have to be careful around discard. We could try really hard to
just avoid moving them past discard but we choose to simply bail if we
see a discard instead.
Fixes: 4ff4d4e569 "nir/opt_intrinsic: Optimize bcsel(b, shuffle..."
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9068 >
2021-02-17 03:59:25 +00:00
James Jones
129d83cac2
nouveau: Use format modifiers in buffer allocation
...
The nvc0 nouveau backend already claimed to support format modifiers, but
in practice it ignored them when allocating buffers outside of a
perfunctory check for the linear modifier in the first element of the
format modifier list.
This change deduces the supported modifiers, if any, for a given miptree
creation request, prioritizes them based on performance and memory waste
properties, compares the requested modifiers against the prioritized list
of supported modifiers, and overrides the internal layout calculations
based on the layout defined by the resulting modifier.
Additionally, if modifiers are provided and none are compatible with the
miptree creation request, the function now fails. This brings the nouveau
behavior in line with other drivers such as i965 and etnaviv.
Signed-off-by: James Jones <jajones@nvidia.com >
Tested-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3724 >
2021-02-17 03:52:53 +00:00
James Jones
df451091ac
nouveau: no modifier != the invalid modifier
...
Other drivers fail resource allocation when a list of modifiers for the
resource is provided but none are supported. This includes cases when the
never-supported DRM_FORMAT_MOD_INVALID modifier is explicitly passed. To
enable matching that functionality in nouveau, use an empty modifier list
rather than creating a one-entry list containing only
DRM_FORMAT_MOD_INVALID when the non-modifier resource creation function is
used.
This change stops short of failing allocations when no modifier is
specified, because the current code ignores all modifiers except the linear
modifier when creating resources, so there is not yet a framework in place
to determine which modifiers are valid for a given resource creation
request, and hence no way to reject only those which are invalid.
Signed-off-by: James Jones <jajones@nvidia.com >
Tested-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3724 >
2021-02-17 03:52:53 +00:00
James Jones
cf999b3cc3
nouveau: Use DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D
...
Replace existing usage of the NVIDIA_16BX2_BLOCK format modifiers with
parameterized use of the more general macro. Nouveau will now report
support for slightly different modifiers depending on whether the
underlying chip is a tegra GPU or not, and will potentially report valid
format modifiers for more resource types, but overall this should be a
functional no-op for existing applications.
Signed-off-by: James Jones <jajones@nvidia.com >
Tested-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3724 >
2021-02-17 03:52:53 +00:00
James Jones
ff534e1b50
nouveau: Stash supported sector layout in screen
...
Older Tegra GPUs use a different sector bit swizzling layout than desktop
and Xavier GPUs. Hence their format modifiers must be differentiated from
those of other GPUs. As a precursor to supporting more expressive block
linear format modifiers, deduce the sector layout used for a given GPU from
its chipset and stash the layout in the nouveau screen structure.
Signed-off-by: James Jones <jajones@nvidia.com >
Tested-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3724 >
2021-02-17 03:52:53 +00:00
Mike Blumenkrantz
c4cc3d915b
zink: add a disk cache for pipeline objects
...
this writes the pipeline cache to disk on shutdown
ideally we'd rather write this incrementally any time we make a new pipeline,
but that ends up breaking the disk cache infrastructure since we're always writing
to the same file, so this is the best we can do for now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9094 >
2021-02-17 02:59:52 +00:00
Mike Blumenkrantz
eb3cb170fc
zink: create a VkPipelineCache object on the screen and use it
...
this enables reuse of shaders across pipelines
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9094 >
2021-02-17 02:59:52 +00:00
Mike Blumenkrantz
de6ed18584
zink: hook up valid_buffer_range for buffer resources using util_range
...
this lets us avoid stalling during transfer map in some cases
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9062 >
2021-02-17 02:16:59 +00:00
Mike Blumenkrantz
8b6e7d00f0
zink: add flag for no-oping fence finish
...
if a fence hasn't been activated then we don't need to wait on it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9067 >
2021-02-17 01:48:07 +00:00
Rob Clark
25a37c030b
freedreno/ir3: Add missing shader prog cache invalidation
...
I'm not aware of actually hitting this case, but we need to consider
more than just vs/fs when shader state is deleted.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:44 +00:00
Rob Clark
75b0c4b5e1
freedreno/ir3: Async shader compile
...
Draw-time variants are still synchronous, but I'm not sure there is much
(easy) benefit from generating them asynchronously. Without patching
the cmdstream later before batch submit, we'd end up waiting for them
immediately. But we should mostly only hit draw-time variants for
desktop GL (and mostly legacy features).
Note: new xfb xfail on a5xx, but most of the xfb tests are already xfail
so I think we just managed to change the timing a bit, rather than this
being related to async compile.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3857
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:44 +00:00
Rob Clark
132512822b
freedreno/ir3: Reshuffle compute state creation
...
There was just a single remaining caller of ir3_shader_create_compute(),
so fold that into ir3_shader_compute_state_create().
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:44 +00:00
Rob Clark
f4ab72d8e8
freedreno/ir3: Reshuffle ir3_shader_create()
...
This had only a single caller, so no need to be exported. With
that done, fold the ir3_shader creation (ie. the cheap part) into
ir3_shader_state_create(), and rename what is left.
This is prep to moving initial variant creation to a work queue.
It does slightly change the error handling, in that we don't
cleanup the shader hwcso. We wouldn't be able to do this anyways
with async compile. But it ends up using the same error handling
paths that we'd hit if we got a compile failure for a draw-time
variant.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:44 +00:00
Rob Clark
7100bb1ebc
freedreno/ir3: Add ir3_screen_fini()
...
Move ir3_compiler_destroy() into ir3_screen_fini(). This gives us a
good place to cleanup an sync compile queue.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:43 +00:00
Rob Clark
90031adfc7
freedreno/ir3: Move ir3_compiler_create()
...
All the ir3 using backends already call ir3_screen_init(), so lets just
move compiler creation there.
In a subsequent patch, we'll add initialization of the queue for async
compile.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:43 +00:00
Rob Clark
6fdd1d30f6
freedreno/ir3: Add ir3_shader_state
...
Initially just a wrapper for ir3_shader, but this is where we'll hook in
the bookkeeping for async compile.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:43 +00:00
Rob Clark
378c14331b
freedreno/ir3+a5xx+a6xx: De-duplicate create_compute_state()
...
These were identical between a5xx and a6xx, so move into shared helper
that can be directly plugged into pctx, similar to the various 3d shader
state creation.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:43 +00:00
Rob Clark
f673266191
freedreno/a6xx: Drop fd6_compute_stateobj
...
It wasn't really doing anything useful.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:43 +00:00
Rob Clark
d2bcbb6792
freedreno/a5xx: Drop fd5_compute_stateobj
...
It wasn't really doing anything useful.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:43 +00:00
Rob Clark
6ed94905a6
freedreno: Misc cleanup
...
Some whitespace cleanup + comment addition.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8795 >
2021-02-16 23:43:43 +00:00
Mike Blumenkrantz
d550c5780f
zink: use nir_shader_instructions_pass for draw params pass
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9090 >
2021-02-16 18:13:31 -05:00
Jesse Natalie
f95afdd606
clover: Add -fgnu89-inline to Clang command line
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9085 >
2021-02-16 22:11:21 +00:00
Jesse Natalie
37142847fa
microsoft/clc: Add test with inline function
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9085 >
2021-02-16 22:11:21 +00:00
Jesse Natalie
c1b8629b2c
microsoft/clc: Add -fgnu89-inline to clang args
...
Without this, inline functions don't have their body emitted in the
resulting LLVM IR, meaning the kernel will fail to link.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9085 >
2021-02-16 22:11:21 +00:00
Jason Ekstrand
1ef04f56c1
spirv: Delete the impl for prototype-only functions
...
Previously, when we had a prototype-only function in SPIR-V, we would
compile it just fine and the function would have an impl that did
nothing. This commit changes that so that the nir_function::impl is
NULL to indicate a prototype-only function.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9069 >
2021-02-16 20:50:51 +00:00
Jason Ekstrand
9d1d55f0fd
spirv: Store the nir_function in vtn_function
...
This is a better mapping as not all nir_functions have impls.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9069 >
2021-02-16 20:50:51 +00:00
Mike Blumenkrantz
4a35d27b87
zink: add nir_intrinsic_memory_barrier_image handling
...
this is the last one
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9087 >
2021-02-16 20:31:09 +00:00
SureshGuttula
fc0eb6554b
frontends/va : Fix memory leaks incase of error returns
...
Incase of error returns missed the free calls for config and context.
This patch handling in freeing them
Signed-off-by: SureshGuttula <sguttula@amd.com >
Reviewed-by: Vinson Lee <vlee@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8993 >
2021-02-16 19:14:40 +00:00
Jesse Natalie
f59e6ad5d7
CI: Use a sha for the Windows SPIRV-LLVM-Translator dependency
...
Acked-by: Daniel Stone (daniels@collabora.com )
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9018 >
2021-02-16 18:33:18 +00:00
Mike Blumenkrantz
d451285e45
zink: fix device codegen extension detection
...
the logic for this was broken and failed to detect any extensions other
than the first one listed. instead, we must follow this logic chain:
1. check the extension name
2a. if this is an extension that got promoted to core, check the @since version
3a. if current version >= @since version
4a. if the extension has required features/properties, check those
4b. else set supported
3b. else
4a. if the extension has required features/properties, check those
4b. else set supported
2b. else
4a. if the extension has required features/properties, check those
4b. else set supported
Fixes: efe6f00e34 ("zink/codegen: do not enable extensions that are now core")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9081 >
2021-02-16 18:23:31 +00:00
Jason Ekstrand
2491d5a662
nir/algebraic: Covert up-cast of down-cast to extract on Intel
...
This starts generating extract for bit sizes other than 32 but our
back-end handles that just fine.
Reviewed-by: Ian Romanick <ian.d.romanick@.intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8872 >
2021-02-16 16:36:31 +00:00
Jason Ekstrand
f9b3be09e1
nir/algebraic: Clean up up-cast of down-cast when we can
...
There are a bunch of cases where we can pretty quickly determine that
the high bits don't matter. In these cases, delete the casts.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8872 >
2021-02-16 16:36:31 +00:00
Jason Ekstrand
96303a59ea
nir: Add some range analysis for used bits
...
This isn't 100% accurate, of course, but it should be good enough for
what we're about to do with it.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8872 >
2021-02-16 16:36:31 +00:00
Jason Ekstrand
d670afa27a
intel/nir: Lower 8-bit phis on Gen11+
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8872 >
2021-02-16 16:36:31 +00:00
Jason Ekstrand
d41ac6e2ca
nir/lower_bit_size: Support phi instructions
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8872 >
2021-02-16 16:36:31 +00:00
Jason Ekstrand
6413e67591
nir: Add a couple helpers for phis and cursors
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8872 >
2021-02-16 16:36:31 +00:00
Rohan Garg
6dfdde149e
virgl: Return total video memory if available
...
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9009 >
2021-02-16 16:09:15 +00:00
Rohan Garg
e778aceaae
virgl: update headers
...
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9009 >
2021-02-16 16:09:14 +00:00
Thong Thai
38f012e023
frontends/va/config: Fix check for packed header config
...
Fixes: b4651890be ("frontends/va: Update conditional checks for code stability.")
Signed-off-by: Thong Thai <thong.thai@amd.com >
Tested-by: James Zhu <James.Zhu@amd.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4285
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9020 >
2021-02-16 15:29:39 +00:00
Gustavo Padovan
74f9bcc21c
gitlab-ci: add intel APL and GLK devices with manual triggers
...
This add support for the Intel Apollo Lake and Gemini Lake families,
however the job will be disabled by default unless the developer
manually hit play for the iris-apl-traces and iris-glk-traces jobs in
GitLab CI.
These devices are still under experimental level support in
the Lava lab and are not guaranteed to work reliably yet. Once they
become reliable and more resilient we will enable them by default in
MesaCI.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8162 >
2021-02-16 15:08:27 +01:00
Gustavo Padovan
6ec815cfd2
gitlab-ci: build the iris gallium driver as well
...
For now we will start with iris. Our main focus is to enable the devices
to be used in MesaCI.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8162 >
2021-02-16 15:08:27 +01:00
Gustavo Padovan
e2b5def1f0
gitlab-ci: extend x86_64 kernel config to suport Intel devices
...
There are extra kernel config options we need to enable for Intel.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8162 >
2021-02-16 15:08:26 +01:00
Rohan Garg
56bbbc8322
intel/compiler: Free resources on test teardown
...
Ensure that all resources are properly released by
properly parenting them to a memory context and releasing
the context during test teardown.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8162 >
2021-02-16 15:07:52 +01:00
Rohan Garg
628c10f14e
intel/genxml: Free resource before exiting
...
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8162 >
2021-02-16 15:07:52 +01:00
Icecream95
9bb376bbdb
pan/bi: Use the correct size for UBO loads
...
Multiply by the destination bit size to get the number of bits to
load instead of assuming 32 bits.
Fixes: 2e57684d2d ("pan/bi: Implement load_ubo with the builder")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9071 >
2021-02-16 13:14:30 +00:00
Bas Nieuwenhuizen
596fb88c01
radv: Do pipe misalignment check per plane.
...
Fixes: 4c99d6ff54 ("radv: flush L2 for images affected by the pipe misaligned issue on GFX10+")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9078 >
2021-02-16 13:04:09 +00:00
Arcady Goldmints-Orlov
7f61ff7b4d
broadcom/compiler: Merge instructions more efficiently
...
Instructions are allowed to access up to two rf registers, or one rf
register and a small immediate. This change allows qpu_merge_inst to
take full advantage of this by allowint the merging of two instructions
if they have no more than two different rf registers between them,
or one rf register and one small immediate. qpu_merge_inst rewrites
the instructions as needed to pack everything into raddr_a and raddr_b
in the merged instruction.
shader-db stats:
total instructions in shared programs: 19938769 -> 18929664 (-5.06%)
instructions in affected programs: 17929438 -> 16920333 (-5.63%)
helped: 95008
HURT: 242
helped stats (abs) min: 1 max: 785 x̄: 10.62 x̃: 7
helped stats (rel) min: 0.30% max: 21.25% x̄: 5.37% x̃: 4.98%
HURT stats (abs) min: 1 max: 2 x̄: 1.10 x̃: 1
HURT stats (rel) min: 0.30% max: 3.12% x̄: 1.62% x̃: 1.54%
95% mean confidence interval for instructions value: -10.67 -10.52
95% mean confidence interval for instructions %-change: -5.37% -5.33%
Instructions are helped.
total max-temps in shared programs: 3122664 -> 3112446 (-0.33%)
max-temps in affected programs: 124881 -> 114663 (-8.18%)
helped: 5445
HURT: 0
helped stats (abs) min: 1 max: 15 x̄: 1.88 x̃: 1
helped stats (rel) min: 1.49% max: 40.54% x̄: 8.97% x̃: 6.67%
95% mean confidence interval for max-temps value: -1.91 -1.84
95% mean confidence interval for max-temps %-change: -9.12% -8.81%
Max-temps are helped.
total sfu-stalls in shared programs: 38028 -> 41231 (8.42%)
sfu-stalls in affected programs: 6053 -> 9256 (52.92%)
helped: 664
HURT: 3380
helped stats (abs) min: 1 max: 2 x̄: 1.04 x̃: 1
helped stats (rel) min: 9.09% max: 100.00% x̄: 70.81% x̃: 100.00%
HURT stats (abs) min: 1 max: 4 x̄: 1.15 x̃: 1
HURT stats (rel) min: 0.00% max: 300.00% x̄: 46.39% x̃: 25.00%
95% mean confidence interval for sfu-stalls value: 0.76 0.82
95% mean confidence interval for sfu-stalls %-change: 25.03% 29.26%
Sfu-stalls are HURT.
total inst-and-stalls in shared programs: 19976797 -> 18970895 (-5.04%)
inst-and-stalls in affected programs: 17963129 -> 16957227 (-5.60%)
helped: 95017
HURT: 245
helped stats (abs) min: 1 max: 785 x̄: 10.59 x̃: 7
helped stats (rel) min: 0.30% max: 21.25% x̄: 5.35% x̃: 4.95%
HURT stats (abs) min: 1 max: 2 x̄: 1.09 x̃: 1
HURT stats (rel) min: 0.30% max: 3.12% x̄: 1.61% x̃: 1.54%
95% mean confidence interval for inst-and-stalls value: -10.64 -10.48
95% mean confidence interval for inst-and-stalls %-change: -5.35% -5.31%
Inst-and-stalls are helped.
v2 (Iago):
- moved early return for naddrs > 2 even earlier.
- only update {add,mul}.b mux if instruction has more than one operand.
- don't OR b->raddr_{a,b} if we are not merging add/mul instructions.
- don't initialize packed to 0.
- minor style fixes.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9026 >
2021-02-16 11:46:31 +00:00
Michel Zou
6ccbb89207
meson: invalid keyword argument dependencies
...
Fixes: e4cc52c0 (vulkan: Add common extension tables)
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8821 >
2021-02-16 11:35:32 +00:00
Samuel Pitoiset
f502bdf1ab
radv: only apply the MRT output NaN fixup to non-meta shaders
...
We only want this workaround to be applied for game shaders.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4163
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/9048 >
2021-02-16 09:03:31 +01:00
Christian Gmeiner
309f9f565f
ci: Update baremetal kernel to 5.11 plus patches
...
For imx6 we need the following fec ethernet fix:
c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9046 >
2021-02-16 06:56:24 +00:00
Dave Airlie
98b6cd157a
lavapipe: add support for missing 10/10/10/2 formats.
...
The snorm formats don't work for blitting, so don't expose
them for that.
This passes all CTS tests that it enables.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8907 >
2021-02-16 05:31:11 +00:00
Dave Airlie
1797e4ebc5
lavapipe: add support for 2/10/10/10 scaled formats.
...
These will be used for zink CI testing.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8907 >
2021-02-16 05:31:11 +00:00
Dave Airlie
4326c5460d
llvmpipe: don't support scaled formats outside vertex buffers
...
Scaled formats are usually only needed as vertex buffer formats,
don't expose them as supported for other things.
Lavapipe will use this to export the correct formats support.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8907 >
2021-02-16 05:31:11 +00:00
Dave Airlie
8258726d90
util/format: add helper to check if a format is scaled.
...
lavapipe/llvmpipe need this to rule out scaled formats for non-vertex
format usage. Note NONE is defined as scaled in u_format, but for
the purposes of this helper I don't want it to be considered scaled.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8907 >
2021-02-16 05:31:11 +00:00
Mike Blumenkrantz
2b6d59bd8c
zink: support nir_intrinsic_group_memory_barrier
...
needed for cts
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9073 >
2021-02-15 22:38:06 -05:00
Mike Blumenkrantz
a14610281a
features: mark off GL 4.6 and ES 3.1 for zink
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:30 +00:00
Mike Blumenkrantz
0960938d86
zink: GLSL 460
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:30 +00:00
Mike Blumenkrantz
efc219f1c4
zink: PIPE_CAP_GL_SPIRV
...
still needs a bunch of fixing, but 75% of tests pass
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:29 +00:00
Mike Blumenkrantz
cb5957e13d
zink: enable pipeline statistics cap
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:29 +00:00
Mike Blumenkrantz
5a4f5d1bb5
zink: enable PIPE_CAP_QUERY_SO_OVERFLOW
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:29 +00:00
Mike Blumenkrantz
3d7d55c2cf
zink: enable PIPE_CAP_POLYGON_OFFSET_CLAMP
...
this is already handled
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:29 +00:00
Mike Blumenkrantz
670b79ffd5
zink: enable PIPE_CAP_DRAW_PARAMETERS
...
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:29 +00:00
Mike Blumenkrantz
75baabf9fb
zink: enable PIPE_CAP_TGSI_VOTE
...
ARB_shader_group_vote
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9072 >
2021-02-16 01:16:29 +00:00
Mike Blumenkrantz
759a71b67d
zink: add util function for submitting the compute batch
...
sometimes we just want to submit this and not wait on it
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9063 >
2021-02-16 01:05:07 +00:00
Mike Blumenkrantz
f1bc95bfa5
zink: rewrite drawid based on shader key value
...
same as basevertex
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
7fad9d647a
zink: break out push constant creation in compiler and add drawid value
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
a0911f825d
zink: add a vs shader key for rewriting gl_DrawID
...
if we get a direct draw, we have to rewrite the drawid for it to work as expected
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
165a940fc2
zink: add a draw_id param to vs push constants
...
gallium always gives us multidraws as individual draws, so we need to feed
this through to the shader
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
55abc1202c
zink: wrap shader gl_BaseVertex access with a bcsel based on push constant state
...
vulkan has different mechanics than gl for this variable based on whether the
current draw is indexed, so we need to rewrite the access here for that case
this also requires that we add some padding to the tcs shader injection to
account for new members being added to the push constant
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
bf4fac51ee
zink: add push constant value to indicate whether the current draw is indexed
...
due to semantic differences between gl and vk variables, this is going to be
necessary for gl_BaseVertex
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
59aae6db9f
zink: rework tcs injection to be more compatible with new push const struct
...
we can simplify the push constant loader to directly take the struct member
index here and then pass that directly to simplify things for future use
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
00642ab6ed
zink: create a struct for tracking push constant layout
...
it'll be helpful to update this as we add more values here so we can
avoid having to update all the users
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
c28bc38f94
zink: add handling for ARB_shader_draw_parameters variables in ntv
...
* gl_DrawID
* gl_BaseVertex
* gl_BaseInstance (was already semi-handled)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8971 >
2021-02-16 00:52:32 +00:00
Mike Blumenkrantz
8300bc1f16
zink: handle 1bit undef values in ntv
...
spirv requires that 1bit values be bool types, not uints
Fixes: 93af00502e ("zink: use uvec for undefs")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9059 >
2021-02-15 21:17:07 +00:00
Mike Blumenkrantz
e3428419fb
zink: fix slot mapping for legacy gl io with tess stages
...
e.g., gl_BackColor is a thing
Fixes: aec03553e1 ("zink: fix tess shader i/o variables")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9019 >
2021-02-15 20:47:14 +00:00
Mike Blumenkrantz
2b6950c3fd
zink: add support for pipeline statistics queries
...
so easy!
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9010 >
2021-02-15 20:37:22 +00:00
Mike Blumenkrantz
ff0233353a
zink: hook up cs invocation queries to the compute batch
...
compute batches are separate, so we have to run these queries on the
appropriate batch to see the expected results
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9010 >
2021-02-15 20:37:22 +00:00
Mike Blumenkrantz
942ba4e341
zink: unset generated TCS if its parent TESS is unset
...
ensure this doesn't get pulled in during the next program update
Fixes: 334759d850 ("zink: implement passthrough tcs shader injection")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9057 >
2021-02-15 20:03:23 +00:00
Daniel Schürmann
fc6b5be666
aco: fix assertion in insert_exec_mask pass
...
Fixes: a56ddca4e8 ('aco: make all exec accesses non-temporaries ')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9047 >
2021-02-15 19:50:16 +00:00
Rhys Perry
ddce1ec5f5
aco: fix transition_to_{WQM,Exact} if exec.back() is not in exec
...
This can happen at merge blocks.
fossil-db (GFX10.3):
Totals from 25229 (17.25% of 146267) affected shaders:
CodeSize: 58575920 -> 58571376 (-0.01%); split: -0.01%, +0.00%
Instrs: 10979245 -> 10978109 (-0.01%); split: -0.01%, +0.00%
SClause: 591817 -> 591816 (-0.00%)
Copies: 604987 -> 603851 (-0.19%); split: -0.19%, +0.00%
Cycles: 96088796 -> 96084252 (-0.00%); split: -0.00%, +0.00%
VMEM: 10470372 -> 10470368 (-0.00%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: a56ddca4e8 ("aco: make all exec accesses non-temporaries")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4299
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9047 >
2021-02-15 19:50:16 +00:00
Marek Olšák
f0d17aa88c
mesa: add debug code to catch missing _mesa_update_valid_to_render_state calls
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
743b912f9d
mesa: inline draw validate functions
...
This just moves the functions to draw.c.
Our CPU overhead is so low now that this increases performance by a few %.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
de2f0b7ce3
mesa: inline _mesa_set_draw_vao and set_varying_vp_inputs for draw calls
...
This just moves the functions to draw.c. It's inlined because the function
name disappears in the profiler. It improves performance.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
7079190149
mesa: gather errors and call _mesa_error only once in validate_Draw
...
This mainly skips all the jumping around various _mesa_error calls that
are never taken. There is a tiny measurable improvement in CPU overhead.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
37beefe601
mesa: precompute draw time determination of enabled vertex arrays
...
Another draw time optimization that precomputes the value only when
_VPMode is changed.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
306f1ef417
mesa: precompute _mesa_get_vao_vp_inputs
...
It's called for every draw, so this is important.
All inputs of _mesa_get_vao_vp_inputs are changed when
update_attribute_map_mode is called, so we can just compute
the value there.
The assertion ensures correct behavior in debug builds.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
40b8838a5a
mesa: set _DrawVAOEnabledAttribs only when it changes
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
ba29044fba
mesa: move gl_context::varying_vp_inputs into ctx->VertexProgram._VaryingInputs
...
This is where it belongs.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
99e25d183d
mesa: optimize set_varying_vp_inputs by precomputing the conditions
...
set_varying_vp_inputs is called every draw call, which checks
_Maintain*Program. Let's move that checking out of there.
This adds a new flag that determines whether set_varying_vp_inputs
should do anything.
All code that changes _Maintain*Program must now reinitialize the new
flag. This is done by new function _mesa_reset_vertex_processing_mode.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
4cea48437d
mesa: validate numInstances in common functions to unify code
...
Just a cleanup.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
3f64f3338a
mesa: move disallowed TFB in DrawElements on GLES from draws to state changes
...
glDrawElements is disallowed by GLES when transform feedback is active
and GS is not supported.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
1488d0a9b1
mesa: add a separate valid primitive mask just for glDrawElements
...
No change in behavior.
This will be used for draw validation required by glDrawElements but not
glDrawArrays.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
820dec3f7c
mesa: don't skip draws with count == 0 or numInstances == 0
...
These are checked by drivers (all gallium drivers and
_mesa_draw_gallium_fallback), so they are redundant here.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
4975a89f38
mesa: skip MultiDrawArrays with primcount == 0
...
This is the only zero parameter that gallium can't handle.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
9bd4755410
mesa: remove an optional GL error about mapped buffers during execution
...
Not having this here, even if the branch is not taken, increases
CPU performance by 2% on radeonsi. If some drivers need this, the spec
does allow GL termination, meaning abort(), which is a more effective
alternative given that this never happens.
You may ask, do we really pay a 2% performance hit for every conditional
not taken? For some of them, we do.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
7794305f0d
mesa: call _mesa_update_state() before validation
...
It's called in both the no_error path and the draw validation path, so we
might as well call it before the no_error conditional.
This decreases CPU overhead a lot, which I'm unable to explain. It seems
to be random gcc behavior, which I've seen quite a lot now.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
6daa113c39
mesa: remove optional draw validation code to increase performance
...
Some drivers do similar validation in their draw calls.
If drivers need some of this, we can do it in the drivers or even in
_mesa_draw_gallium_fallback for classic drivers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
0551290298
mesa: remove VERBOSE_DRAW
...
Let's declutter the code.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
9ee052eb73
mesa: optimize the dual source blend error checking using a bitmask
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
ad057b7f60
mesa: inline _mesa_valid_to_render now that it doesn't do validation
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
bf9d61a3d4
mesa: move blending validation from draws to state changes
...
This is a step towards removing _mesa_valid_to_render.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
40341c5118
mesa: move GL_FILL_RECTANGLE validation from draws to state changes
...
This is a step towards removing _mesa_valid_to_render.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
a22e719661
mesa: move ARB program and integer FBO validation from draws to state changes
...
This is a step towards removing _mesa_valid_to_render.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
7c35ec4d2f
mesa: move FBO completeness checking from draws to state changes
...
_mesa_update_framebuffer_visual already calls _mesa_update_valid_to_render-
_state, so we just need to call it where FBOs are marked incomplete.
This is a step towards removing _mesa_valid_to_render.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
8e747d9af0
mesa: move some uniform debug code from draws to state changes
...
This is a step towards removing _mesa_valid_to_render.
I don't know what this code does. This commit probably breaks it, but it
doesn't seem important. We could remove the code.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
ba10295bf8
mesa: move sampler uniform validation from draws to state changes
...
This is a step towards removing _mesa_valid_to_render.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
d9c611d671
mesa: move shader pipeline validation from draws to state changes
...
This is a step towards removing _mesa_valid_to_render.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
d45043d3b8
mesa: don't report 1 for GL_VALIDATE_STATUS if user didn't validate pipeline
...
dEQP expects GL_VALIDATE_STATUS to be set to 0 if the user didn't call
glValidateProgramPipeline even if the pipeline is valid, but we will
validate pipeline objects in state changes, not draw calls.
This will fix a failure in this test caused by the next commit:
dEQP-GLES31.functional.state_query.program_pipeline.validate_status_get_program_pipelineiv
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
b6e84f56f7
mesa: add skeleton code for DrawPixels/CopyPixels/Bitmap precomputed validation
...
This is for precomputing draw time validation in state changes.
The next commit will use this.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
c24a03d035
mesa: inline check_valid_to_render
...
because it has only one use.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
dfd1080f9d
mesa: fold most of check_valid_to_render into _mesa_update_valid_to_render_state
...
Set the mask (ValidPrimMask) to 0 if draw calls should generate
GL_INVALID_OPERATION. The mask is updated when states are changed.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
12ecbd6bf8
mesa: move check_valid_to_render call into _mesa_valid_prim_mode
...
It's going to be mostly eliminated by ValidPrimMask, so let's put them
together.
This also enables check_valid_to_render for glBegin, which seems to have
been omitted accidentally.
_mesa_valid_to_render is now always called by _mesa_valid_prim_mode.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
4be5fc2916
mesa: precompute draw time prim validation during state changes
...
This moves the body of _mesa_valid_prim_mode into new function
_mesa_update_valid_to_render_state, which is called when the affected
states are changed and sets new variable gl_context::ValidPrimMask,
which determines errors reported by draw calls.
_mesa_valid_prim_mode only has to check ValidPrimMask and choose
between GL_INVALID_ENUM and GL_INVALID_OPERATION depending on whether
the primitive would be allowed by the GL version and extensions
(GL_INVALID_OPERATION) or not (GL_INVALID_ENUM).
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
f6913fb366
mesa: precompute all valid primitive types at context creation
...
New variable gl_context::MaxValidPrimMask is set at context creation
and determines the valid primitive types for that context.
The Max prefix indicates that the mask doesn't mask out primitives
disallowed by current states and shaders.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Marek Olšák
fc78429523
mesa: optimize draw index type checking
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798 >
2021-02-15 19:29:09 +00:00
Eric Anholt
eabee821e9
freedreno: Add missing dep on freedreno tracepoints.
...
We were only get guaranteed that libfreedreno (and thus the tracepoints
generation) was ready when we linked, not when we compiled the gmemtool.c
that also used it.
Fixes: a02dcb970f ("freedreno: Add GPU tracepoints")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9056 >
2021-02-15 19:14:21 +00:00
Lionel Landwerlin
3414d4fdc5
vulkan: document flags choice for vkGetDeviceQueue
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9053 >
2021-02-15 21:01:28 +02:00
Juan A. Suarez Romero
d8236e32de
ci/v3d: Add V3D and V3DV testing
...
Add OpenGL and Vulkan testing for V3D and V3DV respectively.
Add also a couple of manual piglit jobs for V3D.
v2:
- Replace custom mustpass with running fraction of tests (Eric)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8745 >
2021-02-15 15:47:31 +00:00
Juan A. Suarez Romero
5d0c96a8c2
ci: add option to overwrite CPU arch
...
When loading Vulkan ICD file, it uses the CPU machine identifier to
load the correct one, in case multiple versions are installed.
This is fine if the machine where Mesa has been built and the machine
where the test is run are exactly the same. But this is not always the
case. As example, for armhf architecture, the machine where Mesa is
built is identified as `arm7hlf`, but the Raspberry Pi 4 is identified
as `armv7l`, so it will fail to load the ICD file, though both are
totally compatible.
This allow to define the architecture instead.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8745 >
2021-02-15 15:47:31 +00:00
Rhys Perry
3d4c13f3b8
aco: add DeviceInfo
...
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/8761 >
2021-02-15 13:44:22 +00:00
Rhys Perry
b759557cac
aco: consider that GFX10.3 allocates LDS in 1024 byte blocks
...
fossil-db (GFX10.3):
Totals from 3 (0.00% of 139391) affected shaders:
VMEM: 513 -> 511 (-0.39%)
SMEM: 94 -> 92 (-2.13%)
VClause: 31 -> 30 (-3.23%)
fossil-db (GFX10.3, wave32):
Totals from 4 (0.00% of 139391) affected shaders:
VClause: 82 -> 81 (-1.22%)
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/8761 >
2021-02-15 13:35:38 +00:00
Rhys Perry
7ff805a19d
radv,aco: add radv_nir_compiler_options::wgp_mode
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8761 >
2021-02-15 13:35:36 +00:00
Rhys Perry
f520f4c299
aco: add Program::wgp_mode
...
Instead of assuming WGP mode on GFX10+ in different places, add a member
to Program that can be used instead.
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/8761 >
2021-02-15 13:35:14 +00:00
Rhys Perry
592d64611c
aco: fix waves calculation for wave32
...
fossil-db (GFX10.3, wave32):
Totals from 176 (0.13% of 139391) affected shaders:
SGPRs: 16648 -> 16640 (-0.05%)
VGPRs: 18920 -> 19076 (+0.82%); split: -0.30%, +1.12%
CodeSize: 2354172 -> 2354288 (+0.00%); split: -0.01%, +0.01%
MaxWaves: 1618 -> 1627 (+0.56%); split: +0.68%, -0.12%
Instrs: 435756 -> 435761 (+0.00%); split: -0.02%, +0.02%
Cycles: 8858360 -> 8869960 (+0.13%); split: -0.01%, +0.14%
VMEM: 55899 -> 57220 (+2.36%); split: +2.53%, -0.17%
SMEM: 10323 -> 10374 (+0.49%); split: +0.73%, -0.23%
VClause: 8307 -> 8290 (-0.20%); split: -0.24%, +0.04%
SClause: 16573 -> 16577 (+0.02%); split: -0.01%, +0.03%
Copies: 24641 -> 24652 (+0.04%); split: -0.24%, +0.28%
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/8761 >
2021-02-15 13:35:13 +00:00
Rhys Perry
6a770cae4b
radv: round up max_lds_per_simd / lds_per_wave
...
If each SIMD has to get an different number of waves, report the maximum.
One example of a situation is when a single-wave workgroup uses more than
max_lds_per_simd. This change causes radv_get_max_waves() to report a
single wave per SIMD instead of none.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8761 >
2021-02-15 13:34:30 +00:00
Rhys Perry
267d7074d9
radv: use lds_{encode,alloc}_granularity
...
This fixes a issue in radv_get_max_waves() where it aligned the LDS
allocation to 512 bytes instead of 1024 on GFX10.3.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8761 >
2021-02-15 13:34:30 +00:00
Rhys Perry
aa53335135
ac: split lds_granularity into encode and allocation granularities
...
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/8761 >
2021-02-15 13:34:30 +00:00
Rhys Perry
df61444ac4
radv: switch MaxWaves statistic to wave32 waves
...
Always return the wave32 waves instead of wave64 waves because the wave32
wave count is more precise in the case of wave32.
This also fixes usage of lds_per_wave in wave32.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8761 >
2021-02-15 13:34:30 +00:00
Rhys Perry
43108824ec
radv: fix max_lds_per_simd on GFX10
...
num_simd_per_compute_unit was the number of SIMDs per compute unit, but
lds_size_per_workgroup was the bytes of LDS per WGP.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8761 >
2021-02-15 13:34:30 +00:00
Juan A. Suarez Romero
0face691b1
ci: Bump deqp to current vulkan-cts-1.2.5.1
...
This new version contains several fixes.
v2:
- Bump lava kernel+rootfs tag (Eric)
v3:
- Drop {x86,arm}_test-base tag bumps (Michel)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8990 >
2021-02-15 11:47:28 +00:00
Marcin Ślusarz
65d52aef82
intel/dump_gpu: mark bo as unmapped if its address changes
...
Fixes crash in ppgtt_lookup when the same bo is used twice
with different offsets.
It's possible to hit this with i965 and always_flush_batch=true.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9008 >
2021-02-15 11:40:58 +00:00
Marcin Ślusarz
5da10cefe2
intel/tools/aub: remove superfluous new line from error messages
...
This function is used as a callback and the other instance
of this callback doesn't add its own new line.
Messages printed by this function already end with a new line.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8988 >
2021-02-15 11:35:23 +00:00
Marcin Ślusarz
aeae177198
intel/tools/aub: handle truncated input file
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8988 >
2021-02-15 11:35:23 +00:00
Marcin Ślusarz
0893f6f03f
intel/tools/aub: print better error message when mmap fails
...
Aubinator creates lots of 4k mappings, so for large traces it's
possible to hit system limit on the number of mappings created
by a single process.
Ideally, aubinator should merge those mappings, but that's tricky
and I'm not sure it's worth spending time on.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8988 >
2021-02-15 11:35:23 +00:00
Boris Brezillon
93824b6451
panfrost: Move the blend logic out of the gallium driver
...
Most of it is API-independent, so let's move it out of the gallium
driver so it can be shared with the Vulkan driver.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
37974bcd26
panfrost: Move the blend lowering code out of the gallium driver
...
Will be used by the pan_blend library.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
334c96fa37
panfrost: Rename pan_blend.h into pan_blend_cso.h
...
We are about to add a pan_blend.h in src/panfrost/lib. Rename the
existing pan_blend.h so we can include both.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
c21c6d134b
panfrost: Use the pan_shader_prepare_rsd() helper
...
This implies late preparation of the fragment shader RSD, but given the
simplicity of pan_shader_prepare_rsd() (it's basically a 1:1 translation
between shader info and the RSD fields), it's unlikely to make a
difference. If we really want to optimize the time spent preparing the
RSD, we should consider caching a packed version at the batch level and
re-using it when nothing changed.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
ec51b841a7
panfrost: Provide a helper to prepare the shader related parts of an RSD
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
d5b1a33460
panfrost: Move the shader compilation logic out of the gallium driver
...
While at it, rework the code to avoid copies between intermediate
structures: the pan_shader_info is passed to the compiler context so
the compiler can fill shader information directly.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
d18fc89066
panfrost: Keep the compiler inputs in the context
...
So we don't have to copy data around.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
72d14f8b6f
panfrost: Move sysval_to_id out of panfrost_sysvals
...
So we can re-use the panfrost_sysvals definition outside of the
compiler without dragging the sysval_to_id hash table.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
8d7eda9c95
panfrost: Prefix shader related helpers with pan_shader_
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
10d9c4e574
panfrost: Hide backend compiler internals
...
Move panfrost_compile_shader() and panfrost_get_shader_options() to
pan_shader.c and drop the {bifrost,midgard}_compile.h include so backend
compiler internals are not directly exposed to the gallium driver.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Boris Brezillon
678f44447b
panfrost: Use panfrost_get_shader_options() in panfrost_build_blit_shader()
...
We should use Bifrost NIR options when compiling for Bifrost.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8963 >
2021-02-15 11:23:46 +00:00
Marek Olšák
4340f9cf74
amd: update addrlib
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8896 >
2021-02-15 09:15:10 +00:00
Bas Nieuwenhuizen
a740318e42
radv: Properly handle modifier import failure.
...
The layout code can fail now in the non-delayed case with modifiers.
Fixes: 7f7da82dbb ("radv: Add image layout with drm format modifiers.")
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9012 >
2021-02-13 22:00:39 +00:00
Bas Nieuwenhuizen
8a61f31160
radv: Remove vk_format_has_stencil/depth helpers.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:17 +00:00
Bas Nieuwenhuizen
fa26c09fb0
radv: Remove the format table.
...
Kill some code!
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:17 +00:00
Bas Nieuwenhuizen
d9d9acd3ea
radv: Start using util_format_description for everything.
...
Steps:
git reset --hard
sed -i 's/struct vk_format_description \*/struct util_format_description \*/g' *.{c,h}
sed -i 's/VK_FORMAT_COLORSPACE/UTIL_FORMAT_COLORSPACE/g' *.c
sed -i 's/= VK_FORMAT_COLORSPACE/= UTIL_FORMAT_COLORSPACE/g' *.h
sed -i 's/enum vk_format_colorspace /enum util_format_colorspace /g' *.h
sed -i 's/VK_FORMAT_TYPE/UTIL_FORMAT_TYPE/g' *.c
sed -i 's/VK_FORMAT_LAYOUT/UTIL_FORMAT_LAYOUT/g' *.c
sed -i 's/vk_format_channel_description/util_format_channel_description/g' *.c
sed -i 's/vk_format_description(/vk_format_description_legacy(/g' *.py
sed -i 's/const struct vk_format_description \*/static const struct vk_format_description \*/g' *.py
Then manually:
1) Rename the vk_format_colorspace definition back (only want the uses renamed)
2) Fix the desc->format == VK_FORMAT_... warnings
3) Add vk_format_description implementation (and remove warning pragmas)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:17 +00:00
Bas Nieuwenhuizen
72f4cf530f
radv: Only support format with a PIPE_FORMAT.
...
Otherwise non-supported format will be mapped to PIPE_FORMAT_NONE and
as such get a non-NULL description.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
6515a63410
radv: Stop using plane_count.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
7a4fb0ab73
radv: Stop checking for MULTIPLANE layout.
...
It is not a single layout in the util code.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
9fff372c75
radv: Do not use generated table for plane formats.
...
I want to remove the table and this is a fairly small amount of code.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
7cf8c4f683
radv: Do no use vk_format for getting divisors.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
abb2b43c9c
radv: Remove VK_SWIZZLE_*.
...
Values are the same as PIPE_SWIZZLE_*.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
47a380f47c
radv: Use u_format helpers when possible.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
34a1c64d08
radv: Add plane width/height helpers.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen
b71406dda1
radv: Determine swizzles correctly.
...
Previously we were calculating the inverse swizzle instead and doing something
horrible to get 0/1 right, and then "fixing" our table.
Let's do it right an align with the mesa-wide table.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797 >
2021-02-13 21:47:16 +00:00
Hoe Hao Cheng
a5685e4dd0
zink: fix detection of KHR_maintenance1/2
...
Since some extensions never got their dedicated feature structs, not all
extensions promoted to core Vulkan have the relevant feature bits in
`VkPhysicalDeviceVulkanXYFeatures`. Those extensions are supported by
the device when the device version is high enough.
For those extensions, set the screen flags directly if the device
version is sufficient, otherwise check for the extension as usual.
Fixes: efe6f00e ("zink/codegen: do not enable extensions that are now core")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9030 >
2021-02-13 19:03:45 +00:00
Erico Nunes
83eebadf92
lima: implement GL_EXT_texture_swizzle
...
This is a desktop OpenGL 2.1 extension that seems to be required by
glamor to support glyph rendering acceleration with R8 textures.
Implementation borrowed from vc4.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8969 >
2021-02-13 18:57:43 +00:00
Vinson Lee
628ce5472c
r600/sfn: Initialize FragmentShaderFromNir member m_pos_input.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member m_pos_input is not
initialized in this constructor nor in any functions that it
calls.
Fixes: 374bc76706 ("r600/sfn: Add the position input as varying")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9004 >
2021-02-12 22:31:06 -08:00
Marek Olšák
0408279e8c
radeonsi: add debug options nodisplaytiling and nodisplaydcc
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
61fd8fc10b
radeonsi: skip s_sendmsg(gs_alloc_req) for NGG passthrough on new chips
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
d151fcf719
amd: sort chip enums based on hw revision
...
A future commit will depend on this.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
29ca71e10e
ac/gpu_info: conceal L2 cache sizes
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
16cf791861
ac/gpu_info: inline get_l2_cache_size and set cache sizes farther down
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
bec7b7d528
ac/gpu_info: remove redundant radeon_info::num_sdp_interfaces
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
dcb6ab84e6
ac/gpu_info: add radeon_info::num_tcc_blocks
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
4ccf664f05
ac/gpu_info: rename num_tcc_blocks -> max_tcc_blocks
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
7099513380
ac/gpu_info: print use_late_alloc
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892 >
2021-02-13 04:56:05 +00:00
Marek Olšák
8481a3414f
winsys/amdgpu: disallow pb_cache for backing buffers of sparse buffers
...
because amdgpu_bo_wait doesn't wait for active CS jobs using the buffers.
This fixes incorrect buffer reuse of busy buffers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8895 >
2021-02-12 23:39:11 -05:00
Caio Marcelo de Oliveira Filho
a36d5bf11b
compiler: Drop now unused gl_varying_slot_name()
...
There's reuse of values depending on the stage, so a function that
just takes the value might produce invalid results. All the codebase
was already changed to use the gl_varying_slot_name_for_stage()
instead.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998 >
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho
b5716cadc5
st/atifs: Use gl_varying_slot_name_for_stage()
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998 >
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho
0589bd46c8
etnaviv: Use gl_varying_slot_name_for_stage()
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998 >
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho
e4e962cbe0
freedreno/ir3: Use gl_varying_slot_name_for_stage()
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998 >
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho
9da54b9252
intel/compiler: Use gl_varying_slot_name_for_stage()
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998 >
2021-02-13 00:44:53 +00:00
Mike Blumenkrantz
3fc8da13f6
zink: flag exact alu op results in ntv with NoContraction
...
this propagates the exact flag and ensures precision isn't lost during
optimizations
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8660 >
2021-02-12 23:25:40 +00:00
Daniel Schürmann
8b793f9567
aco: remove dead code for the handling of exec temporaries
...
Totals from 26026 (18.67% of 139391) affected shaders (Navi10):
PreSGPRs: 370993 -> 326177 (-12.08%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870 >
2021-02-12 22:41:31 +00:00
Daniel Schürmann
a56ddca4e8
aco: make all exec accesses non-temporaries
...
So that they are not counted into the register demand.
Totals from 107336 (77.00% of 139391) affected shaders (Navi10):
VGPRs: 4023452 -> 4023248 (-0.01%); split: -0.01%, +0.01%
SpillSGPRs: 14088 -> 12571 (-10.77%); split: -11.03%, +0.26%
CodeSize: 266816164 -> 266765528 (-0.02%); split: -0.04%, +0.02%
MaxWaves: 1553339 -> 1553374 (+0.00%); split: +0.00%, -0.00%
Instrs: 50977701 -> 50973093 (-0.01%); split: -0.02%, +0.01%
Cycles: 1733911128 -> 1733605320 (-0.02%); split: -0.05%, +0.03%
VMEM: 40867650 -> 40900204 (+0.08%); split: +0.13%, -0.05%
SMEM: 6835980 -> 6829073 (-0.10%); split: +0.10%, -0.20%
VClause: 1032783 -> 1032788 (+0.00%); split: -0.01%, +0.01%
SClause: 2103705 -> 2104115 (+0.02%); split: -0.09%, +0.11%
Copies: 3195658 -> 3193656 (-0.06%); split: -0.30%, +0.24%
Branches: 1140213 -> 1140120 (-0.01%); split: -0.05%, +0.04%
PreSGPRs: 3603785 -> 3437064 (-4.63%); split: -5.13%, +0.50%
PreVGPRs: 3321996 -> 3321850 (-0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870 >
2021-02-12 22:41:31 +00:00
Daniel Schürmann
5d7b3bf1a7
aco: handle non-temp phi definitions and operands
...
This will be necessary as we make exec non-temp.
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870 >
2021-02-12 22:41:31 +00:00
Daniel Schürmann
e663a15098
aco: don't create unnecessary exec phi on merge blocks
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870 >
2021-02-12 22:41:31 +00:00
Alejandro Piñeiro
3f614c6f7c
v3dv/meta_copy: get tlb compatible BC compressed formats for copies
...
So we can use the tlb path for several operations (copy image, clear,
copy buffer to image, etc).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929 >
2021-02-12 22:04:13 +00:00
Alejandro Piñeiro
6fdf375a90
v3dv/formats: expose support for BC1-3 compressed formats
...
Even though we can't expose textureCompressedBC as the hw doesn't
support all the formats, we can expose as supported individual
formats.
This gets several ~850 CTS tests going from skip to pass, with
patterns like:
* dEQP-VK.texture.compressed.bc*
* dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.2d*bc*
* dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.3d*bc*
* dEQP-VK.api.info.image_format_properties*bc*
* etc
v2: BC1-3 formats are texture filterable (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929 >
2021-02-12 22:04:13 +00:00
Alejandro Piñeiro
fcb229cbe0
v3dv/device: clarify that we can't expose textureCompressionBC
...
From spec:
"textureCompressionBC specifies whether all of the BC compressed
texture formats are supported. If this feature is enabled"
Note the *all*. v3d hw supports BC1, BC2, and BC3, but not BC4 through
BC7.
Let's clarify that we can't expose textureCompressionBC even if we
support some of them.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929 >
2021-02-12 22:04:13 +00:00
Alyssa Rosenzweig
643873a94f
docs/features: gl_HelperInvocation on Panfrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig
2f70317e0d
docs/features: Mark sample shading done on Panfrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig
2193d768bd
docs/features: Mark some ES3.1 done on Panfrost
...
These should be working on both Midgard and Bifrost now.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig
0308095af7
docs/features: Mark more TBO exts done on panfrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig
2e33dfafbe
panfrost: Advertise OES_standard_derivatives
...
Has been implemented for ages since it's part of ES3, but we missed the
CAP needed for the ES2 extension.
Closes : #4203
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig
f21e13301a
panfrost: Bump advertised ESSL feature level
...
Needed to run more dEQP tests.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig
ea289ee1db
panfrost: Bump max SSBO count
...
There's no actual architectural limit, this is totally arbitrary, but
fixes some NotSupported errors in dEQP-GLES31.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig
6bba718027
panfrost: Advertise SAMPLE_SHADING
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
9aede94711
panfrost: Assert on indirect compute shaders
...
This case was overlooked. Much simpler than indirect graphics calls, can
come as a follow on to the other indirect work.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
4b00d311e7
panfrost: Remove stale TODOs
...
The answer is no, we do not. Putting them in the primary batch allows
proper intermixing with graphics work. There's no harm for pure compute
loads, either.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
5d83442f8e
panfrost: Simplify bind_compute_state
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
856f0abd2b
pan/{mdg, bi}: Lower load_sample_pos
...
Conceptually same lowering as the DDK, although we're missing a number
of relevant compiler optimizations so the generated code is awful.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
00c1d5da34
pan/{mdg, bi}: Lower load_helper_invocation
...
Passes dEQP-GLES31.functional.shaders.helper_invocation.* on both
architectures
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
00df274586
pan/bi: Implement coverage mask updates
...
Impressive how simple this looks after dozens of patches of
sysval-related prepwork :)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
ae8b1fa7db
pan/bi: Decouple sysval loading from NIR
...
Useful for builder-based sysvals.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
1e7b5f3826
pan/bi: Implement nir_intrinsic_load_sample_positions_pan
...
Just copy the FAU result.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
ca0f50ec6a
pan/bi: Implement load_sample_mask_in
...
Preloaded.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
92569f5d6e
pan/bi: Fix gl_SampleID read
...
Fixes dEQP-GLES31.functional.shaders.sample_variables.sample_id.default_framebuffer
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
56240f6e85
pan/bi: Lower ifind_msb
...
We have ufind_msb efficient, implement in terms of that.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
ad06e0592a
pan/bi: Implement ufind_msb
...
Lowered to #(sz - 1) - clz(x), taking advantage of the machine's
8-bit and 16-bit variants of clz and the widening on the second argument
of ISUB to implement neatly in two instructions.
Note that in NIR, ufind_msb can take any integer type but always output
i32.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig
2ef97a079a
pan/bi: Implement bitfield_reverse
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:31 -05:00
Boris Brezillon
06d6dd1b40
pan/bi: Support bit_count()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Boris Brezillon
58e887f07e
pan/bi: Add uclz() support
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
72c6173a85
pan/bi: Lower bitfield inserts/extracts
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
b0551cb0c2
pan/bi: Implement texture gathers
...
Passes all of dEQP-GLES31.functional.texture.gather.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
ab9650d5aa
pan/bi: Remove redundant TEXC opcode check
...
Already checked in emit_tex
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
1079d7ccd6
pan/mdg: Lower stores from helpers
...
Required for correct behaviour of SSBOs in fragment shaders on Midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
3c44671df3
pan/mdg: Stub load_barycentric_sample
...
Now parity with Bifrost for not failing over these intrinsics.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
4a2f128985
pan/mdg: Lower ufind_msb, poorly
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
36248dd448
pan/mdg: Implement uclz
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
887e391447
pan/mdg: Rename bitcount8 to popcnt, fixing the unit
...
Still doesn't seem to work correctly for negative values.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
e55af16bfe
pan/mdg: Lower bitfield instructions
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
94b6d4e0ed
pan/mdg: Remove unused pack_unorm_4x8 lowering
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:30 -05:00
Alyssa Rosenzweig
954623856c
pan/mdg: Assert on bad 64-bit swizzle in disassembly
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
97a85c1071
panfrost: Add MULTISAMPLED sysval
...
To be used with Bifrost coverage mask updates.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
9f55657366
panfrost: Overhaul sysval handling
...
Don't preassign.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
4086b8980d
panfrost: Implement get_sample_position
...
Easy now that we have the table.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
b01df1f9bf
panfrost: Advertise MSAA 8x and 16x
...
On Bifrost. Could support Mali T760+ with additional debug.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
072cc5d5f1
panfrost: Ensure open_device has pandecode initialized
...
Requires reordering some calls.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
dd3bda22f4
panfrost: Use sample location LUT
...
Fixes multisampling issues on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
a61fb62966
panfrost: Upload sample positions on device init
...
Needed to correctly implement multisampling on Bifrost, and used in
gl_SamplePosition implementation on Midgard. These are architecturally
invariant, so it's fine to hard code.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
376c3fa4db
panfrost: Set sample count/pattern for tiler FBD
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
555c17e2c6
panfrost: Remove batch_is_scanout
...
Unused since last commit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
1a6fc40b99
panfrost: Remove PAN_REQ_DEPTH_WRITE
...
No consumers, garbage collect the whole thing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
37050ad62a
panfrost: Remove PAN_REQ_MSAA
...
Neglible win for draw time overhead.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
1439f8db12
panfrost: Don't use PAN_REQ_MSAA in SFBD
...
We can also generalize a bit to eliminate the state dependence.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
7b5aa5fbf2
panfrost: Don't set REQ_MSAA in pan_mfbd
...
No remaining consumer.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
ccce5b922f
panfrost: Generalize MSAA handling
...
This uses the framebuffer MSAA state directly and will generalize to
MSAA 8x/16x when somebody gets around to it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
bea7839c1e
panfrost: Set tiler descriptor sampler pattern
...
Bifrost requires this to match the framebuffer descriptor's sample
pattern, but we were leaving the default (single-sampled)
unconditionally, leading to undefined behaviour.
It is unknown if this fixes any user-visible bugs, but without the
commit the descriptor is likely out-of-spec.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Cc: 21.0 <mesa-stable@lists.freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
b08100fb96
panfrost: Add panfrost_sample_pattern helper
...
We always use rotated grids to preserve current behaviour.
Cc stable as it is required for the next commit. If deemed too invasive,
a simpler fix could be backported.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Cc: 21.0 <mesa-stable@lists.freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
b6ad375bdf
panfrost: Respect info.fs.uses_sample_shading
...
Now that this is a link-time property.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:29 -05:00
Alyssa Rosenzweig
55f8df6d36
panfrost: Refactor sample shading state
...
Moves the decision to evaluate per-sample to link time instead of
draw-time, with an explicit property. No functional change.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
56bf3086fc
panfrost: Push sample positions sysval for Midgard
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
beb7d66056
panfrost: Add sample positions sysval
...
For Midgard. On Bifrost, the hardware pushes this directly to FAU.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
f782983cfb
panfrost: Preload sample mask if needed
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
9d682ad7f9
pan/decode: Only print local storage for vertex jobs
...
It's convenient to group this with the framebuffer, but the other fields
are unused by the hardware for vertex jobs. They _are_ used for tiler
jobs.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
b27d0164ee
pan/decode: Cleanup sample locations decode
...
We know what this is now. I opted to leave it in ~fixed-point format to
avoid bikeshedding over precision.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Alyssa Rosenzweig
2afdcc187b
nir: Add sample_positions_pan intrinsic
...
Facilites the gl_SamplePosition lowering on Bifrost, where the sample
positions are accessed directly in a packed in-memory format.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774 >
2021-02-12 16:44:28 -05:00
Kenneth Graunke
e7dc48c309
iris: Make a pin_scratch_space() helper
...
We need to (re-)pin the scratch buffer in four different places, and
it's going to get slightly more complicated on future platforms. So,
make a helper function, allowing us to add the complexity in one spot.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9023 >
2021-02-12 21:14:26 +00:00
Hoe Hao Cheng
93ff47eb19
zink: enable KHR_shader_draw_parameters on Vulkan <1.2
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
efe6f00e34
zink/codegen: do not enable extensions that are now core
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
4deb58b9d8
zink/codegen: fix type annotations
...
mypy complains about this
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
4751135e57
zink/codegen: validate has_properties and has_features
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
613132c41f
zink/codegen: perform basic validation in zink_device_info
...
Check for existence of extension and its type
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
33d006f565
zink/codegen: make zink_device_info accept vk.xml
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
3d36bfd21f
zink/codegen: introduce notion of non-standard extensions
...
this is for the MoltenVK extensions, especially "VK_MVK_moltenvk", which
right now is reserved in the registry. Making it non-standard skips all
the validations.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
7489f5fc4d
zink/codegen: more validation in zink_instance
...
the MVK check is a workaround, since VK_MVK_moltenvk is not an official
VK extension per se - the next patch will introduce nonstandardness to
Extension.
Two new validations are added by this patch:
1. extension type (non-instance extensions are rejected)
2. existence of specified instance functions
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Hoe Hao Cheng
b64a9a12a4
zink/codegen: introduce ExtensionRegistry
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9021 >
2021-02-12 21:04:24 +00:00
Samuel Pitoiset
caa4a218f1
radv/winsys: set use_global_list inside the critical section
...
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/9006 >
2021-02-12 19:12:01 +00:00
Samuel Pitoiset
7379ca4043
radv: only make the WSI images resident if the global BO list is used
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4270
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4286
Fixes: 96b03aaa17 ("radv: use the global BO list from the winsys")
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/9006 >
2021-02-12 19:12:01 +00:00
Daniel Schürmann
44a76ba16d
aco: use VCC as regular SGPR pair on GFX10
...
There is no need to reserve it for special purposes, only.
Totals from 139391 (100.00% of 139391) affected shaders (Navi10):
VGPRs: 4738296 -> 4738156 (-0.00%); split: -0.01%, +0.00%
SpillSGPRs: 16188 -> 14968 (-7.54%); split: -7.60%, +0.06%
CodeSize: 294204472 -> 294118048 (-0.03%); split: -0.04%, +0.01%
MaxWaves: 2119584 -> 2119619 (+0.00%); split: +0.00%, -0.00%
Instrs: 56075079 -> 56056235 (-0.03%); split: -0.05%, +0.01%
Cycles: 1757781564 -> 1755354032 (-0.14%); split: -0.16%, +0.02%
VMEM: 52995887 -> 52996319 (+0.00%); split: +0.07%, -0.07%
SMEM: 9005338 -> 9004858 (-0.01%); split: +0.16%, -0.17%
VClause: 1178436 -> 1178331 (-0.01%); split: -0.02%, +0.01%
SClause: 2403649 -> 2404542 (+0.04%); split: -0.14%, +0.18%
Copies: 3447073 -> 3432417 (-0.43%); split: -0.66%, +0.23%
Branches: 1166542 -> 1166422 (-0.01%); split: -0.11%, +0.10%
PreSGPRs: 4229322 -> 4235538 (+0.15%)
PreVGPRs: 3817111 -> 3817040 (-0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Daniel Schürmann
112f389261
aco: don't abort() if disassembly fails
...
We used that to catch assembly errors in the past,
but now, there are too many hardware features we
use in ACO that are not supported by the LLVM disassembler,
that it is not really suited anymore as a debugging tool.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Daniel Schürmann
171fbe3ae1
aco: check get_reg_specified() on register hints
...
This ensures that max_used_sgpr is adjusted accordingly.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Daniel Schürmann
dd16e21e97
aco: also consider VCC in get_reg_specified()
...
This allows split_vector and others to keep their VCC position.
Totals from 4573 (3.28% of 139391) affected shaders (Navi10):
CodeSize: 54292268 -> 54289324 (-0.01%); split: -0.03%, +0.03%
Instrs: 10327645 -> 10326941 (-0.01%); split: -0.04%, +0.04%
Cycles: 744410748 -> 744034732 (-0.05%); split: -0.07%, +0.02%
VMEM: 749093 -> 749092 (-0.00%); split: +0.00%, -0.00%
SMEM: 269306 -> 269322 (+0.01%)
SClause: 358746 -> 358744 (-0.00%)
Copies: 826051 -> 823910 (-0.26%); split: -0.55%, +0.29%
Branches: 355074 -> 356493 (+0.40%); split: -0.01%, +0.41%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Daniel Schürmann
947bf0bd67
aco: don't decrease the vgpr_limit when encountering bpermute
...
Instead we recalculate vgpr_limit on demand, depending on
the number of needed shared VGPRs.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Daniel Schürmann
b98a4d4dd7
aco: refactor GPR limit calculation
...
This patch delays the calculation of GPR limits in order to
precisely incorporate extra registers (VCC etc.) and shared VGPRs.
Additionally, the allocation granularity is used to set the config.
This has some effect on the reported SGPR stats.
Totals (Navi10):
SGPRs: 6971787 -> 17753642 (+154.65%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Daniel Schürmann
eaf681724e
aco: change gpr_alloc_granule to full alignment
...
This also switches the alloc_granule of Tonga and Iceland
to 96, so that the calculation is consistent.
Also changes the granularity for RDNA to 16 to keep
better stats with the upcoming patch.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Daniel Schürmann
bacc3b36f5
aco: fix shared VGPR allocation on RDNA2
...
VGPRs are now allocated in blocks of 8 normal
or 16 shared VGPRs, respectively.
Fixes: 14a5021aff ('aco/gfx10: Refactor of GFX10 wave64 bpermute.')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8921 >
2021-02-12 19:00:18 +00:00
Hoe Hao Cheng
04df0cb4ae
zink: VK_KHR_draw_indirect_count is a device extension
...
this fixes some testcases on CI.
Fixes: 1c01ad1b80 ("zink: add KHR_draw_indirect_count detection")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8991 >
2021-02-12 18:27:25 +00:00
Samuel Pitoiset
335c8b68d2
radv: emit pipeline bind markers for SQTT
...
I suspect this marker to be useful for correlating pipeline shaders.
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/8995 >
2021-02-12 18:13:49 +00:00
Mike Blumenkrantz
8721a6cbf2
zink: fix streamout for tess stage
...
the tess shader needs to actually emit xfb stuff in order for it to work
Fixes: 2891e0b74e ("zink: pull xfb info from tess shader when applicable")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9013 >
2021-02-12 18:03:22 +00:00
Jesse Natalie
41e8dec75c
wgl: Disable automatic use of layered drivers with LIBGL_ALWAYS_SOFTWARE
...
Fixes: 8955980f ("gallium/targets/libgl-gdi: prefer d3d12 driver")
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8865 >
2021-02-12 17:00:38 +00:00
Jesse Natalie
2ddafc2676
d3d12: Fail screen creation if a shader validator is needed and can't be created
...
Also fail screen creation if experimental shader models are requested, but can't be enabled
Fixes: 2ea15cd6 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Bill Kristiansen <billkris@microsoft.com >
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4022
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8865 >
2021-02-12 17:00:38 +00:00
Jesse Natalie
f66b0c7303
wgl: Add a loop for screen creation with an ordered list of fallbacks
...
Fixes: 8955980f ("gallium/targets/libgl-gdi: prefer d3d12 driver")
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4022
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8865 >
2021-02-12 17:00:38 +00:00
Jesse Natalie
e6cf34d611
wgl: Refactor screen creation to a function
...
Fixes: 8955980f ("gallium/targets/libgl-gdi: prefer d3d12 driver")
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Tested-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4022
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8865 >
2021-02-12 17:00:37 +00:00
Alyssa Rosenzweig
9bf8bfe3c8
pan/bi: Fix empty shader handling
...
Fixes INSTR_INVALID_ENC fault on dEQP-GLES31.functional.compute.basic.empty
Fixes: bfcdc8f174 ("pan/bi: Add some zero bytes after shaders on Bifrost")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9011 >
2021-02-12 16:28:00 +00:00
Alyssa Rosenzweig
a805d999c0
pan/bi: Fix jumps to terminal block again
...
New scheduler broke this. We need to shuffle some code around so we do
the lower pre-schedule instead of post-schedule (no clauses to work
with).
Fixes: 77933d16d8 ("pan/bi: Switch to new scheduler")
Reported-by: Icecream95 <ixn@disroot.org >
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9011 >
2021-02-12 16:28:00 +00:00
Alyssa Rosenzweig
44c0672fd4
panfrost: Fake shader images for bifrost+deqp
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9011 >
2021-02-12 16:28:00 +00:00
Michel Dänzer
dee59ebfcd
ci: Disable scons-win64 job
...
It's failed for almost a month, so right now it's mostly noise and a
waste of CI resources.
It can easily be re-enabled by an MR which makes it pass again.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8976 >
2021-02-12 14:17:22 +00:00
Bas Nieuwenhuizen
045a85085a
radv: Ignore WC flags for VRAM.
...
Otherwise there might be buffers for which we don't have a type.
Fixes: 7262c743dc ("radv: Determine memory type for import based on fd.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4280
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8996 >
2021-02-12 14:04:56 +00:00
Mike Blumenkrantz
6827ff562c
zink: support SO_OVERFLOW pipe query types
...
this is really just not what we want to be doing. vulkan has no method for
doing on-gpu checks for xfb overflow, instead providing the info as two values
for the user to do with as they will, forcing us to gpu stall any time we
need to interact with these queries
for the ANY variant of the query, we need to create even more xfb query pools,
since we now need to be monitoring all available vertex streams for overflows
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8992 >
2021-02-12 13:12:29 +00:00
Mike Blumenkrantz
ea7cd847d3
zink: put SO_OVERFLOW queries on the primgen list
...
these need to know if xfb was active during the query
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8992 >
2021-02-12 13:12:29 +00:00
Mike Blumenkrantz
2c3ef8b392
zink: break out cpu query reading for qbos into separate function
...
we're going to need this more than once
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8992 >
2021-02-12 13:12:29 +00:00
Mike Blumenkrantz
a336a4453b
zink: make the xfb_query_pool into an array
...
we'll need to potentially be observing all streams to handle the
query types from ARB_transform_feedback_overflow_query
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8992 >
2021-02-12 13:12:29 +00:00
Mike Blumenkrantz
257a808357
zink: always use query->type for starting/stopping xfb queries
...
we're going to be seeing some overlap here
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8992 >
2021-02-12 13:12:29 +00:00
Alyssa Rosenzweig
accffda30d
pan/bi: Skip ATEST for colour blit shaders
...
Small win.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9002 >
2021-02-12 12:33:19 +00:00
Alyssa Rosenzweig
e279606232
panfrost: Pass is_blit flag around
...
There are blit shader specific optimizations available.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9002 >
2021-02-12 12:33:19 +00:00
Erik Faye-Lund
5159f406d8
zink: use gallium api to copy to display-target
...
This allows us to avoid us to avoid forcing linear and host-visible
display-targets.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8858 >
2021-02-12 11:24:50 +00:00
Erik Faye-Lund
1b8b14172f
zink: ignore irrelevant bind-flags
...
We don't need to create display-targets for shared or scanout, becuase
we never even see those in the sw-winsys case.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8858 >
2021-02-12 11:24:50 +00:00
Erik Faye-Lund
9d0ad591f9
zink: limit host-visible bind-flags
...
The only type that should really require to be host-visible is the
display-target, and that's just because of our silly flush_frontbuffer
implementation.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8858 >
2021-02-12 11:24:50 +00:00
Erik Faye-Lund
9fc179c774
zink: don't always require linear display-targets
...
We only need these display-targets to be linear in the case of a
software winsys. In the DRM case, they can be tiled without issues.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8858 >
2021-02-12 11:24:50 +00:00
Erik Faye-Lund
708327472b
zink: do not use extra staging resource unless needed
...
The reason we check for staging-resources here is really because they
are the only images guaranteed to be host-visible.
But on UMA architectures, it's quite likely to have memory that is
*both* host-visible *and* device-local, so let's see what we found
instead.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8858 >
2021-02-12 11:24:50 +00:00
Erik Faye-Lund
5e4ae3466b
zink: drop extra set of parens
...
We don't need to be doubly sure here, we can just use a single set of
parents instead.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8858 >
2021-02-12 11:24:50 +00:00
Erik Faye-Lund
a87d648597
ci: disable sporadically failing test
...
spec@arb_timer_query@timestamp-get seems to fail on D3D12 / Windows
every now and then. Until that's been figured out, let's disable the
test in CI.
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8978 >
2021-02-12 10:49:41 +00:00
Erik Faye-Lund
8e52b7b46d
lavapipe: handle null-buffers for xfb
...
The Vulkan spec says the following for vkCmdBeginTransformFeedbackEXT:
"For each element of pCounterBuffers that is VK_NULL_HANDLE, transform
feedback will start capturing vertex data to byte zero in the
corresponding bound transform feedback buffer."
While not quite as explicit, similar wording exists for
vkCmdEndTransformFeedbackEXT in "Valid Usage" section.
So, this means that we should handle NULL in this case, and simply
ignore the corresponding reads and writes.
This fixes a whole lot of crashes when using transform-feedback with
Zink.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8982 >
2021-02-12 11:33:27 +01:00
Giovanni Mascellani
72b8e643b0
anv: Allow null handle in DestroyDescriptorUpdateTemplate.
...
By the Vulkan specification, and similarly to many other Vulkan calls,
it is allowed to destroy a null descriptor update template.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Fixes: af5f13e58c ("anv: add VK_KHR_descriptor_update_template support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9005 >
2021-02-12 09:30:46 +00:00
Iago Toral Quiroga
82981ccbb1
broadcom/compiler: use unifa for UBO loads from uniform addresses
...
This basically processes UBO loads as uniform loads by writing
the load address to the unifa register and reading sequential
values with ldunifa.
This process is faster than going through the TMU, but we can only
use it when the address we are reading from is uniform across all
channels, since we are basically reading from the UBO address
as if it was a uniform stream.
This leads to better performance in the UE4 Shooter demo.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:22 +00:00
Iago Toral Quiroga
878555976e
broadcom/compiler: emit ldunifarf when needed
...
Just like ldunif and ldunifrf, ldunifa writes to the r5 accumulator
and ldunifarf writes to the register file.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
c2a04aca48
broadcom/compiler: do not DCE ldunifa
...
ldunifa reads a uniform from the unifa address and updates the unifa
address implicitly, so if we dead-code-eliminate one a follow-up
ldunifa will not read from the appropriate address.
We could avoid this if the compiler ensures that every ldunifa is
paired with an explicit unifa, so for example if we are reading a
vec4, we could emit:
unifa (addrr)
ldunifa
unifa (addr+4)
ldunifa
unifa (addr+8)
ldunifa
unifa (addr+12)
ldunifa
instead of:
unifa (addr)
ldunifa
ldunifa
ldunifa
ldunifa
But since each unifa has a 3 delay slot before we can do ldunifa,
that would end up being quite expensive.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
efc75e13ea
broadcom/compiler: disallow reading two uniforms in the same instruction
...
The simulator asserts on this, which can happen if we merge a ldunif
(or any other instruction that reads a uniform implicitly) and
ldunifa in the same instruction.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
e8e4bdae8d
broadcom/compiler: ensure 3-slot delay between unifa and ldunifa
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
42880fdf5d
broadcom/compiler: preserve ordering of unifa/ldunifa sequences
...
unifa writes the addresss from which follow-up ldunifa loads,
and each ldunifa increments the unifa addeess by 32-bit so the
loads need to be ordered too.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
97c078488f
broadcom/compiler: disallow unifa overlap with thread switch/end
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
24db1a5112
broadcom/compiler: add a helper to check if an instruction writes unifa
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
4b929ae9f0
broadcom/compiler: don't check for GFXH-1633 on V3D 4.2.x
...
This has been fixed since V3D 4.2.14 (Rpi4), which is the hardware
we are targetting. Our version resolution doesn't allow us to check
for 4.2 versions lower than .14, but that is okay because the
simulator would still validate this in any case.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
457ed5aa01
broadcom/compiler: name registers correctly based on V3D version
...
So we can differentiate between TMU for V3D 4.x and UNIFA for V3D 4.x,
which are aliased.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
f85fcaa494
broadcom/compiler: pass a devinfo to check if an instruction writes to TMU
...
V3D 3.x has V3D_QPU_WADDR_TMU which in V3D 4.x is V3D_QPU_WADDR_UNIFA
(which isn't a TMU write address). This change passes a devinfo to
any functions that need to do these checks so we can account for the
target V3D version correctly.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Iago Toral Quiroga
449af48f42
broadcom/compiler: add V3D_QPU_WADDR_UNIFA
...
This only exists in V3D 4.x and aliases V3D_QPU_WADDR_TMU from V3D 3.x.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8980 >
2021-02-12 08:24:21 +00:00
Giovanni Mascellani
c6731daa5e
disk_cache: Fail creation when cannot inizialize queue.
...
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Fixes: e2c4435b07 ("util/disk_cache: add thread queue to disk cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8983 >
2021-02-12 08:01:46 +00:00
Arcady Goldmints-Orlov
9909fe6bac
broadcom/compiler: Skip bool_to_cond where possible
...
This change keeps track of when a boolean temp is loaded into the flags
by a comparison instruction and uses that information to skip emitting
instructions to set the flags in ntq_emit_bool_to_cond when the flags
already have the right contents.
total instructions in shared programs: 11116502 -> 11112225 (-0.04%)
instructions in affected programs: 631691 -> 627414 (-0.68%)
helped: 1591
HURT: 754
helped stats (abs) min: 1 max: 94 x̄: 4.14 x̃: 3
helped stats (rel) min: 0.11% max: 13.46% x̄: 2.10% x̃: 1.58%
HURT stats (abs) min: 1 max: 19 x̄: 3.07 x̃: 2
HURT stats (rel) min: 0.13% max: 19.67% x̄: 1.88% x̃: 1.15%
95% mean confidence interval for instructions value: -2.02 -1.63
95% mean confidence interval for instructions %-change: -0.94% -0.71%
Instructions are helped.
total uniforms in shared programs: 3281555 -> 3281513 (<.01%)
uniforms in affected programs: 1754 -> 1712 (-2.39%)
helped: 10
HURT: 5
helped stats (abs) min: 1 max: 19 x̄: 7.90 x̃: 5
helped stats (rel) min: 0.56% max: 11.11% x̄: 7.37% x̃: 11.05%
HURT stats (abs) min: 1 max: 15 x̄: 7.40 x̃: 3
HURT stats (rel) min: 0.64% max: 9.55% x̄: 5.31% x̃: 3.41%
95% mean confidence interval for uniforms value: -8.57 2.97
95% mean confidence interval for uniforms %-change: -7.35% 1.07%
Inconclusive result (value mean confidence interval includes 0).
total max-temps in shared programs: 1758419 -> 1758174 (-0.01%)
max-temps in affected programs: 7006 -> 6761 (-3.50%)
helped: 290
HURT: 14
helped stats (abs) min: 1 max: 8 x̄: 1.13 x̃: 1
helped stats (rel) min: 0.79% max: 22.86% x̄: 6.61% x̃: 4.88%
HURT stats (abs) min: 1 max: 13 x̄: 6.00 x̃: 3
HURT stats (rel) min: 1.54% max: 54.17% x̄: 23.99% x̃: 9.12%
95% mean confidence interval for max-temps value: -1.03 -0.58
95% mean confidence interval for max-temps %-change: -6.24% -4.16%
Max-temps are helped.
total sfu-stalls in shared programs: 23676 -> 23610 (-0.28%)
sfu-stalls in affected programs: 1578 -> 1512 (-4.18%)
helped: 257
HURT: 252
helped stats (abs) min: 1 max: 3 x̄: 1.37 x̃: 1
helped stats (rel) min: 11.11% max: 100.00% x̄: 46.70% x̃: 40.00%
HURT stats (abs) min: 1 max: 2 x̄: 1.14 x̃: 1
HURT stats (rel) min: 0.00% max: 200.00% x̄: 41.65% x̃: 25.00%
95% mean confidence interval for sfu-stalls value: -0.25 -0.01
95% mean confidence interval for sfu-stalls %-change: -8.24% 2.33%
Inconclusive result (%-change mean confidence interval includes 0).
total inst-and-stalls in shared programs: 11140178 -> 11135835 (-0.04%)
inst-and-stalls in affected programs: 633972 -> 629629 (-0.69%)
helped: 1581
HURT: 755
helped stats (abs) min: 1 max: 94 x̄: 4.26 x̃: 3
helped stats (rel) min: 0.11% max: 13.46% x̄: 2.12% x̃: 1.59%
HURT stats (abs) min: 1 max: 17 x̄: 3.17 x̃: 2
HURT stats (rel) min: 0.05% max: 19.67% x̄: 1.93% x̃: 1.20%
95% mean confidence interval for inst-and-stalls value: -2.06 -1.66
95% mean confidence interval for inst-and-stalls %-change: -0.93% -0.70%
Inst-and-stalls are helped.
Reviewed-by: Iago Toral Quioroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8933 >
2021-02-12 07:05:33 +00:00
Arcady Goldmints-Orlov
8762f29e9c
broadcom/compiler: Add a v3d_compile argument to vir_set_[pu]f
...
Reviewed-by: Iago Toral Quioroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8933 >
2021-02-12 07:05:33 +00:00
Bas Nieuwenhuizen
c78b372dd0
radv: Define supported extensions in C.
...
One python generator less.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8900 >
2021-02-12 01:56:00 +00:00
Bas Nieuwenhuizen
8331b7c8d5
radv: Remove custom icd json generation.
...
No Android.mk changes as the radv provided json file isn't used.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8900 >
2021-02-12 01:56:00 +00:00
Alyssa Rosenzweig
2f44a76ab4
panfrost: Set barriers flag for compute shaders
...
Pipe in the info from NIR. Fix incorrect handling of helper invocations,
which also use the barrier flag.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6312 >
2021-02-12 01:37:05 +00:00
Alyssa Rosenzweig
9f934e922d
compiler, nir: Add and set barrier metadata
...
Useful for determining whether certain optimizations are legal for a
compute shader (e.g. optimizing workgroup size in the driver).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6312 >
2021-02-12 01:37:05 +00:00
Alyssa Rosenzweig
2bd2a03657
panfrost: Enable ES3 conformant floating-point
...
Don't suppress inf/nan. Triggers bugs in broken apps like glmark2 (fixed
upstream but traces don't have the fix yet), so update the trace
expectations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7550 >
2021-02-12 01:21:29 +00:00
Kenneth Graunke
dcf6247fcb
iris: Remove context from iris_disk_cache_retrieve
...
We don't use the context other than getting the screen and uploader.
Fixes: 84a38ec133 ("iris: Enable PIPE_CAP_SHAREABLE_SHADERS.")
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8922 >
2021-02-11 20:51:18 +00:00
Kenneth Graunke
b65680d59f
iris: Remove context from iris_create_uncompiled_shader
...
Nothing uses the context here, just the screen.
Fixes: 84a38ec133 ("iris: Enable PIPE_CAP_SHAREABLE_SHADERS.")
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8922 >
2021-02-11 20:51:18 +00:00
Kenneth Graunke
cee922940b
iris: Remove context from iris_compile_vs and friends
...
Instead, we pass the screen, an uploader, and a debug callback.
Fixes: 84a38ec133 ("iris: Enable PIPE_CAP_SHAREABLE_SHADERS.")
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8922 >
2021-02-11 20:51:18 +00:00
Kenneth Graunke
730ce52104
iris: Remove context from iris_upload_shader()
...
Shaders are now shared across contexts, so we'd like to avoid requiring
access to a full context. Instead, we pass the screen and an uploader
to use.
Fixes: 84a38ec133 ("iris: Enable PIPE_CAP_SHAREABLE_SHADERS.")
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8922 >
2021-02-11 20:51:18 +00:00
Kenneth Graunke
979434639e
iris: Remove context from iris_debug_recompile
...
This doesn't and shouldn't use the context. It just wants a debug
callback to print things on.
Fixes: 84a38ec133 ("iris: Enable PIPE_CAP_SHAREABLE_SHADERS.")
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8922 >
2021-02-11 20:51:18 +00:00
Kenneth Graunke
4256f7ed58
iris: Fill out scratch base address dynamically
...
Now that shaders are shared between contexts, we can't pre-bake the
shader scratch address into the derived 3DSTATE_XS packets. Scratch
buffers are and must be per-context, as multiple contexts could be
executing shaders using scratch at the same time.
So instead, we leave that field blank when pre-filling those packets
up-front, and merge in the actual address when emitting them. It's
a little more overhead, but only in the case where scratch is used.
Fixes: 84a38ec133 ("iris: Enable PIPE_CAP_SHAREABLE_SHADERS.")
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8922 >
2021-02-11 20:51:18 +00:00
Mike Blumenkrantz
564a9e18a7
zink: lower flrp64 and ffma64 when in softfp64 mode
...
fixes a bunch of crashes
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8986 >
2021-02-11 20:22:54 +00:00
Mike Blumenkrantz
a64fe5ae5b
zink: add spirv interfaces for bo and image/sampler/push variables
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8985 >
2021-02-11 20:11:18 +00:00
Jordan Justen
89580073f3
anv: Add ANV_QUEUE_OVERRIDE env-var to override advertised queues
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8771 >
2021-02-11 19:58:23 +00:00
Jason Ekstrand
1326e1c0fe
anv: Add fake graphics-only and compute-only queue families
...
Rework:
* Jordan: Add graphics-only queue
* Jordan: Bump ANV_MAX_QUEUE_FAMILIES and add related asserts
* Jordan: Fix queueCount on compute-only family
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8771 >
2021-02-11 19:58:23 +00:00
Erik Faye-Lund
2a90420bbe
ci: enable max texture size tests for zink
...
I cargo-culted these from the llvmpipe tests, but they seem to pass and
not take much time or memory at all, so let's try enabling them. If this
works fine, we might want to try the same for llvmpipe as well...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8979 >
2021-02-11 14:29:42 -05:00
Michel Zou
664a803879
vulkan: Fix windows api conflict
...
It must be undefined in the header too
Fixes: e487ae1b
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8975 >
2021-02-11 17:56:27 +00:00
Alyssa Rosenzweig
a27d76a2d9
pan/bi: Push UBOs on Bifrost
...
Based on the Midgard pass. Results look better since Midgard already had
a basic UBO pushing pass to begin with. Particularly nice to see the
dramatic reduction in spilling.
total instructions in shared programs: 169141 -> 161215 (-4.69%)
instructions in affected programs: 164102 -> 156176 (-4.83%)
helped: 1269
HURT: 90
helped stats (abs) min: 1 max: 61 x̄: 6.50 x̃: 4
helped stats (rel) min: 0.15% max: 17.58% x̄: 6.31% x̃: 5.88%
HURT stats (abs) min: 1 max: 170 x̄: 3.58 x̃: 1
HURT stats (rel) min: 0.08% max: 133.33% x̄: 16.65% x̃: 5.26%
95% mean confidence interval for instructions value: -6.28 -5.38
95% mean confidence interval for instructions %-change: -5.39% -4.18%
Instructions are helped.
total nops in shared programs: 121049 -> 120997 (-0.04%)
nops in affected programs: 110024 -> 109972 (-0.05%)
helped: 501
HURT: 758
helped stats (abs) min: 1 max: 45 x̄: 5.54 x̃: 2
helped stats (rel) min: 0.25% max: 47.06% x̄: 6.81% x̃: 4.55%
HURT stats (abs) min: 1 max: 102 x̄: 3.59 x̃: 3
HURT stats (rel) min: 0.32% max: 50.00% x̄: 7.13% x̃: 6.06%
95% mean confidence interval for nops value: -0.45 0.37
95% mean confidence interval for nops %-change: 1.07% 2.09%
Inconclusive result (value mean confidence interval includes 0).
total clauses in shared programs: 40388 -> 31610 (-21.73%)
clauses in affected programs: 38825 -> 30047 (-22.61%)
helped: 1367
HURT: 2
helped stats (abs) min: 1 max: 58 x̄: 6.43 x̃: 5
helped stats (rel) min: 1.34% max: 55.56% x̄: 24.97% x̃: 25.00%
HURT stats (abs) min: 2 max: 12 x̄: 7.00 x̃: 7
HURT stats (rel) min: 5.08% max: 6.67% x̄: 5.88% x̃: 5.88%
95% mean confidence interval for clauses value: -6.74 -6.08
95% mean confidence interval for clauses %-change: -25.50% -24.35%
Clauses are helped.
total quadwords in shared programs: 144937 -> 130686 (-9.83%)
quadwords in affected programs: 140419 -> 126168 (-10.15%)
helped: 1369
HURT: 13
helped stats (abs) min: 1 max: 112 x̄: 10.50 x̃: 7
helped stats (rel) min: 0.23% max: 31.82% x̄: 11.36% x̃: 10.78%
HURT stats (abs) min: 1 max: 106 x̄: 10.00 x̃: 1
HURT stats (rel) min: 5.88% max: 10.24% x̄: 9.26% x̃: 10.00%
95% mean confidence interval for quadwords value: -10.96 -9.66
95% mean confidence interval for quadwords %-change: -11.52% -10.82%
Quadwords are helped.
total spills in shared programs: 1106 -> 705 (-36.26%)
spills in affected programs: 1058 -> 657 (-37.90%)
helped: 41
HURT: 0
total fills in shared programs: 2241 -> 1645 (-26.60%)
fills in affected programs: 2219 -> 1623 (-26.86%)
helped: 43
HURT: 2
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
040a350b1e
pan/bi: Add SSA-based scalar copy propagation
...
This is a very simple (and slow...) copyprop pass. It's good enough to
get rid of redundant moves from FAU, but it doesn't help for vector
combines.
total instructions in shared programs: 175219 -> 169141 (-3.47%)
instructions in affected programs: 91439 -> 85361 (-6.65%)
helped: 599
HURT: 0
helped stats (abs) min: 1 max: 112 x̄: 10.15 x̃: 6
helped stats (rel) min: 0.30% max: 33.33% x̄: 8.61% x̃: 8.04%
95% mean confidence interval for instructions value: -11.06 -9.24
95% mean confidence interval for instructions %-change: -9.07% -8.16%
Instructions are helped.
total nops in shared programs: 120011 -> 121049 (0.86%)
nops in affected programs: 47355 -> 48393 (2.19%)
helped: 110
HURT: 309
helped stats (abs) min: 1 max: 6 x̄: 2.07 x̃: 2
helped stats (rel) min: 0.44% max: 16.67% x̄: 3.59% x̃: 3.16%
HURT stats (abs) min: 1 max: 56 x̄: 4.10 x̃: 2
HURT stats (rel) min: 0.32% max: 80.85% x̄: 6.85% x̃: 3.12%
95% mean confidence interval for nops value: 1.86 3.09
95% mean confidence interval for nops %-change: 3.08% 5.14%
Nops are HURT.
total clauses in shared programs: 40576 -> 40388 (-0.46%)
clauses in affected programs: 3074 -> 2886 (-6.12%)
helped: 106
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.77 x̃: 2
helped stats (rel) min: 0.42% max: 22.22% x̄: 7.17% x̃: 6.90%
95% mean confidence interval for clauses value: -1.91 -1.63
95% mean confidence interval for clauses %-change: -7.80% -6.53%
Clauses are helped.
total quadwords in shared programs: 146590 -> 144937 (-1.13%)
quadwords in affected programs: 59475 -> 57822 (-2.78%)
helped: 493
HURT: 1
helped stats (abs) min: 1 max: 28 x̄: 3.35 x̃: 2
helped stats (rel) min: 0.28% max: 15.38% x̄: 4.08% x̃: 3.85%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 2.38% max: 2.38% x̄: 2.38% x̃: 2.38%
95% mean confidence interval for quadwords value: -3.61 -3.08
95% mean confidence interval for quadwords %-change: -4.33% -3.81%
Quadwords are helped.
total spills in shared programs: 1106 -> 1106 (0.00%)
spills in affected programs: 0 -> 0
helped: 0
HURT: 0
total fills in shared programs: 2241 -> 2241 (0.00%)
fills in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
fa79168b9e
pan/bi: Simplify derivative lowering
...
Now that we lower FAU correctly, we don't need to write the extra move
explicitly, it will be lowered in later.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
0acc6b564e
pan/bi: Rework FAU lowering
...
Move and reshape bi_lower_fau to bi_schedule.c. This generalizes the
pass for FAU reads, allowing copyprop to work with FAU without problems.
The pass must run immediately before scheduling. Its post-conditions are
directly specified as the scheduler's pre-conditions. It momentarily
will depend on internal scheduler predicates. It is, for all intents and
purposes, part of the scheduler. Keep it all together.
Finally, adjust the 0 handling to avoid a move at the expense of
constrained scheduling of something like `FADD.v2f16.clamp_0_1 u0, #0`
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
6106fb5d8d
pan/bi: Handle modifiers in rewrite_fau_to_pass
...
Will prevent failures when we start using FAU together with modifiers in
a few commits.
Fixes: fc7770b1dd ("pan/bi: Add trivial rewrite helpers")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
e9572ff3e9
pan/bi: Generalize bi_update_fau with fast zero
...
Ensure we don't fall over if we have an instruction like
FADD.f32 u0, #0
In this case, the tuple's FAU requirement implies the instruction can be
scheduler without lowering to the FMA slot but not the ADD slot.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
0f27e24934
pan/bi: Print FAU uniforms in IR
...
Uses "u3, u3[1]" syntax which is close enough to the assembly syntax
"u3.w0, u3.w1".
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
97e5181fe4
pan/bi: Add bi_is_ssa helper
...
Convenient for SSA-based opt passes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
be02c0868c
pan/bi: Add bi_replace_index helper
...
I keep open-coding this, incorrectly... Since bi_index contains both
"position" and "modifier" data, it's common to want to swap the position
while preserving modifiers.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
54beea9799
pan/bi: Fix multithreaded shader-db
...
Clobbered names.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
755227baa6
pan/mdg: Push uniforms based on UBO analysis
...
Skips over "holes" in UBO ranges and allows pushing things other than
UBO #0 (GL uniforms) and sysvals. shader-db results relative to
beginning of series (so includes the hurt from lowering UBO to
uniforms):
total instructions in shared programs: 96611 -> 95018 (-1.65%)
instructions in affected programs: 22356 -> 20763 (-7.13%)
helped: 204
HURT: 13
helped stats (abs) min: 1 max: 27 x̄: 8.18 x̃: 7
helped stats (rel) min: 0.42% max: 26.09% x̄: 8.60% x̃: 8.07%
HURT stats (abs) min: 1 max: 33 x̄: 5.77 x̃: 2
HURT stats (rel) min: 0.47% max: 15.64% x̄: 3.56% x̃: 1.72%
95% mean confidence interval for instructions value: -8.29 -6.39
95% mean confidence interval for instructions %-change: -8.74% -7.00%
Instructions are helped.
total bundles in shared programs: 44886 -> 44790 (-0.21%)
bundles in affected programs: 9640 -> 9544 (-1.00%)
helped: 131
HURT: 70
helped stats (abs) min: 1 max: 11 x̄: 4.34 x̃: 4
helped stats (rel) min: 1.04% max: 42.31% x̄: 10.39% x̃: 9.84%
HURT stats (abs) min: 1 max: 16 x̄: 6.76 x̃: 6
HURT stats (rel) min: 2.22% max: 37.50% x̄: 13.78% x̃: 10.00%
95% mean confidence interval for bundles value: -1.37 0.42
95% mean confidence interval for bundles %-change: -3.99% 0.04%
Inconclusive result (value mean confidence interval includes 0).
total quadwords in shared programs: 76320 -> 75140 (-1.55%)
quadwords in affected programs: 16691 -> 15511 (-7.07%)
helped: 206
HURT: 5
helped stats (abs) min: 1 max: 18 x̄: 5.91 x̃: 6
helped stats (rel) min: 0.36% max: 27.78% x̄: 7.93% x̃: 8.33%
HURT stats (abs) min: 1 max: 19 x̄: 7.40 x̃: 1
HURT stats (rel) min: 0.55% max: 15.79% x̄: 7.39% x̃: 3.57%
95% mean confidence interval for quadwords value: -6.19 -5.00
95% mean confidence interval for quadwords %-change: -8.32% -6.82%
Quadwords are helped.
total registers in shared programs: 6958 -> 6827 (-1.88%)
registers in affected programs: 1083 -> 952 (-12.10%)
helped: 112
HURT: 16
helped stats (abs) min: 1 max: 3 x̄: 1.32 x̃: 1
helped stats (rel) min: 6.25% max: 50.00% x̄: 17.13% x̃: 12.50%
HURT stats (abs) min: 1 max: 2 x̄: 1.06 x̃: 1
HURT stats (rel) min: 9.09% max: 20.00% x̄: 11.97% x̃: 11.81%
95% mean confidence interval for registers value: -1.19 -0.86
95% mean confidence interval for registers %-change: -15.78% -11.21%
Registers are helped.
total threads in shared programs: 5109 -> 5153 (0.86%)
threads in affected programs: 62 -> 106 (70.97%)
helped: 42
HURT: 6
helped stats (abs) min: 1 max: 2 x̄: 1.19 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for threads value: 0.68 1.16
95% mean confidence interval for threads %-change: 66.69% 95.81%
Threads are helped.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
4c65067150
pan/mdg: Update UBO promotion comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
0b70ebc14c
panfrost: Don't store uniform_count on Midgard
...
We weren't reading it anywhere outside this function, no need to keep
the extra copy of the data around. Avoids a footgun since this field
isn't even used on Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
10f06a2b70
panfrost: Set FAU count based on program->push
...
There's no "cutoff" to worry about on Bifrost, just do the simple thing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
ce8188ccf2
panfrost: Push uniforms required by the program
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
d4dccea0ba
panfrost: Add UBO push data structure
...
Will be used to generalize RMU on Midgard and also to support Bifrost's
FAU (which is essentially the same thing).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
ed810eb0a0
panfrost: Don't truncate uniform_count
...
Will fix INSTR_INVALID_OPERAND faults when we push other UBOs.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
db7e2dce1c
panfrost: Move sysvals to dedicated UBO
...
This makes UBO 0 less special, allowing us to generalize uniform
optimization. Note this disables RMU on Midgard as we're about to
rewrite the RMU mechanism.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
0dc539a872
panfrost: Respect buffer_offset when mapping to CPU
...
Previously not seen since mesa/st seems to leave this zero for uniforms.
Still wrong, though.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
21c3e82495
panfrost: Fix race condition in UBO mapping to CPU
...
In theory, a compute shader (or transform feedback) could write to an
SSBO, rebind as a UBO, and then read as a UBO later in the same frame.
We would need to flush in this case so we don't push stale data to the
later shader. This seems sufficiently obscure, but if this is a
performance issue in a real workload, we could emit a small compute
shader to do the copies without flushing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
a0b9420915
pan/mdg: Set lower_uniforms_to_ubo
...
Removes our custom load_uniform implementation and unifies the command
stream side with Bifrost, preparing for additional optimizations.
shader-db results are a wash. It's worth noting some of the increase in
bundles is due to peephole select which is notoriously awkward for
shader-db stats.
total instructions in shared programs: 96611 -> 95613 (-1.03%)
instructions in affected programs: 17562 -> 16564 (-5.68%)
helped: 137
HURT: 13
helped stats (abs) min: 2 max: 27 x̄: 7.83 x̃: 7
helped stats (rel) min: 0.61% max: 20.00% x̄: 7.19% x̃: 5.75%
HURT stats (abs) min: 1 max: 33 x̄: 5.77 x̃: 2
HURT stats (rel) min: 0.47% max: 15.64% x̄: 3.56% x̃: 1.72%
95% mean confidence interval for instructions value: -7.78 -5.53
95% mean confidence interval for instructions %-change: -7.13% -5.38%
Instructions are helped.
total bundles in shared programs: 44886 -> 45230 (0.77%)
bundles in affected programs: 6649 -> 6993 (5.17%)
helped: 54
HURT: 68
helped stats (abs) min: 1 max: 6 x̄: 2.35 x̃: 2
helped stats (rel) min: 1.04% max: 6.82% x̄: 4.37% x̃: 4.80%
HURT stats (abs) min: 1 max: 16 x̄: 6.93 x̃: 6
HURT stats (rel) min: 2.22% max: 37.50% x̄: 14.03% x̃: 10.00%
95% mean confidence interval for bundles value: 1.78 3.85
95% mean confidence interval for bundles %-change: 3.73% 8.04%
Bundles are HURT.
total quadwords in shared programs: 76320 -> 75533 (-1.03%)
quadwords in affected programs: 12404 -> 11617 (-6.34%)
helped: 133
HURT: 3
helped stats (abs) min: 1 max: 18 x̄: 6.18 x̃: 6
helped stats (rel) min: 0.36% max: 18.18% x̄: 7.34% x̃: 7.45%
HURT stats (abs) min: 1 max: 19 x̄: 11.67 x̃: 15
HURT stats (rel) min: 0.55% max: 15.79% x̄: 9.94% x̃: 13.48%
95% mean confidence interval for quadwords value: -6.41 -5.16
95% mean confidence interval for quadwords %-change: -7.58% -6.34%
Quadwords are helped.
total registers in shared programs: 6958 -> 6928 (-0.43%)
registers in affected programs: 524 -> 494 (-5.73%)
helped: 42
HURT: 15
helped stats (abs) min: 1 max: 2 x̄: 1.10 x̃: 1
helped stats (rel) min: 6.25% max: 25.00% x̄: 12.71% x̃: 12.50%
HURT stats (abs) min: 1 max: 2 x̄: 1.07 x̃: 1
HURT stats (rel) min: 9.09% max: 20.00% x̄: 11.44% x̃: 11.11%
95% mean confidence interval for registers value: -0.79 -0.26
95% mean confidence interval for registers %-change: -9.35% -3.36%
Registers are helped.
total threads in shared programs: 5109 -> 5107 (-0.04%)
threads in affected programs: 16 -> 14 (-12.50%)
helped: 2
HURT: 6
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for threads value: -1.41 0.91
95% mean confidence interval for threads %-change: -70.55% 45.55%
Inconclusive result (value mean confidence interval includes 0).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
WIP - do peephole ourselves
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
2a82e58360
pan/mdg: Optimize UBO offset calculations
...
LD_UNIFORM supports constant shifts and biases, just like LD, so take
advantage of that. Will avoid a regression in code quality from lowering
uniforms to UBOs.
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
73bbf08897
pan/mdg: Add MIDGARD_MESA_DEBUG=inorder option
...
Helpful to disable the scheduler when debugging, so the assembly can be
compared against the NIR directly when lost in a big dEQP test.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Alyssa Rosenzweig
c7bcc40ec1
pan/mdg: Fix multithreaded shader-db
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973 >
2021-02-11 17:24:37 +00:00
Lionel Landwerlin
6673c40011
anv: discard all timeline wait/signal value=0
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 34f32a6d66 ("anv: implement VK_KHR_timeline_semaphore")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4277
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8987 >
2021-02-11 17:16:17 +00:00
Mike Blumenkrantz
aad3135ec9
features: mark off GL 4.5 for zink
...
also update relnotes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:50:47 -05:00
Mike Blumenkrantz
989731bbe2
zink: GLSL 450
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:50:41 -05:00
Mike Blumenkrantz
c2e67f679c
zink: enable PIPE_CAP_TEXTURE_BARRIER
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:19:07 -05:00
Mike Blumenkrantz
c94819286e
zink: enable PIPE_CAP_TGSI_TXQS
...
aka ARB_shader_texture_image_samples
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:19:04 -05:00
Mike Blumenkrantz
faa7393a6a
zink: enable PIPE_CAP_CLIP_HALFZ
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:19:01 -05:00
Mike Blumenkrantz
8d9d7f15b9
zink: enable PIPE_CAP_CONDITIONAL_RENDER_INVERTED
...
this was already handled
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:18:58 -05:00
Mike Blumenkrantz
e88a6d1c7b
zink: GLSL 440
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:18:53 -05:00
Mike Blumenkrantz
6f7430dd50
zink: enable PIPE_CAP_QUERY_BUFFER_OBJECT
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:18:49 -05:00
Mike Blumenkrantz
90e8543da0
zink: enable PIPE_CAP_TGSI_ARRAY_COMPONENTS
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8989 >
2021-02-11 11:18:46 -05:00
Mike Blumenkrantz
49dd9d2026
zink: add a get_query_result_resource hook
...
this is messy due to how we have to accumulate all the query results
in some cases
future patches will break things up into utility functions for reuse
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8944 >
2021-02-11 15:53:48 +00:00
Mike Blumenkrantz
ffc66d4d8f
zink: add PIPE_BIND_QUERY_BUFFER to the all-purpose resource creation path
...
this can be used pretty much anywhere, so it needs all the bits
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8944 >
2021-02-11 15:53:48 +00:00
Rohan Garg
4316e0459e
ci: Ensure that jobs inherting the ci-deqp jobs artifact meson logs
...
Since gitlab-ci cannot merge artifact lists, and the last entry a job
extends from overwrites the artifact list, we should ensure that we
artifact meson logs via the .ci-deqp-artifacts job.
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8937 >
2021-02-11 15:32:34 +01:00
Mike Blumenkrantz
eeaf7b51f3
zink: fix xfb buffer refcounting
...
we need to always ref the counter buffer to the current batch, not
just when using it for resumign xfb
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8984 >
2021-02-11 13:51:53 +00:00
Timur Kristóf
e163f1c949
tgsi_to_nir: Fix uniform ranges.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Fixes: f3b33a5a35
Closes : #4127
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8920 >
2021-02-11 13:13:07 +01:00
Erik Faye-Lund
5638068115
zink: enable excluded test
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8977 >
2021-02-11 11:57:49 +00:00
Erik Faye-Lund
b65093c0cf
zink: correctly handle 64 valid timestamp bits
...
We can't shift up 1ull by more than 63 without triggering undefined
behavior here. But in that case, doing nothing is perfectly fine.
While we're at it, remove some needless parens.
This fixes the spec@ext_timer_query@time-elapsed piglit test on top of
Lavapipe.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8977 >
2021-02-11 11:57:49 +00:00
Rhys Perry
d906c007d6
radv: use a more relaxed alignment for upload buffer allocations
...
256 bytes was higher than necessary.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8833 >
2021-02-11 11:44:06 +00:00
Samuel Pitoiset
9de8745399
ac/rgp: append the number of seconds to the generated RGP file
...
To not overwrite the previous ones.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8960 >
2021-02-11 09:29:31 +00:00
Samuel Pitoiset
a1185d09f0
radv: add support for resizing the SQTT buffer automatically
...
The buffer is resized when too small, the 150% limit is arbitrary and
works in most cases.
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/8960 >
2021-02-11 09:29:31 +00:00
Samuel Pitoiset
9d79bb24b4
radv: adjust an error message related to the SQTT buffer size
...
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/8960 >
2021-02-11 09:29:31 +00:00
Samuel Pitoiset
c7e6f4ff3d
radv: do not overallocate the SQTT buffer
...
The total size is computed for all available SEs which is not always 4.
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/8960 >
2021-02-11 09:29:31 +00:00
Erik Faye-Lund
72709c2bce
ci: document arm oddity in build-rules
...
There's an oddity in the .lava-test:amd64 build rules; we depend on and
use the ARM images instead of the AMD64 images. The reason for this is
kind of silly; we need the Docker image to match the architecture of the
runner, which happens to be ARM.
So this isn't at all about the target architecture, but more of a Docker
detail.
Hopefully documenting this will prevent others from spending time being
puzzled about this in the future.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8967 >
2021-02-11 08:42:12 +00:00
Michel Dänzer
4b4bddcd99
ci: Restrict meson-gallium job to gstreamer runners
...
The i965_asm tests are randomly timing out. I've been able to find such
timeouts only on packet runners. This change should have either of these
results:
* The timeouts actually don't happen on gstreamer runners. There will
be no more spurious pipeline failures due to them for the time being,
and we'll know the timeouts are due to some kind of packet runner
specific issue.
* The timeouts happen on gstreamer runners as well. We'll know they're
not caused by a packet runner specific issue.
Win-win.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8966 >
2021-02-11 08:26:38 +00:00
Dave Airlie
452a37e634
llvmpipe: enable GL spir-v support
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8972 >
2021-02-11 07:32:02 +00:00
Dave Airlie
14b2dc0013
glsl: fix leak in gl_nir_link_uniform_blocks
...
asan on llvmpipe with piglit tests/spec/arb_gl_spirv/execution/ssbo/array-indirect.shader_test
reported.
=================================================================
==3288325==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7f5b2d6513cf in __interceptor_malloc (/lib64/libasan.so.6+0xab3cf)
#1 0x7f5b2a1ae810 in ralloc_size ../src/util/ralloc.c:133
#2 0x7f5b2a1ae7e1 in ralloc_context ../src/util/ralloc.c:120
#3 0x7f5b2b210177 in gl_nir_link_uniform_blocks ../src/compiler/glsl/gl_nir_link_uniform_blocks.c:585
#4 0x7f5b2af7f52d in gl_nir_link_spirv ../src/compiler/glsl/gl_nir_linker.c:614
#5 0x7f5b2a3b76fa in st_link_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:765
#6 0x7f5b2a3ace7b in st_link_shader ../src/mesa/state_tracker/st_glsl_to_ir.cpp:65
#7 0x7f5b2a471165 in _mesa_glsl_link_shader ../src/mesa/program/ir_to_mesa.cpp:3122
#8 0x7f5b2a97a6d8 in link_program ../src/mesa/main/shaderapi.c:1311
#9 0x7f5b2a97a6d8 in link_program_error ../src/mesa/main/shaderapi.c:1419
#10 0x7f5b2a97df45 in _mesa_LinkProgram ../src/mesa/main/shaderapi.c:1911
#11 0x7f5b299b59e5 in stub_glLinkProgram /mnt/devel/gl/piglit/tests/util/piglit-dispatch-gen.c:33956
#12 0x40a71a in link_and_use_shaders /mnt/devel/gl/piglit/tests/shaders/shader_runner.c:1604
#13 0x415722 in init_test /mnt/devel/gl/piglit/tests/shaders/shader_runner.c:5225
#14 0x4164ce in piglit_init /mnt/devel/gl/piglit/tests/shaders/shader_runner.c:5597
#15 0x7f5b29a214e9 in run_test /mnt/devel/gl/piglit/tests/util/piglit-framework-gl/piglit_winsys_framework.c:73
#16 0x7f5b29a103fe in piglit_gl_test_run /mnt/devel/gl/piglit/tests/util/piglit-framework-gl.c:229
#17 0x407847 in main /mnt/devel/gl/piglit/tests/shaders/shader_runner.c:72
#18 0x7f5b2928f1e1 in __libc_start_main (/lib64/libc.so.6+0x281e1)
SUMMARY: AddressSanitizer: 48 byte(s) leaked in 1 allocation(s).
Fixes: 57239192 ("nir/linker: add gl_nir_link_uniform_blocks.c")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8974 >
2021-02-11 14:20:22 +10:00
Mike Blumenkrantz
a29e7c0784
zink: handle nir_intrinsic_load_helper_invocation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8949 >
2021-02-11 00:04:19 +00:00
Dave Airlie
8ed874d73f
lavapipe: reset shader constant buffers after execution
...
Otherwise this leads to a use-after-free
dEQP-VK.synchronization.op.single_queue.fence.write_fill_buffer_read_ssbo_vertex.buffer_16384
when run after any test using a ubo in the fragment shader.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8912 >
2021-02-11 08:36:07 +10:00
Dave Airlie
c10b785490
llvmpipe: fix use after free with fs variant cleanup
...
item->base will be freed for the NULL reference write
so just use a temporary to avoid it.
This was found with asan and lavapipe:
dEQP-VK.api.copy_and_blit.core.blit_image*
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8912 >
2021-02-11 08:34:35 +10:00
Dave Airlie
2937f69cc0
llvmpipe: add a mutex around debug resource tracking
...
The debug resource tracking triggers an asan warning, add a mutex
around it to avoid multi-thread failures with vulkan CTS test:
dEQP-VK.api.object_management.multithreaded_per_thread_device.buffer_uniform_small
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8912 >
2021-02-11 08:34:05 +10:00
Adam Jackson
acaf07c24b
glx: Fix GLX_SGI_video_sync for the no-current-drawable case
...
Starting with GL 3.0 it's legal to have no drawable bound to the current
context. GLX_SGI_video_sync doesn't take a drawable for an argument so
it implicitly operates on... something. NVIDIA's driver throws
GLX_BAD_CONTEXT for GetVideoSync, but WaitVideoSync seems to actually
wait for the next MSC on the context's screen. We could work around this
by internally creating/destroying a GLXWindow for the root window, but
for Xwayland there's not necessarily a good answer it can return.
Just throw GLX_BAD_CONTEXT for both.
Fixes : mesa/mesa#1207
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8334 >
2021-02-10 21:10:04 +00:00
Adam Jackson
88ca480c8b
osmesa: Pacify MSVC in the test code
...
Not smart enough to think this is const, eh.
Fixes : mesa/mesa#4119
Fixes: c5c1aa7c75 ("gallium/osmesa: Fix flushing and Y-flipping of the depth buffer.")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8936 >
2021-02-10 20:54:55 +00:00
Nanley Chery
fbacd8a99c
iris: Call iris_sample_with_depth_aux earlier
...
Instead of calling iris_sample_with_depth_aux right before a sample
operation, call it at resource creation time. Unifies the code which
ensures that it's okay to sample with HiZ.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
9bd092736c
iris: Drop iris_resource::aux::has_hiz
...
Instead of storing a bitfield of which resource levels will be accessed
with HiZ, compute this information on-demand. Makes the iris_resource
struct more generic.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
cfa38e5a99
iris: Don't avoid aux state getter/setter with HiZ
...
Before this commit, various functions avoided calling
iris_resource_get_aux_state and iris_resource_set_aux_state for depth
buffers which lacked full HiZ support at certain levels. This was
because:
1. Some callers of prepare/finish neglected to use ISL_AUX_USAGE_NONE
for the levels which lacked full HiZ support.
2. The assertions within the getter and setter were too strict.
Now that both of these issues have been resolved, there's no obvious
reason to try to avoid these function calls. Delete the code for
avoiding them.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
f2a2ee3193
iris: Loosen aux state getter/setter assert on HiZ
...
The aux state getter and setter currently assert
iris_resource_level_has_hiz() for depth surfaces.
This assertion is too strict however. In some cases where the assert
would fail, we can still correctly describe the aux state with the ISL
enums (using ISL_AUX_STATE_AUX_INVALID, for example).
When HiZ is enabled on a resource but disabled for a given level, allow
the getter to be called and allow the setter to set aux states that lack
compression. Enables code simplifications later on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
0079b8543a
iris: Fix aux usage of depth buffer prepare/finish
...
Prepare/finish a framebuffer's depth buffer with the aux usage that's
appropriate for the given miplevel instead of wrongly assuming that
compression is always enabled. Enables code simplifications later on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
7170479475
iris: Keep aux_usage in iris_blorp_surf_for_resource
...
Avoid the surprising behavior of overriding the aux usage for depth
resources.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
0e03fe19e5
iris: Fix the depth aspect aux usage in iris_blit
...
Set dst_aux_usage to ISL_AUX_USAGE_NONE for the depth buffer blit if the
level doesn't fully support HiZ. Enables removing the code that masked
this issue later on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
767fd868a0
iris: Drop batch param from iris_resource_prepare_render
...
Drop an unused parameter.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
62831815e6
iris: Delete redundant assertion in iris_hiz_exec
...
There's an iris_resource_level_has_hiz assert at the top of the
function. Also, aux surfaces are allocated in the same BO as main
surfaces.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
a0908d0c91
iris: Drop a stale comment about HiZ sampling
...
With commit 7339660e80 , this comment is no
longer needed.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
becefe5a69
iris: Drop an XXX comment about sampling HiZ arrays
...
Contrary to the comment, i965 doesn't disable sampling with HiZ on 2D
arrays.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
4c6882c090
i965,iris: Delete misleading HiZ sampling comments
...
One comment seems to suggest that MCS (which is needed for compressed
multisampling) can be used to sample from a multisampled depth buffer.
This is not the case. Multisampled depth buffers are sampled without an
auxiliary surface.
Another comment seems to suggest that some depth buffers don't have
corresponding levels in their HiZ buffers. Each main slice *should* have
a corresponding aux slice, but not all of these slices have equal
support for HiZ ops (e.g. ambiguates aren't really supported on
non-8x4-aligned slices).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Nanley Chery
f961cf2047
blorp: Assert 8x4 alignment for a HiZ op on Gen8-9
...
On BDW and SKL, assert that render target dimensions are 8x4-aligned
when performing HiZ ambiguates on LOD1+. Testing indicates that the
assertion should hold in order to achieve consistent/correct ambiguate
operations on gen9.
v2. Account for the relaxed restrictions on ICL+. (Ken)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3788
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8853 >
2021-02-10 20:48:01 +00:00
Adam Jackson
f2573760b4
zink: Factor out instance setup a bit more
...
The VkInstance is really display state not screen state, as is the
loader version. Factor this out a bit further so that
zink_create_instance fills in a zink_instance_info. The latter struct
still lives in the zink_screen for now but that'll move soon.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8968 >
2021-02-10 20:31:42 +00:00
Mike Blumenkrantz
f88d9c9d7c
zink: use better mapping for PIPE_FORMAT_X24S8_UINT
...
this needs to be unconditionally supported in some way, and it also
needs to use a more compatible fallback format if the base format is unavailable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8959 >
2021-02-10 20:20:38 +00:00
Erik Faye-Lund
329b26ab76
lavapipe: report correct value for minMemoryMapAlignment
...
The vulkan spec says the following about vkMapMemory:
"ppData is a pointer to a void * variable in which is returned a
host-accessible pointer to the beginning of the mapped range. This
pointer minus offset must be aligned to at least
VkPhysicalDeviceLimits::minMemoryMapAlignment."
So let's report the same value as the gallium-driver reports, otherwise
we'll fail to adhere to the alignment requirement.
This fixes a few Piglit failures for Zink.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4267
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8965 >
2021-02-10 20:42:02 +01:00
Michel Zou
aea36ee05e
zink: Fix win32 build
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8957 >
2021-02-10 18:19:43 +00:00
Alyssa Rosenzweig
60cd7ff7f7
pan/bi: Fix 2-write pseudo op scheduling
...
These cannot schedule to the last tuple, there needs to be other work in
the last clause, or a tuple of NOP's failing that. Can occur depending
on scheduling of CUBEFACE instructions, and will apply to computational
atomics in the near future.
Fixes: 77933d16d8 ("pan/bi: Switch to new scheduler")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8962 >
2021-02-10 18:08:11 +00:00
Alyssa Rosenzweig
214e7de909
pan/bi: Fix 'last tuple' for terminal-NOP clauses
...
This incorrectly assumed the last tuple was nontrivial, an invariant
that holds by accident on the current scheduler but will break
momentarily. Fix this, and document the invariants.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8962 >
2021-02-10 18:08:11 +00:00
Michel Zou
e487ae1b99
vulkan: Fix windows api conflict
...
Closes #4247
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8956 >
2021-02-10 17:10:50 +00:00
Erik Faye-Lund
7ea69f40d8
ci: run piglit on zink with lavapipe
...
Now that we can run on top of Lavapipe, we can finally start testing
Piglit on top of Zink in CI, yay!
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8879 >
2021-02-10 17:29:18 +01:00
Erik Faye-Lund
ef36de243c
ci: make sure all lava-builders have libvulkan
...
In the next commit, we'll start building Zink in the meson-testing step,
and because mega-drivers end up stuffing all dependencies in the same
shared-object, we end up requiring libvulkan for other drivers as well.
So let's no longer track separately who needs vulkan and who doesn't,
and just always install it.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8879 >
2021-02-10 17:14:02 +01:00
Pierre-Eric Pelloux-Prayer
c7725ad4aa
gallium/u_upload_mgr: lower risk of hitting an assert
...
The assert(size < INT32_MAX / 2) can be triggered by large uploads.
Since we know that the caller of u_upload_alloc_buffer will consume
min_size bytes, we can init buffer_private_refcount to a much smaller
value.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Fixes: ccf9ef3628 ("gallium/u_upload_mgr: eliminate all atomics for the upload buffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4235
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8880 >
2021-02-10 16:36:06 +01:00
Mike Blumenkrantz
d81087a700
zink: handle null xfb buffers
...
ARB_enhanced_layouts allows specifying explicit locations for xfb buffers,
which means we get arrays of buffers with gaps in the middle sometimes and
have to throw in a null handle
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8943 >
2021-02-10 14:21:01 +00:00
Mike Blumenkrantz
79dd0562f4
zink: create dummy xfb buffer
...
xfb spec disallows binding a null buffer, so we need something to throw in
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8943 >
2021-02-10 14:21:01 +00:00
Mike Blumenkrantz
ce230f15e4
zink: rename zink_context::dummy_buffer -> dummy_vertex_buffer
...
this is a bit more specific
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8943 >
2021-02-10 14:21:01 +00:00
Lionel Landwerlin
0b69e8b16f
anv: print out perf permission warning only once
...
This warning is bothering a number of people and rightfully so.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8955 >
2021-02-10 15:55:52 +02:00
Mike Blumenkrantz
b20e08fadd
zink: enable PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
e388fae898
zink: flush all resources with persistent maps on work batch before draw/compute
...
these require explicit memory sync on our part
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
564bb1410c
zink: slightly refactor batch resource referencing in update_descriptors()
...
this is easier to debug
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
b92ba0100e
zink: track persistent, non-coherent, writable transfer map count for resources
...
these require explicit memory flushes before being submitted to a batch
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
4a7a226e49
zink: set HOST_COHERENT bit for coherent resource creation
...
this allows memory to be mapped during draws without requiring a flush
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
152916b2bb
zink: use = and not |= for VkMemoryPropertyFlags during resource creation
...
the previous value of this isn't used, so be explicit here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Iago Toral Quiroga
bd0ef080d0
v3d/compiler: fix QPU scheduler TMU sequence shuffling
...
The QPU scheduler allows to move certain TMU instructions around and
since we enabled pipelining, we need to protect against the case where
doing this might break a TMU sequence. For example, this test:
dEQP-VK.rasterization.line_continuity.line-strip
Was generating this VIR:
mov tmud, t187
mov.pushz null, t176
mov.ifa tmua, t9
nop null; wrtmuc (img[0].p0 | 0x0)
mov tmut, t185
mov tmud, t180
mov.ifa tmusf, t183
nop null; thrsw
where we have a general TMU access (tmud,tmua) followed by an image
access (wrtmuc, tmut, tmud, tmusf), which the QPU scheduler was turning
into:
nop ; nop ; ldunifrf.rf22 (0xffffff00 / -nan)
nop ; nop ; wrtmuc (img[0].p0 | 0x0)
nop ; nop ; ldtmu.r2
add r0, r2, 1 ; nop ; ldtmu.r3
nop ; nop ; ldtmu.r4
nop ; mov tmud, r0
nop ; mov.ifa tmua, rf15
nop ; mov tmut, r4 ; thrsw
nop ; mov tmud, rf22
nop ; mov.ifa tmusf, r3
where it allowed the wrtmuc to move up and before the general TMU access,
leading to an incorrect TMU sequence.
Fix this by flagging TMUA writes (which are the sequence terminators for
general TMU accessess) as writing new TMU configuration, like we do for all
other TMU sequence terminators for textures and images.
Fixes: 197090a3fc ('broadcom/compiler: implement pipelining for general TMU operations')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8954 >
2021-02-10 13:18:25 +00:00
Mike Blumenkrantz
79fcea9475
zink: add a texture barrier hook
...
this just flushes all the pending batches, which is enough since we
do our batch work synchronously and everything is awful
will be reworked when this is no longer the case
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8948 >
2021-02-10 13:12:12 +00:00
Mike Blumenkrantz
802c1afe9c
zink: handle nir_texop_texture_samples
...
this is just a SpvOpImageQuerySamples
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8947 >
2021-02-10 13:05:45 +00:00
Mike Blumenkrantz
efbd3584e3
zink: rework viewport handling
...
viewport can be transformed at draw time based on clip_halfz, so we actually
want to do the conversion from gallium->vulkan at that time
as a nice bonus, we get to delete a struct member
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8946 >
2021-02-10 12:59:37 +00:00
Danylo Piliaiev
f0a76b2067
turnip: enable inheritedQueries
...
Passes relevant CTS tests.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8824 >
2021-02-10 12:38:44 +00:00
Samuel Pitoiset
ed7e6eb54b
radv: fix memory leaks if a submission fails
...
If the device isn't lost, the application might want to re-submit.
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/8931 >
2021-02-10 12:25:38 +00:00
Mike Blumenkrantz
bf5713d736
zink: handle vote intrinsics in ntv
...
these are super simple and straightforward
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8950 >
2021-02-10 12:18:33 +00:00
Mike Blumenkrantz
e35612e45f
zink: add spirv_builder wrapper for vote intrinsics
...
these are all going to use the same mechanics, so we can simplify a bit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8950 >
2021-02-10 12:18:33 +00:00
Michel Dänzer
cf6901809e
ci: Add trailing slash to path for documentation preview
...
Fixes the documentation preview link on the MR Overview tab. Found by
comparing with the same thing in weston.
(It still appears only after all jobs in the pipeline have at least
started once though)
Fixes: ae8f9584f4 "CI: always expose docs artifacts"
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8927 >
2021-02-10 12:04:22 +00:00
Alejandro Piñeiro
f758b1a25b
v3dv: support for depthBiasClamp
...
Gets tests like the following working:
dEQP-VK.dynamic_state.rs_state.depth_bias_clamp
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8928 >
2021-02-10 10:29:09 +00:00
Rhys Perry
f7575fa71f
aco: fix adjust_vertex_fetch_alpha
...
These offsets were wrong and didn't match the old behaviour.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: e8220e106b ("aco: optimize AC_FETCH_FORMAT_SNORM alpha adjust")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8935 >
2021-02-10 09:37:17 +00:00
Samuel Pitoiset
19711b0f44
radv: stop allocating useless ESGS scratch BO on GFX10+
...
On GFX10+, the ESGS ring is allocated in LDS. This saves one BO
when geometry shaders are used, and possibly two BOs if nothing
else (tess, scratch, etc) is 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/8926 >
2021-02-10 08:45:35 +00:00
Samuel Pitoiset
caafedf38f
radv: fix double free when creating a fence failed
...
It's already freed in radv_destroy_fence().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8938 >
2021-02-10 08:45:49 +01:00
Eric Anholt
cd03f1c6f6
gallium: Document behavior of more lowering pipe caps.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
bcb5f9f94a
v3d: Stop advertising support for flat shading.
...
The GL frontend can lower this weird GL feature away for us. This should
fix redeclaration of the gl_Color/SecondaryColor as centroid, since that
case had been missed in the !flat special case here.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
ff805f8ac7
v3d: Stop advertising support for PIPE_CAP_*_COLOR_CLAMPED.
...
The GL frontend can lower away this deprecated GL feature for us.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
2992dc7386
v3d: Stop advertising support for PIPE_CAP_TWO_SIDED_COLOR.
...
The GL frontend can lower away this deprecated GL feature for us.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
5ddc2f916f
v3d: Clean up vestiges of alpha test lowering.
...
We had an unnecessary case in our uniforms upload switch statement, since
we no longer advertise the cap.
Fixes: 8ad931808e ("v3d: do not report alpha-test as supported")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
b9a9cd59ff
vc4: Stop advertising support for VS color clamping.
...
This is special GL behavior that the frontend is now able to handle for
us.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
e584d4f6dd
vc4: Stop advertising support for PIPE_CAP_TWO_SIDED_COLOR.
...
The GL frontend is perfectly able to handle this for us.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
cc0841c82a
vc4: Remove vestiges of alpha test lowering.
...
We stopped reporting the alpha test screen cap, and stopped using the
value in the key, so now shrink the key. This gets another switch case
out of the hot uniforms upload path.
Fixes: 1404b8b1e5 ("vc4: do not report alpha-test as supported")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
9aa7a2d10c
mesa/st: Assume that the default variant is always first in the list.
...
Since we always precompile now, we can remove some checks for presence of
the first variant or for it being the wrong key.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
1d5ce66b02
mesa/st: Always precompile the first shader variant.
...
Every driver wants the chance to see the default variant of the shader in
the hopes of avoiding draw-time shader compiles, even if they have some
NOS compiled into the shader by st/mesa. Before, every driver had to
avoid st/mesa lowering options to get this behavior, even if they would
like to have the shared lowering code, and some drivers were just missing
the behavior because nobody had debugged that it was missing yet.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
659916d674
freedreno/a5xx: Don't forget to count our custom blits against queries.
...
Noticed when comparing the a5xx and a6xx paths.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8873 >
2021-02-10 03:46:25 +00:00
Eric Anholt
881ce0f0a4
freedreno: Remove FD_STAGE_* in favor of a "disable_all" flag.
...
The only paths are "prepare queries for rendering" and "finish all
queries", everything else is handled by set_active_query_state().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8873 >
2021-02-10 03:46:25 +00:00
Eric Anholt
4cc3956193
freedreno: Force updating active queries on batch reordering.
...
The state of queries for the batch we've just switched to may not reflect
the current active flag, so make sure that we update at the start of the
next draw.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8873 >
2021-02-10 03:46:25 +00:00
Eric Anholt
1bab56e1ba
ci/virgl: Fix GLES31 testing on desktop GL.
...
The version overrides leaked into the virglrenderer server, breaking
compiling of all sorts of shaders. We already get GLES3.1 when running
virgl on llvmpipe GL without doing any overrides.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8854 >
2021-02-10 03:31:56 +00:00
Mike Blumenkrantz
697fb11cfc
features: mark off GL 4.3 for zink
...
\o/
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8941 >
2021-02-09 19:26:47 -05:00
Mike Blumenkrantz
cb80609bb0
zink: GLSL 430
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8941 >
2021-02-09 19:25:53 -05:00
Mike Blumenkrantz
7909c642b1
zink: enable compute
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
c5cf5ad6f0
zink: export compute-specific shader/compute caps
...
this doesn't enable the compute cap itself, it just handles all the other
caps
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
a2771967cb
zink: add launch_grid pipe_context hook for compute handling
...
we're reusing update_descriptors, so this is trivial
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
ce6d08a0e7
zink: flush gfx/compute batches when the other pipeline needs resource sync
...
if compute or gfx use a resource which is already in use by the other pipeline,
we need to ensure tha we flush that pipeline now in order to have commands execute
in the expected order
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
dac99517ff
zink: handle descriptor set updates for compute operations
...
this is almost identical, the difference being that we need to explicitly
use the compute batch/program in a few places
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
e20a43ec35
zink: handle memory barriers for compute batch
...
this is a bit different since the regular functions cycle the gfx batch
array, but the compute batch isn't in an array
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
e3633ed12b
zink: setup compute batch and add handling
...
this is separate to the gfx batch array,
so we need separate struct members in zink_context for it
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
fa555772b9
zink: break out descriptor updating into separate function
...
this is a massive block of code that we need to reuse for compute shaders
because we absolutely don't want to be copying it around
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
b2247a3724
zink: add compute programs and pipelines
...
these are similar to the gfx variants, but mostly smaller
some things are implemented as placeholders for now to make the code
similar to gfx programs/pipelines and thus easier to read/review
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
6c50b12b9e
zink: rename pipeline_cache_entry -> gfx_pipeline_cache_entry
...
prep for compute pipelines
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
79613650b3
zink: explicitly get shader stage from shader during binding setup in draw
...
the iterator matches the shader stage currently, but this won't always be the
case
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
184d773d0f
zink: make allocate_descriptor_set() take more params instead of a gfx_program
...
this makes the function reusable between different types of programs
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
c9aee1165b
zink: refactor batch creation
...
by moving this into its own function, we can reuse it for creating a compute
batch, which will not be part of the gfx batch array
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
dcab2ca6b1
zink: take a pipe_reference param in zink_batch_reference_program
...
this lets us reuse the function for gfx and compute programs without much
churn, since in C we can use a pointer to the first member of a struct and
a pointer to the struct interchangeably
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
f32891b159
zink: ignore compute batch when starting/ending batches
...
compute batches don't have queries
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
8f6ffc5543
zink: handle nir_intrinsic_memory_barrier_shared in ntv
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
d2b6e10882
zink: add handling for shared atomic ops in ntv
...
these are mostly the same as ssbo except they use the shared block variable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
deff4c220b
zink: implement shared load/store nir ops in ntv
...
these access the data in the shared block variable at an offset
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
36cdcbe092
zink: handle COMPUTE glsl variables
...
we can just use existing helpers for these
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
2d65c7cc0a
zink: handle COMPUTE setup in ntv
...
addressing mode, shared block, and execution modes all need to be handled
here
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
d9122c0417
zink: handle COMPUTE bindings in compiler/ntv
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
a5ff286992
zink: add spirv_builder function for emitting a 3word literal exec mode
...
used by compute
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
813c361fe0
zink: wait on compute batch when necessary during transfer map
...
now that we have the capability to wait on specific batches, we can
check whether we need to sync with the compute queue here before trying
to map resources
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
261058f277
zink: make zink_batch_reference_resource_rw return usage info
...
now this provides some info regarding which batches need to be flushed,
allowing gfx batches and compute batches to share resources
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
e196c471a4
zink: make get_resource_usage() public
...
also cover compute batch id (still not yet used)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
079fae8822
zink: bump resource usage flags to allow 5 batches
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Mike Blumenkrantz
36ee845cd4
zink: add defines for compute batch and gfx batch count
...
this will be used for handling batch usage with compute
also bump some struct field sizes based on this
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:38 +00:00
Lionel Landwerlin
6c489dfefc
intel/stub: plug some gaps in our ioctl faking
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8934 >
2021-02-09 21:08:52 +00:00
Lionel Landwerlin
c4c642a7b4
drm-shim: report support for timeline semaphores
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8934 >
2021-02-09 21:08:52 +00:00
Lionel Landwerlin
64cb03a52d
anv: only signal wsi fence BO on last command buffer
...
I'm pretty sure this doesn't fix anything because the WSI code only
use a single VkSubmitInfo, but better be safe.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: ccb7d606f1 ("anv: Use submit-time implicit sync instead of allocate-time")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8934 >
2021-02-09 21:08:52 +00:00
Lionel Landwerlin
8297a9a429
anv: break up internal queueing function
...
We want more control over batching things up when possible to minimize
the round trips to i915. This breaking up of one big internal function
into helpers will be useful later.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8934 >
2021-02-09 21:08:52 +00:00
Lionel Landwerlin
e93344288b
anv: add a comment describing has_relocs field
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8934 >
2021-02-09 21:08:52 +00:00
Michel Zou
2ef3dca476
vulkan/lavapipe: add missing VKAPI_ATTR/CALL
...
Acked-by: Jose Fonseca <jfonsec@vmware.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8823 >
2021-02-09 19:21:03 +00:00
Rhys Perry
e2608312d3
aco: remove loop to flag loop blocks as WQM
...
This is no longer necessary.
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/8446 >
2021-02-09 17:52:17 +00:00
Rhys Perry
ed020008b5
aco: rewrite setting of Exact_Branch
...
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/8446 >
2021-02-09 17:52:17 +00:00
Rhys Perry
f0074a6f05
aco: do not flag all blocks WQM to ensure we enter all nested loops in WQM
...
This should no longer be necessary since the mark_block_wqm() we use to
flag break conditions as WQM now adds block to the worklist. With them
added to the worklist, get_block_needs() will add WQM to block_needs.
Adding WQM to block_needs here without adding the block to the worklist
(like we do here) can cause issues because it does not ensure that the
predecessors' branches are in WQM (needed for it to be possible to
transition to WQM in the block). This happened in an Overwatch shader.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: 661922f6ac ("aco: add block to worklist in mark_block_wqm()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4066
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8446 >
2021-02-09 17:52:17 +00:00
Michel Dänzer
9f9441c231
ci: Append build image tag to LAVA tag used for minio path
...
This automatically ensures the LAVA kernel / device-tree / rootfs files
are updated along with the build image, so any relevant changes in the
latter are reflected in the former.
v2:
* Use the same definition of DISTRIBUTION_TAG in .lava-test:amd64 as in
kernel+rootfs_amd64
v3:
* Extend comment about $MESA_BASE_TAG in .lava-test:amd64 (Eric Anholt)
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7988 >
2021-02-09 17:28:37 +00:00
Michel Dänzer
7357bb6bb6
ci: Incorporate base image tag into dependent image tags
...
Using new .incorporate-base-tag+templates-commit & .set-image-base-tag
templates.
This automatically ensures dependent images get rebuilt along with the
base image, no more need to manually bump the dependent image tags.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7988 >
2021-02-09 17:28:37 +00:00
Michel Dänzer
7c3337d0bf
ci: Add and use .set-image template to construct docker image name
...
Instead of open-coding everywhere.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7988 >
2021-02-09 17:28:37 +00:00
Michel Dänzer
9bdbbf972d
ci: Move FDO_DISTRIBUTION_TAG assignment to template
...
This will be useful in more places later. Should have no functional
effect for now.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7988 >
2021-02-09 17:28:37 +00:00
Michel Dänzer
dfdfebc8cb
ci: Use MESA_IMAGE_TAG everywhere
...
Instead of just "TAG".
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7988 >
2021-02-09 17:28:37 +00:00
Michel Dänzer
ab7e1dff0b
ci: Use MESA_ namespace for image variables in Windows jobs
...
Instead of a separate WINDOWS_ namespace.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7988 >
2021-02-09 17:28:37 +00:00
Michel Dänzer
26d2ffeb20
ci: Set GALLIVM_PERF=nopt,no_filter_hacks for llvmpipe-gles2
...
Gives us 48 more passed tests, and possibly slightly shorter job times.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4986 >
2021-02-09 16:44:08 +00:00
Michel Dänzer
6e53e9df02
ci: Set GALLIVM_PERF=no_filter_hacks for llvmpipe-piglit-quick_gl
...
Gives us 13 more passed tests.
(GALLIVM_PERF=nopt breaks some tests here)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4986 >
2021-02-09 16:44:08 +00:00
Michel Dänzer
a8061d0384
ci: Set GALLIVM_PERF=no_filter_hacks for llvmpipe-piglit-quick_shader
...
Gives us 1 more passed test.
(GALLIVM_PERF=nopt breaks some tests here)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4986 >
2021-02-09 16:44:08 +00:00
Tomeu Vizoso
339817f2e7
ci: Disable two radeonsi jobs
...
The machine to which these boards are connected to is having trouble
keeping up when the rootfs are expanded. This is causing jobs to time
out and fail.
So as a mitigation measure reduce the load by disabling two of these
jobs until the root problem is solved.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8930 >
2021-02-09 14:48:46 +00:00
Leo Liu
e4decf6f39
radeon/vcn: enable dynamic dpb Tier2 support
...
On VCN3 with codec AV1 and VP9
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8916 >
2021-02-09 08:39:42 -05:00
Leo Liu
c7a481872e
radeon/vcn: implement dynamic dpb Tier2 support
...
Fill up the t2 message buffers based on reference lists, so to
avoid unnecessary allocation of the buffers.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8916 >
2021-02-09 08:39:42 -05:00
Leo Liu
905c103209
radeon/vcn: add dynamic dpb Tier2 message buffer interface
...
Tier2 will dynamically manange the dpb buffers, so that can
save even more VRAMs
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8916 >
2021-02-09 08:39:42 -05:00
Samuel Pitoiset
cc39225014
radv: fix printing the debug option names
...
radv_dump_enabled_options() doesn't like holes. While we are at it,
use ull everywhere.
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/8925 >
2021-02-09 13:09:24 +00:00
Rhys Perry
e8220e106b
aco: optimize AC_FETCH_FORMAT_SNORM alpha adjust
...
This looks like it was copied from LLVM, which didn't have a fmax
intrinsic.
fossil-db (GFX8):
Totals from 43 (0.03% of 140385) affected shaders:
CodeSize: 49660 -> 49488 (-0.35%)
Instrs: 10434 -> 10348 (-0.82%)
Cycles: 41736 -> 41392 (-0.82%)
VMEM: 13793 -> 13719 (-0.54%)
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/8918 >
2021-02-09 12:58:22 +00:00
Bas Nieuwenhuizen
bd7d8a77e9
radv: Fix vram override with fully visible VRAM.
...
Fixes: cf2eebdf4f ("radv,gallium: Add driconf option to reduce advertised VRAM size.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8915 >
2021-02-09 11:58:53 +00:00
Gert Wollny
eefb18e5fb
gallium/tgsi-to-nir: Take property NUM_CLIPDIST_ENABLED into account
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8919 >
2021-02-09 11:24:22 +00:00
Gert Wollny
055175d484
gallium/tgsi_to_nir: Handle SAMPLE_MASK output in FS
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8919 >
2021-02-09 11:24:22 +00:00
Samuel Pitoiset
96b03aaa17
radv: use the global BO list from the winsys
...
We had two different implements for the global BO list, one in RADV
and one in the winsys. This will also allow to make more BOs resident.
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/8868 >
2021-02-09 10:03:47 +00:00
Samuel Pitoiset
f6c28474a3
radv/winsys: enable the global BO list unconditionally
...
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/8868 >
2021-02-09 10:03:47 +00:00
Samuel Pitoiset
5b967ccf77
radv/winsys: add the resident BOs to the list of BOs at submit time
...
The number of resident BOs is currently 0.
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/8868 >
2021-02-09 10:03:47 +00:00
Samuel Pitoiset
afdbd71ba5
radv/winsys: add buffer_make_resident() to the API
...
To make a BO resident (or to evict one).
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/8868 >
2021-02-09 10:03:47 +00:00
Samuel Pitoiset
16abc82ef0
radv/winsys: set use_global_list to avoid adding a BO twice
...
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/8868 >
2021-02-09 10:03:47 +00:00
Samuel Pitoiset
3235ff5cf4
radv/winsys: move the debug_all_bos check outside of the add/del helpers
...
The add/del helpers will be used to implement the global BO list
directly in the winsys.
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/8868 >
2021-02-09 10:03:47 +00:00
Icecream95
5cc0d61088
pan/bi: Don't check liveness unless the index is valid
...
Otherwise we will read out-of-bounds when the index is ~0.
Fixes: b8f042c9bb ("pan/bi: Dead code eliminate per-channel")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8923 >
2021-02-09 20:40:46 +13:00
Arcady Goldmints-Orlov
9e1aa23448
v3dv: initialize render_fd at the top of physical_device_init
...
This fixes an uninitialized variable warning.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8902 >
2021-02-09 06:45:41 +00:00
Marek Olšák
df48267c65
gallium/u_tests: test no-op fragment shader instead of NULL fragment shader
...
radeonsi stopped supporting NULL fragment shaders. This makes the test pass.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8906 >
2021-02-09 02:37:50 +00:00
Marek Olšák
974c4a1700
tgsi_to_nir: translate FBFETCH
...
Tested by u_tests.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8906 >
2021-02-09 02:37:50 +00:00
Marek Olšák
81d923fa51
tgsi_to_nir: translate SAMPLEID
...
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8906 >
2021-02-09 02:37:50 +00:00
Ilia Mirkin
5088caa119
st/mesa: do scissored clears on depth/stencil as well when supported
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Tested-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8905 >
2021-02-08 18:39:20 -05:00
Mike Blumenkrantz
13f92183c7
zink: support nir_intrinsic_memory_barrier_buffer
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8884 >
2021-02-08 22:29:53 +00:00
Icecream95
27ad9fd5da
panfrost: Fix clear color packing for 12-byte formats
...
Make the case for 6 bytes the same as for 8 while we're at it.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8886 >
2021-02-08 18:41:57 +00:00
James Park
7008e6558a
radv: Update JSON generator if Windows
...
Use vulkan_radeon.dll, and apply current working directory.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8911 >
2021-02-08 16:22:10 +00:00
Ilia Mirkin
8930ecd3ce
nv50,nvc0: add scissored clear support
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8901 >
2021-02-08 15:47:47 +00:00
Ilia Mirkin
23340b959c
nv50: add PIPE_CAP_NIR_IMAGES_AS_DEREF to unsupported list
...
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8901 >
2021-02-08 15:47:47 +00:00
Pierre-Eric Pelloux-Prayer
ac2bcb9e3c
radeonsi: don't use cp_dma prefetch on GFX6
...
It's not supported.
Fixes: 47587758f2 ("radeonsi: prefetch VB descriptors right after uploading")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4211
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/8914 >
2021-02-08 15:03:25 +00:00
Caio Marcelo de Oliveira Filho
568a668259
spirv: Allow variable pointers pointing to an array of blocks
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Cc: mesa-stable
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8864 >
2021-02-08 14:37:25 +00:00
Tomeu Vizoso
6d2afe1c83
ci: Move out expect files from .gitlab-ci
...
This way, when such a file is modified only the affected driver gets
tested.
It also helps to declutter the .gitlab-ci directory.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8757 >
2021-02-08 14:19:06 +00:00
Tomeu Vizoso
e8246ad5f4
ci: Move container files into their own dir
...
To be more consistent and to declutter the .gitlab-ci dir.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Eric Anholt <eric@anholt.net >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Andres Gomez <agomez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8757 >
2021-02-08 14:19:06 +00:00
Tomeu Vizoso
a4cb96d12b
ci: Fix selection of linker in Android builds
...
Otherwise, Clang will error out when it doesn't link:
Compiler stderr:
clang: error: argument unused during compilation: '-fuse-ld=lld' [-Werror,-Wunused-command-line-argument]
When that happens when Meson is checking for the presence of macros in
sys/sysmacros.h, that file won't be included resulting in the following
errors:
ld.lld: error: undefined symbol: makedev
ld.lld: error: undefined symbol: major
ld.lld: error: undefined symbol: minor
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Acked-by: Eric Anholt <eric@anholt.net >
Gitlab: #4137
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8757 >
2021-02-08 14:19:06 +00:00
Alyssa Rosenzweig
4f4bb72745
pan/bi: Add nosched debug option
...
Forces a trivial schedule to replicate the old behaviour (for debugging
or benchmarking). Actually the new scheduler is still used, just highly
constrained; the net result should still do what's expected.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:30 +00:00
Alyssa Rosenzweig
ced55f0bcc
pan/bi: Remove older cube map lowering
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:30 +00:00
Alyssa Rosenzweig
1dd3ff51e8
pan/bi: Remove old FAU assignment code
...
Replaced by the scheduler.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:30 +00:00
Alyssa Rosenzweig
77933d16d8
pan/bi: Switch to new scheduler
...
Delete the old.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
f0c0082ab0
pan/bi: Schedule blocks
...
Replicate the pattern, greedily select clauses until we run out of
instructions.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
8fac99a7c0
pan/bi: Add constant modifier handling
...
Once we've merged the clauses' constants, we need to....
1. Swap where necessary so non-pcrel constants are correctly encoded.
2. Swap where necessary so pcrel constants are in canonical positions.
3. Force M1 values for pcrel constants and final single constants.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
c5742d9116
pan/bi: Add constant merging routines
...
These work as you would expect: first handling paired constants
(swapping to a canonical form to deduplicate), then handling unpaired
constants (packing together in a canonical form). Most of the added
complexity is from pcrel handling, but we impose strict invariants on
pcrel (no more than one PC-relative constant per clause, only M1=4 mode)
without which the algorithm would be even uglier.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
79dc2038a2
pan/bi: Add constant state constructor
...
Based on the tuple state's constants, satisfying the pcrel invariant we
impose.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
7aaaf9cfaf
pan/bi: Add constant to passthrough rewrite
...
Mimicks the one previously done at pack time, but designed for schedule
time instead.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
fc7770b1dd
pan/bi: Add trivial rewrite helpers
...
We need to do certain rewrites during scheduling before RA runs in order
to satsify scheduler post-conditions.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
66100895ff
pan/bi: Derive M0 from pcrel_idx while packing
...
Assumes the usual M1=4 mode.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
2096359cf9
pan/bi: Add pcrel_idx to bi_clause
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
649e45234f
pan/bi: Move bi_constant_field to bifrost.h
...
It's a hardware invariant, and useful for the scheduler (not just
packing).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
ee78628f78
pan/bi: Add bi_foreach_instr_and_src_in_tuple
...
Rather specialized but keeps down obnoxious indentation in scheduler
passes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
a8fce919d2
pan/bi: Extract bi_ec0_packed helper
...
Useful for scheduling decisions as well as packing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
4252fb84f4
pan/bi: Add passthrough register rewriting helper
...
Passthroughs are _required_ for correct scheduling, so we have to handle
this now. The legitimacy of using passthroughs is justified by the
constraint checks and verified with asserts at pack time.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
09c5d4ce18
pan/bi: Destructively schedule a single instruction
...
Wrapper to select the best legal instruction, pop it off the worklist,
update the clause/tuple states, and return it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
63271dca9a
pan/bi: Choose instructions to schedule
...
In the future we'll want a heuristic minimizing register pressure but
for in-order this will suffice.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
a303076c1a
pan/bi: Add bi_instr_schedulable predicate
...
Using the previously defined checks for architectural scheduling
constraints, define one top-level predicate to check if an instruction
on the worklist is ready for scheduling.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
2537a53d5c
pan/bi: Add writes_reg predicate
...
ATEST is a bit of a wrinkle in this, so let's keep it in one place.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
fb27baa35a
pan/bi: Add T0/T1 constraint check
...
Not visible on real shaders yet, but it will be when we schedule
out-of-order (or implement 64-bit multiplication).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
0349181e40
pan/bi: Validate reads_t
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
3f1cda5284
pan/bi: Add bi_count_succ_reads helper
...
The number of register writes in a tuple must be bounded by a number
based on the number of register reads in the succeeding tuple, since
writes and reads are interleaved. This helper calculates that number of
reads, noting that not every read actually counts - if the preceding
tuple writes to a read source, that will become a temporary instead of
consuming a register slot.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
06bde2cc31
pan/bi: Add bi_tuple_is_new_src
...
To determine the number of register reads in a tuple (which must be
bounded by 3, or 5 if you force writes), we need to count "new" sources:
those that are not already in a partially scheduled tuple.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
93c82c6fac
pan/bi: Add FAU update helper
...
This comes in destructive and nondestructive flavours, to be used to
insert an instruction into a tuple and check if an instruction is
insertable respectively. It is responsible for FAU slot matching.
It's annoying this sort of logic is duplicated in 3 places
(bi_lower_fau, here, and packing) but they each work with different sets
of assumptions...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
e5607c8745
pan/bi: Add constant count estimates to scheduler
...
Needed to satisfy max constant constaints. These aren't precise but
they should be a good enough approximation for now.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
eb7e363688
pan/bi: Stub worklist routines
...
In the near future we'll schedule out-of-order via a dependendency graph
and worklist. For now, emulate in-order operation.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
3ddff0fa8b
pan/bi: Flatten block lists
...
From Midgard scheduler.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
39406571ec
pan/bi: Add cubeface lowering
...
For the new schedule infrastructure. This supports multiple tuples per
clause, unlike the old hack lowering.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
7b4ab7bd2a
pan/bi: Add scheduler data structures
...
To satisfy the numerous architectural scheduler constraints, quite a bit
of state is required per-tuple, per-clause, and per-block. These data
structures allow maintaining this state separate from the main IR
data structures, allowing for partial constructions and nondestructive
operations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
07a3ccfbed
pan/bi: Include ATEST datum in the instruction
...
Rather than doing this at pack time like before, or adding extra
constraints to the already overcomplicated scheduler, let's just include
it like a regular FAU source.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
b8f042c9bb
pan/bi: Dead code eliminate per-channel
...
We already track the full liveness so this is a trivial optimization,
with an especial win for shaders reading only a subset of components of
gl_FragCoord.
More importantly, it's required for proper scheduling (in soft mode)
when vectors are used and some (but not all components) are promoted to
temporary registers.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
08d98290fe
pan/bi: Cleanup terminal block check
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
4a27f8887d
pan/bi: Print program size in shader-db
...
Less critical than other metrics, but still matters for instruction
cache hit rate, and worth being aware of.
And, fine, it makes the scheduler look like a bigger win on another
axis.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Icecream95
6ecce71f71
pan/bi: Fix shader prefetch size
...
The prefetch buffer size is larger than first thought, but includes
the final clause, so subtract the size of the final clause from the
prefetch size.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Icecream95
b5ab019b5a
pan/bi: Return the size of the last clause from bi_pack
...
Will be used for calculating prefetch size.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354 >
2021-02-08 14:07:29 +00:00
Alyssa Rosenzweig
b5c79e6d9f
pan/bi: Lower transcendentals on G71
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
c4f26d12f9
pan/bi: Lower FP32 transcendentals where required
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
3aadebf4a8
pan/bi: Fix bi quirks detection
...
There is no Bifrost v8...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
0219ecbfa0
pan/bi: Rename NO_FP32_TRANSCENDENTALS quirk
...
Make it more obvious what the issue is. "_FAST" is not a suffix on
Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
0bdd4cbb57
pan/bi: Lower flog2 to a table and polynomial
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
d4c028f770
pan/bi: Lower FEXP2 with a table
...
Connor's code, not the blob's, amusingly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
10b1f26687
pan/bi: Lower frsq to Newton-Raphson
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
c5e5d11599
pan/bi: Lower frcp to Newton-Raphson
...
For G71 but should work on any Bifrost, probably overlaps some CL stuff.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
94fed29680
pan/bi: Fix FLOG_TABLE modifier handling
...
These should not be in a union together.
[Note: this does not need to be backported, since the affected
instruction is not emitted under any circumstances in the stable
branches]
Fixes: dd11e5076e ("pan/bi: Add new bi_instr data structure")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Alyssa Rosenzweig
9157cf8124
pan/bi: Add bi_fmul_f32 convenience method
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8894 >
2021-02-08 13:55:12 +00:00
Iago Toral Quiroga
8eeb61a3bf
v3dv: add a perf trace when a device is created with robust buffer access
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8913 >
2021-02-08 13:00:16 +00:00
Iago Toral Quiroga
e6f8202749
v3dv: serialize pipeline compilation when debugging shaders
...
It is possible to compile pipelines in multiple threads, but when we
are dumping debug information for shaders, we want all the outputs
serialized so we can make sense of it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8913 >
2021-02-08 13:00:16 +00:00
Iago Toral Quiroga
44dcc4c24d
v3d/common: use spaces instead of TABs
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8913 >
2021-02-08 13:00:16 +00:00
Erik Faye-Lund
ae8f9584f4
CI: always expose docs artifacts
...
This makes it easier to preview docs changes in merge-requests. Also
make sure we build the docs right away, rather than waiting for when
marge merges. This allows us to see the artifacts right away.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8398 >
2021-02-08 11:39:10 +00:00
Samuel Pitoiset
6ac6e2fbfb
radv: stop using VM_ALWAYS_VALID on APUs
...
It seems that VM_ALWAYS_VALID means that all BOs must fit in
memory (VRAM+GTT) for each submission. This is causing a lot of
troubles when the total allocated memory is greater than the
available memory, especially on APUs.
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/8779 >
2021-02-08 11:24:25 +00:00
Samuel Pitoiset
6a3de3a31f
radv: add radeon_winsys_bo::use_global_list
...
This will allow us to use the global BO list even without
RADEON_FLAG_PREFER_LOCAL_BO which can cause a lot of troubles
on APUs.
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/8779 >
2021-02-08 11:24:25 +00:00
Karol Herbst
263bd5e6fd
nouveau: print warning about unhandled cap only once
...
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/8831 >
2021-02-08 10:52:32 +00:00
Samuel Pitoiset
0e00c4ea33
radv: use less AMDGPU contexts by creating only one per queue priority
...
It should be more efficient. Suggested by Bas.
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/8878 >
2021-02-08 08:48:21 +00:00
Samuel Pitoiset
e498f25ff4
radv/winsys: stop zeroing radv_amdgpu_cs_request
...
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/8859 >
2021-02-08 08:45:49 +01:00
Samuel Pitoiset
abb3fab7c6
radv/winsys: remove unused fields in radv_amdgpu_cs_request
...
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/8859 >
2021-02-08 08:45:47 +01:00
Samuel Pitoiset
0856f559a9
radv/winsys: simplify the user fence logic for submission
...
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/8859 >
2021-02-08 08:45:46 +01:00
Samuel Pitoiset
05c383f948
radv/winsys: remove unused radeon_bo_usage enum
...
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/8859 >
2021-02-08 08:45:44 +01:00
Samuel Pitoiset
a6104ff053
radv/winsys: remove useless is_local check in radv_amdgpu_cs_add_buffer()
...
radv_cs_add_buffer() already guarantees that and virtual buffers
are added via radv_amdgpu_cs_add_virtual_buffer().
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/8859 >
2021-02-08 08:45:42 +01:00
Samuel Pitoiset
856775400d
radv/winsys: remove useless continue preamble CS for IBs path
...
It's only used for the sysmem path which is GFX6.
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/8859 >
2021-02-08 08:45:40 +01:00
Samuel Pitoiset
e02b1577d0
radv/winsys: remove the radv_amdgpu_winsys_bo::ws indirection
...
This saves a 64-bit pointer from radv_amdgpu_winsys_bo and it's
also common to pass a winsys pointer as the first parameter.
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/8859 >
2021-02-08 08:45:38 +01:00
Samuel Pitoiset
eb625b7a5f
radv/winsys: use an array for the global BO list instead of a list
...
This allows to remove one 64-bit pointer from radv_amdgpu_winsys_bo.
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/8859 >
2021-02-08 08:45:36 +01:00
Arcady Goldmints-Orlov
0b29a8a206
Revert "broadcom/compiler: improve generation of if conditions"
...
This reverts commit 93f8f83a95 .
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8903 >
2021-02-08 06:52:59 +00:00
Eric Anholt
e91e1b45cb
ci/freedreno: Run a3xx gles3 in parallel and increase coverage.
...
It seems that recent fixes have made its results stable (other than
existing flakiness in texturegrad), so we can use all the CPUs and a
couple more boards and get more coverage.
Acked-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8787 >
2021-02-07 21:48:56 -08:00
Eric Anholt
ec9d56c3fa
ci/freedreno: bump VK coverage to 1/4 of the CTS.
...
With the runner fixes, we were down to 2 minutes of boot time and 2
minutes of CTS time for a total of 4 minutes. We've got plenty of time
budget now to increase our coverage.
Acked-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8787 >
2021-02-07 21:48:54 -08:00
Eric Anholt
48dd9b7e34
ci/deqp: Bump runner to 0.5.1 for recent runtime perf improvements.
...
3 commits in 0.5.0:
- 20-40s savings on many of our CI runs by dropping the clever test size
scaling code.
- Even bigger savings (especially on deqp-vk runs) by increasing maximuim
test group size (~1/4 of runtime was spawning deqp on cheza, that cost
is cut by ~75%)
- No more needing to manually set MESA_DEBUG=silent
2 commits in 0.5.1:
- Fixed automatic thread pool sizing to keep all CPUs busy (thanks for
catching that Bas!).
- Automatically size down test groups on short test lists and many CPUs,
so split the list evenly between CPUs (such as on freedreno -options
jobs).
Acked-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8787 >
2021-02-07 21:42:39 -08:00
Ian Romanick
ed138f2861
nir/algebraic: Partially revert 3f782cdd25
...
I'm not sure what the logic was, but there is no opportunity for
anything to flush to zero here. 'a' is a Boolean value, and b2f
produces 1.0 or 0.0.
This was originally part of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3765/ .
Reviewed-by: Matt Turner <mattst88@gmail.com >
Cc: Andres Gomez <agomez@igalia.com >
Cc: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Cc: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8910 >
2021-02-07 18:31:01 -08:00
Ian Romanick
5923742356
nir/algebraic: add patterns for a >> #b << #b and a << #b >> #b
...
Commit 5476d18183 ("nir/algebraic: add patterns for a >> #b << #b")
added the ushr version, but it missed the ishr. A bunch of compute
shaders with stores to shared storage generate the ishr pattern.
Enabling this optimization also enables the iadd/iand reassociation
(right after this hunk), and that enables merging of stores to shared
storage. A couple shaders have spills and fills hurt on some
platforms. These all occur in shaders that also have SENDs helped.
On Gen9 and Gen11, the helped SENDs more than makes up for the extra
spills and fills.
On Gen7 and Gen8, it's not as clear. All of the shaders affected are
compute shaders in DiRT Rally 2 or Bioshock Inifinite. The most
affected Bioshock shader on Broadwell looks like:
Before: CS SIMD8 shader: 1335 inst, 0 loops, 22411 cycles, 42:36 spills:fills, 159 sends, scheduled with mode lifo, Promoted 2 constants, compacted 21360 to 16528 bytes.
After: CS SIMD8 shader: 1175 inst, 0 loops, 25916 cycles, 96:135 spills:fills, 72 sends, scheduled with mode lifo, Promoted 2 constants, compacted 18800 to 13648 bytes.
The results on Haswell and Ivy Bridge are similar. Given that there
are only 2 promoted constants, MR !7698 won't have any effect.
There were no statistically significant changes on Gen9+ in Bioshock in
our performance CI. Gen8 isn't in that CI, and DiRT Showdown 2 is also
not included in that CI. It is possible that these shaders aren't used
in the settings or demos used in the CI.
The other pattern, which switches the order of the shifts, only helps a
couple shaders. If I wasn't already adding another pattern, I
definitely wouldn't bother with that one.
v2: s/ishr/ushr/ in the replacement for the ushr pattern. Noticed by
Rhys.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Tiger Lake
total instructions in shared programs: 21052760 -> 21049269 (-0.02%)
instructions in affected programs: 59497 -> 56006 (-5.87%)
helped: 46
HURT: 0
helped stats (abs) min: 2 max: 552 x̄: 75.89 x̃: 53
helped stats (rel) min: 0.28% max: 43.43% x̄: 5.87% x̃: 4.10%
95% mean confidence interval for instructions value: -108.96 -42.82
95% mean confidence interval for instructions %-change: -8.38% -3.35%
Instructions are helped.
total cycles in shared programs: 855229761 -> 855148518 (<.01%)
cycles in affected programs: 8491373 -> 8410130 (-0.96%)
helped: 33
HURT: 15
helped stats (abs) min: 42 max: 26940 x̄: 6200.70 x̃: 4329
helped stats (rel) min: 0.09% max: 38.78% x̄: 7.97% x̃: 4.29%
HURT stats (abs) min: 2 max: 18132 x̄: 8225.33 x̃: 7288
HURT stats (rel) min: <.01% max: 13.37% x̄: 5.72% x̃: 4.53%
95% mean confidence interval for cycles value: -4331.52 946.40
95% mean confidence interval for cycles %-change: -6.78% -0.61%
Inconclusive result (value mean confidence interval includes 0).
total sends in shared programs: 989947 -> 989694 (-0.03%)
sends in affected programs: 523 -> 270 (-48.37%)
helped: 5
HURT: 0
helped stats (abs) min: 9 max: 87 x̄: 50.60 x̃: 37
helped stats (rel) min: 25.71% max: 54.72% x̄: 43.49% x̃: 42.53%
95% mean confidence interval for sends value: -93.95 -7.25
95% mean confidence interval for sends %-change: -58.48% -28.50%
Sends are helped.
Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20033498 -> 20030552 (-0.01%)
instructions in affected programs: 59220 -> 56274 (-4.97%)
helped: 48
HURT: 0
helped stats (abs) min: 1 max: 465 x̄: 61.38 x̃: 39
helped stats (rel) min: 0.03% max: 42.27% x̄: 5.19% x̃: 3.90%
95% mean confidence interval for instructions value: -89.57 -33.18
95% mean confidence interval for instructions %-change: -7.49% -2.89%
Instructions are helped.
total cycles in shared programs: 979993675 -> 979840773 (-0.02%)
cycles in affected programs: 6738454 -> 6585552 (-2.27%)
helped: 46
HURT: 0
helped stats (abs) min: 42 max: 6265 x̄: 3323.96 x̃: 3579
helped stats (rel) min: 0.09% max: 37.38% x̄: 4.34% x̃: 2.39%
95% mean confidence interval for cycles value: -3664.70 -2983.21
95% mean confidence interval for cycles %-change: -6.63% -2.06%
Cycles are helped.
total spills in shared programs: 10659 -> 10661 (0.02%)
spills in affected programs: 36 -> 38 (5.56%)
helped: 1
HURT: 1
total fills in shared programs: 11551 -> 11551 (0.00%)
fills in affected programs: 70 -> 70 (0.00%)
helped: 1
HURT: 1
total sends in shared programs: 1032117 -> 1031785 (-0.03%)
sends in affected programs: 711 -> 379 (-46.69%)
helped: 5
HURT: 0
helped stats (abs) min: 18 max: 87 x̄: 66.40 x̃: 74
helped stats (rel) min: 27.69% max: 54.72% x̄: 44.49% x̃: 44.31%
95% mean confidence interval for sends value: -101.79 -31.01
95% mean confidence interval for sends %-change: -58.42% -30.55%
Sends are helped.
Broadwell
total instructions in shared programs: 17865005 -> 17862757 (-0.01%)
instructions in affected programs: 66438 -> 64190 (-3.38%)
helped: 49
HURT: 0
helped stats (abs) min: 1 max: 266 x̄: 45.88 x̃: 39
helped stats (rel) min: 0.03% max: 11.99% x̄: 3.73% x̃: 3.92%
95% mean confidence interval for instructions value: -59.15 -32.61
95% mean confidence interval for instructions %-change: -4.35% -3.12%
Instructions are helped.
total cycles in shared programs: 1031298803 -> 1031219023 (<.01%)
cycles in affected programs: 7253602 -> 7173822 (-1.10%)
helped: 45
HURT: 2
helped stats (abs) min: 18 max: 7828 x̄: 1928.33 x̃: 1918
helped stats (rel) min: <.01% max: 10.51% x̄: 1.58% x̃: 1.31%
HURT stats (abs) min: 3490 max: 3505 x̄: 3497.50 x̃: 3497
HURT stats (rel) min: 15.56% max: 15.64% x̄: 15.60% x̃: 15.60%
95% mean confidence interval for cycles value: -2174.88 -1220.01
95% mean confidence interval for cycles %-change: -2.00% 0.30%
Inconclusive result (%-change mean confidence interval includes 0).
total spills in shared programs: 20799 -> 20924 (0.60%)
spills in affected programs: 843 -> 968 (14.83%)
helped: 0
HURT: 4
total fills in shared programs: 27110 -> 27334 (0.83%)
fills in affected programs: 1824 -> 2048 (12.28%)
helped: 1
HURT: 4
total sends in shared programs: 1017935 -> 1017603 (-0.03%)
sends in affected programs: 711 -> 379 (-46.69%)
helped: 5
HURT: 0
helped stats (abs) min: 18 max: 87 x̄: 66.40 x̃: 74
helped stats (rel) min: 27.69% max: 54.72% x̄: 44.49% x̃: 44.31%
95% mean confidence interval for sends value: -101.79 -31.01
95% mean confidence interval for sends %-change: -58.42% -30.55%
Sends are helped.
Haswell and Ivy Bridge had similar results. (Haswell shown)
total instructions in shared programs: 16397496 -> 16395411 (-0.01%)
instructions in affected programs: 59384 -> 57299 (-3.51%)
helped: 49
HURT: 0
helped stats (abs) min: 1 max: 208 x̄: 42.55 x̃: 39
helped stats (rel) min: 0.03% max: 8.18% x̄: 3.74% x̃: 3.91%
95% mean confidence interval for instructions value: -53.59 -31.51
95% mean confidence interval for instructions %-change: -4.24% -3.23%
Instructions are helped.
total cycles in shared programs: 1035483504 -> 1035397592 (<.01%)
cycles in affected programs: 9379739 -> 9293827 (-0.92%)
helped: 45
HURT: 4
helped stats (abs) min: 10 max: 5600 x̄: 2164.51 x̃: 2350
helped stats (rel) min: <.01% max: 11.61% x̄: 1.93% x̃: 1.56%
HURT stats (abs) min: 2 max: 5756 x̄: 2872.75 x̃: 2866
HURT stats (rel) min: <.01% max: 24.65% x̄: 12.29% x̃: 12.26%
95% mean confidence interval for cycles value: -2293.06 -1213.56
95% mean confidence interval for cycles %-change: -2.42% 0.88%
Inconclusive result (%-change mean confidence interval includes 0).
total spills in shared programs: 17672 -> 17803 (0.74%)
spills in affected programs: 364 -> 495 (35.99%)
helped: 2
HURT: 2
total fills in shared programs: 20752 -> 20937 (0.89%)
fills in affected programs: 656 -> 841 (28.20%)
helped: 2
HURT: 2
total sends in shared programs: 1044703 -> 1044450 (-0.02%)
sends in affected programs: 523 -> 270 (-48.37%)
helped: 5
HURT: 0
helped stats (abs) min: 9 max: 87 x̄: 50.60 x̃: 37
helped stats (rel) min: 25.71% max: 54.72% x̄: 43.49% x̃: 42.53%
95% mean confidence interval for sends value: -93.95 -7.25
95% mean confidence interval for sends %-change: -58.48% -28.50%
Sends are helped.
No changes on Gen6 or earlier GPUs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8852 >
2021-02-08 00:25:22 +00:00
Ian Romanick
6b0443a900
nir/algebraic: Fix a >> #b << #b for sizes other than 32-bit
...
The base mask previously used was 0xffffffff. This is not correct (but
should still work) for 16-bit and 8-bit values, but it means the high
32-bits of 64-bit values will get chopped off.
Instead of just restricting the pattern to 32-bits (as was done before
00b28a50b2 ), this extends the optimization in two ways:
1. Make it correct for other bit sizes.
2. Make it work for arbitrary shift counts.
This has the added benefit of reducing the number of patterns actually
added (7 previously, 4 now).
The "Reassociate for improved CSE" part is just reverted to its
pre-00b28a50b2c behavior. I doubt that pattern is likely to have much
impact outside 32-bits.
This change fixes the piglit tests
tests/spec/arb_gpu_shader_int64/fs-shl-of-shr-int64.shader_test and
tests/spec/arb_gpu_shader_int64/fs-iand-of-iadd-int64.shader_test.
All of the shaders helped in shader-db are vertex shaders on platforms
with vector-oriented vertex processing. The shaders contain ((x >> 16)
<< 16). These platforms set lower_extract_word, so the optimization
that transforms (x >> 16) to extract_u16 doesn't trigger. With only ~60
shaders involved, I didn't bother trying to add extract_XYZ versions of
these patterns to try to get those cases.
Fixes: 00b28a50b2 ("nir/algebraic: trivially enable existing 32-bit patterns for all bit sizes")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Haswell and earlier Intel GPUs had simlar results. (Haswell shown)
total instructions in shared programs: 16397554 -> 16397496 (<.01%)
instructions in affected programs: 7961 -> 7903 (-0.73%)
helped: 58
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.36% max: 1.89% x̄: 0.99% x̃: 0.78%
95% mean confidence interval for instructions value: -1.00 -1.00
95% mean confidence interval for instructions %-change: -1.13% -0.85%
Instructions are helped.
total cycles in shared programs: 1035483770 -> 1035483504 (<.01%)
cycles in affected programs: 75922 -> 75656 (-0.35%)
helped: 44
HURT: 2
helped stats (abs) min: 2 max: 12 x̄: 6.14 x̃: 2
helped stats (rel) min: 0.05% max: 1.67% x̄: 0.87% x̃: 0.72%
HURT stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel) min: 0.06% max: 0.06% x̄: 0.06% x̃: 0.06%
95% mean confidence interval for cycles value: -7.28 -4.29
95% mean confidence interval for cycles %-change: -1.03% -0.63%
Cycles are helped.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8852 >
2021-02-08 00:25:22 +00:00
Mike Blumenkrantz
84821964eb
zink: force 4 component formats for samplerview/render textures
...
this fixes a bunch of issues with 3-component formats, which aren't supported
for various operations on certain drivers
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8697 >
2021-02-07 23:16:27 +00:00
Mauro Rossi
b45c8a8671
android: radv: fix building error in radv_android.c
...
Fixes the following building error:
external/mesa/src/amd/vulkan/radv_android.c:752:77: error: too few arguments to function call, expected 4, have 3
VkResult result = radv_image_create_layout(device, create_info, mem->image);
~~~~~~~~~~~~~~~~~~~~~~~~ ^
external/mesa/src/amd/vulkan/radv_private.h:2175:1: note: 'radv_image_create_layout' declared here
VkResult
^
1 error generated.
Fixes: 7f7da82dbb ("radv: Add image layout with drm format modifiers.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8899 >
2021-02-07 21:47:37 +01:00
Mauro Rossi
ecdef27117
android: radv: port to using common dispatch code.
...
Fixes the following building error in Android:
FAILED: ninja: 'external/mesa/src/amd/vulkan/radv_entrypoints_gen.py',
needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_radv_common_intermediates/radv_entrypoints.c',
missing and no known rule to make it
Fixes: 23f8ca0c9d ("radv: port to using common dispatch code.")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8899 >
2021-02-07 21:47:37 +01:00
Simon Ser
a4c11385b7
nouveau/nv50: fix linear buffer alignment for scan-out/cursors
...
The hardware can only scan-out linear buffers with a pitch
aligned to 256. It can only use packed buffers for cursors.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8500 >
2021-02-07 18:44:42 +01:00
Simon Ser
6650c53e64
nouveau/nvc0: fix linear buffer alignment for scan-out/cursors
...
The hardware can only scan-out linear buffers with a pitch
aligned to 256. It can only use packed buffers for cursors.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/36
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8500 >
2021-02-07 18:44:33 +01:00
Ilia Mirkin
92f12952f3
nouveau: reinstate fencing on screen destroy
...
As it turns out, the wait is required as the driver expects for
rendering to be quiesced on exit. This can trigger channel failures,
which in turn trigger recovery. This can fail and destroy the whole
system.
Fixes: 28a781323f ("nouveau: change fence destruction logic on screen destroy")
References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4223
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8867 >
2021-02-06 23:04:35 +00:00
Ilia Mirkin
0464117ad9
ci: remove nouveau from shader-db runs
...
This is needed since we're about to reinstate the fencing mechanism on
screen destruction. Until we figure out another way to handle it, this
will cause hangs on exit with the shim.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Cc: mesa-stable # 21.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8867 >
2021-02-06 23:04:35 +00:00
Bas Nieuwenhuizen
862b6a9a97
radv: Improve spilling on discrete GPUs.
...
The linked bug gets better performance and I personally verified
better spilling performance on HZD so let us make this step for now.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3183
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3698
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6833 >
2021-02-06 21:52:10 +00:00
Mauro Rossi
8a9162c85a
android: iris: implement iris layer of INTEL_MEASURE
...
Fixes the following building errors in Android:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: _iris_measure_snapshot
ld.lld: error: undefined symbol: iris_init_batch_measure
ld.lld: error: undefined symbol: iris_measure_batch_end
ld.lld: error: undefined symbol: iris_destroy_batch_measure
ld.lld: error: undefined symbol: iris_destroy_ctx_measure
ld.lld: error: undefined symbol: iris_measure_frame_end
ld.lld: error: undefined symbol: iris_destroy_screen_measure
ld.lld: error: undefined symbol: iris_init_screen_measure
Fixes: e67b8f504b ("iris: implement iris layer of INTEL_MEASURE")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8887 >
2021-02-06 11:06:20 +01:00
Mauro Rossi
5445e28749
android: anv: implement anv layer of INTEL_MEASURE
...
Fixes the following building errors in Android:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.android-x86_intermediates/LINKED/vulkan.android-x86.so
...
ld.lld: error: undefined symbol: _anv_measure_add_secondary
ld.lld: error: undefined symbol: anv_measure_init
ld.lld: error: undefined symbol: anv_measure_destroy
ld.lld: error: undefined symbol: anv_measure_reset
ld.lld: error: undefined symbol: anv_measure_device_destroy
ld.lld: error: undefined symbol: anv_measure_device_init
ld.lld: error: undefined symbol: _anv_measure_submit
ld.lld: error: undefined symbol: anv_measure_acquire
ld.lld: error: undefined symbol: _anv_measure_snapshot
ld.lld: error: undefined symbol: _anv_measure_endcommandbuffer
ld.lld: error: undefined symbol: _anv_measure_beginrenderpass
Fixes: 4a2d9e44ff ("anv: implement anv layer of INTEL_MEASURE")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8887 >
2021-02-06 11:06:17 +01:00
Mauro Rossi
9664bb1f3b
android: intel: Print GPU timing data based on INTEL_MEASURE
...
Fixes the following building errors in Android:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.android-x86_intermediates/LINKED/vulkan.android-x86.so
...
ld.lld: error: undefined symbol: intel_measure_init
ld.lld: error: undefined symbol: intel_measure_state_changed
ld.lld: error: undefined symbol: intel_measure_snapshot_string
ld.lld: error: undefined symbol: intel_measure_gather
ld.lld: error: undefined symbol: intel_measure_frame_transition
Fixes: 0f4143ec37 ("intel: Print GPU timing data based on INTEL_MEASURE")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8887 >
2021-02-06 11:06:13 +01:00
Marek Olšák
e5fc8a28dc
winsys/amdgpu: try not to skip any code with RADEON_NOOP=1 to test CPU perf
...
This enables more accurate estimation of the maximum achievable CPU-bound
performance.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
ccaad7d844
winsys/amdgpu: don't set unused usage for backing BOs of sparse BOs
...
This is never used.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
7d76b912bc
winsys/amdgpu: don't inc/dec num_active_ioctls for backing BOs of sparse BOs
...
It's not correct.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
77d111fcbf
winsys/amdgpu: move amdgpu_winsys_bo::use_reusable_pool to the u.real union
...
It's never true with slab and sparse buffers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
04f02e573c
winsys/amdgpu: move amdgpu_winsys_bo::is_user_ptr to the u.real union
...
It's never true with slab and sparse buffers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
96c188d023
winsys/amdgpu: move amdgpu_winsys_bo::is_shared to the u.real union
...
It's never true with slab and sparse buffers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:23 +00:00
Marek Olšák
4bb9df366a
winsys/amdgpu: move amdgpu_winsys_bo::cpu_ptr into the u.real union
...
It's never used with slab and sparse buffers.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:22 +00:00
Marek Olšák
c3778b8fe1
winsys/amdgpu: pack amdgpu_winsys_bo::is_shared and protect it by a mutex
...
The initialization of abs_timeout fixes a warning that started appearing
with this commit.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:22 +00:00
Marek Olšák
ff311df6b5
winsys/amdgpu: remove amdgpu_winsys_bo::num_cs_references to remove atomics
...
This decreases the CPU time percentage of amdgpu_cs_add_buffer by 50%
on Ryzen 3900X.
We don't need to call amdgpu_bo_is_referenced_by_any_cs
in amdgpu_bo_can_reclaim. The reclaim function is only called for buffers
that have 0 references.
The only downside is that amdgpu_bo_is_referenced_by_cs might be slower
in some very rare cases. Overall the driver overhead is better.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:22 +00:00
Marek Olšák
06b9dedfd9
winsys/amdgpu: optimize out conditionals in amdgpu_lookup_buffer
...
Move them to a wrapper function.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8849 >
2021-02-06 05:41:22 +00:00
Chia-I Wu
c9bc23d27a
targets/libgl-xlib: add support for virgl
...
This allows testing virgl over vtest by setting GALLIUM_DRIVER=virpipe
when the X server uses a proprietary driver.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Tested-by: John Bates <jbates@chromium.org >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8888 >
2021-02-06 05:08:03 +00:00
Vinson Lee
75c7e4b2f8
virgl: Convert errno to string.
...
Fix defect reported by Coverity Scan.
Invalid type in argument to printf format specifier (PRINTF_ARGS)
invalid_type: Argument *__errno_location() to format specifier %s was expected to have type char * but has type int.
Fixes: d37124b065 ("virgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8874 >
2021-02-05 19:07:31 -08:00
Mike Blumenkrantz
09ce403b2d
radv: zero the bo descriptor array when allocating a new set
...
this must be reset to avoid issues when using VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT
when some descriptors in the set may not have been bound
fixes #4219
Fixes: 126d5adb11 ("radv: Use host memory pool for non-freeable descriptors.")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8840 >
2021-02-05 21:02:17 -05:00
Mike Blumenkrantz
2f534c2e2e
radv: null bo list pointer for null descriptors on update
...
failing to unset any existing pointers here leads to stale bo entries in
the list and then the kernel rejecting the cmdbuf with ENOENT
Fixes: 126d5adb11 ("radv: Use host memory pool for non-freeable descriptors.")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8840 >
2021-02-05 21:02:17 -05:00
Ilia Mirkin
021bc4f868
nv50,nvc0: clear internal vbo masks based on the trailing slots
...
Fixes: 0278d1fa32 (gallium: add unbind_num_trailing_slots to set_vertex_buffers)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8882 >
2021-02-05 21:37:51 +00:00
Alyssa Rosenzweig
eff837c7c2
pan/bi: Implement ACMPXCHG
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848 >
2021-02-05 17:49:44 +00:00
Alyssa Rosenzweig
d400d5e150
pan/bi: Implement AXCHG
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848 >
2021-02-05 17:49:44 +00:00
Alyssa Rosenzweig
b0a2a0af75
pan/bi: Respect side effects in DCE
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848 >
2021-02-05 17:49:44 +00:00
Alyssa Rosenzweig
f5709f17a2
pan/bi: Add side_effects helper
...
DCE needs to be tuned for this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848 >
2021-02-05 17:49:44 +00:00
Alyssa Rosenzweig
836c1c6fb1
pan/bi: Fix NULL deref with empty shader
...
Fixes regression in dEQP-GLES31.functional.compute.basic.empty
Fixes: d0902aa2d4 ("pan/bi: Pass through wait_{6, 7} flags")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848 >
2021-02-05 17:49:44 +00:00
Boris Brezillon
855e29cd78
pan/bi: Make sure we never branch to an non-existing clause
...
Branch instructions can point to the last shader block, which might be
empty. In this case, the branch points to a clause that doesn't exists,
leading to INVALID_ENC faults when the GPU tries to jump to this clause.
Check if the block is a terminal block before updating the branch
offset: jumping/branching to NULL is equivalent to a shader termination,
so the default value of 0 works just fine for terminal branches.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848 >
2021-02-05 17:49:44 +00:00
Boris Brezillon
dbce99a809
pan/bi: Add an is_terminal_block() helper
...
Needed to decide what to do with JUMPs/BRANCHes to such blocks.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848 >
2021-02-05 17:49:44 +00:00
Michel Dänzer
c391c32af2
ci: Update to newer ci-fairy
...
To get the fix for
https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/29 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8690 >
2021-02-05 17:17:59 +00:00
Michel Dänzer
366fb28dac
ci: Fix MESA_TEMPLATES_COMMIT value
...
The intention was to set it to the commit used for debian.yml, but I
accidentally set it to the ci-fairy.yml commit instead.
v2:
* While we're at it, put two dashes between the base tag and the
ci-templates commit hash, making them easier to tell apart.
v3:
* While we're at it, fix the year of some recently bumped tags.
Fixes: 48f78dfd1a "ci: Define global variable MESA_TEMPLATES_COMMIT
for ci-templates commit"
Reviewed-by: Eric Anholt <eric@anholt.net > # v2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8690 >
2021-02-05 17:17:59 +00:00
Rhys Perry
d1f93261b1
aco: always set exec_live=false
...
Register demand calculation for exec masks doesn't always match
get_live_changes() and get_temp_registers(). For now, just set
exec_live=false.
fossil-db (GFX10.3):
Totals from 108230 (77.64% of 139391) affected shaders:
SGPRs: 5759658 -> 5756818 (-0.05%); split: -0.08%, +0.03%
VGPRs: 4061104 -> 4061248 (+0.00%); split: -0.00%, +0.01%
SpillSGPRs: 14114 -> 15198 (+7.68%); split: -0.10%, +7.78%
CodeSize: 266548396 -> 266603288 (+0.02%); split: -0.01%, +0.03%
MaxWaves: 1390885 -> 1390855 (-0.00%); split: +0.00%, -0.00%
Instrs: 50983353 -> 50992972 (+0.02%); split: -0.02%, +0.04%
Cycles: 1733042048 -> 1735443264 (+0.14%); split: -0.02%, +0.16%
VMEM: 41933625 -> 41914722 (-0.05%); split: +0.04%, -0.09%
SMEM: 7197675 -> 7197789 (+0.00%); split: +0.16%, -0.16%
VClause: 1050885 -> 1050978 (+0.01%); split: -0.02%, +0.03%
SClause: 2074913 -> 2071844 (-0.15%); split: -0.23%, +0.08%
Copies: 3181464 -> 3188125 (+0.21%); split: -0.38%, +0.59%
Branches: 1127526 -> 1127716 (+0.02%); split: -0.10%, +0.12%
PreSGPRs: 3376687 -> 3586076 (+6.20%); split: -0.00%, +6.20%
PreVGPRs: 3339740 -> 3339811 (+0.00%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8807 >
2021-02-05 17:03:17 +00:00
Erik Faye-Lund
3824c06aff
zink: support using lavapipe
...
This is really nasty, and shouldn't really be needed, but we have a
problem where both Zink and Lavapipe checks $GALLIUM_DRIVER, meaning that
Zink tries to use Lavapipe, and Lavapipe tries to use Zink.
This patch side-steps that by temporarily setting $GALLIUM_DRIVER to
"llvmpipe", giving Lavapipe a chance to succeed.
This is not great at all. The most obvious problem is that this is super
thread-unsafe, effectively modifying global state without any care. In
reality, we'd only want the pipe-loader in the *same thread* to ignore
Zink, but it's not so obvious how to do that without introducing lots of
ugly zink-specific cruft.
People shouldn't be using Zink if they don't have a GPU, it's going to
be much better to use LLVMpipe in that case. So let's not worry too much
about this case, and instead guard this dangerous logic with an
ZINK_USE_LAVAPIPE environment variable. This means this behavior only
happens if people opt in to it.
With this in place, we can start using Zink + Lavapipe on CI.
In the longer run, it might be better to use Adam Jackson's copper
loader instead, and drop exposing Zink as a software rasterizer
entirely. But that's something for the great future where we have flying
cars and all.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7881 >
2021-02-05 16:45:43 +00:00
Erik Faye-Lund
3adf6da4c1
zink: explicitly check for VK_NULL_HANDLE
...
This seems a bit less like magic to me.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7881 >
2021-02-05 16:45:43 +00:00
Erik Faye-Lund
6b38b1ccaf
zink: check for error when calling vkEnumeratePhysicalDevices
...
It seems it's possible for Lavapipe to fail to enumerate the physical
devices, so let's handle that and fail all the way up here.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7881 >
2021-02-05 16:45:43 +00:00
Rhys Perry
cc8613c8d5
aco: add fallback algorithm in get_reg()
...
The generated code is often terrible, but the situations where this is
needed are rare.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8713 >
2021-02-05 14:41:24 +00:00
Leo Liu
57cb2fc88e
radeon/vcn: enable dynamic dpb Tier1 support
...
For Raven and Navixx family i.e. VCN1 and VCN2 with VP9 codec
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851 >
2021-02-05 09:22:52 -05:00
Leo Liu
b460c9b5d1
radeon/vcn: add dynamic dpb buffer Tier1 support
...
Also add its buffer index and fill up messages for the buffer.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851 >
2021-02-05 09:22:52 -05:00
Leo Liu
6b4326346b
radeon/vcn: add dynamic dpb interface
...
The new message buffer will save the dpb buffers from previous
allocation based on the max resolution.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851 >
2021-02-05 09:22:52 -05:00
Leo Liu
480d1436fe
radeon/vcn: clean the message buffers and their indexes logic
...
So the new buffer and index can be added sequentially.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8851 >
2021-02-05 09:22:52 -05:00
Mike Blumenkrantz
5f6cd7bba9
zink: be a little more precise about query types in one conditional
...
just for readability, no functional changes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8516 >
2021-02-05 13:31:16 +00:00
Mike Blumenkrantz
d45ef517c6
zink: unify shader image unbind codepath
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8780 >
2021-02-05 12:42:32 +00:00
Iago Toral Quiroga
c72d99550c
v3dv: allow a component swizzle in copy_buffer_to_image_shader
...
This is trivial because this path relies on our blit_shader interface
which supports this already, so it just needs to pass it along.
I don't think this is ever triggered practice, since we should be
able to handle any case that could require this with the texel buffer
path, but at least it allows us to simplify a bit the code.
Tested by manually disabling the priority paths to ensure we exercise
component swizzles with this path.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8875 >
2021-02-05 13:31:25 +01:00
Iago Toral Quiroga
4d4a0797ce
v3dv: batch copies in the copy_buffer_to_image_blit path
...
This path is very memory hungry and batching allows us to reduce
this by allocating memory just once and reuse it for all regions
in the batch instead of allocating once per region.
v2: document return value for this function (apinheiro).
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8875 >
2021-02-05 13:31:25 +01:00
Iago Toral Quiroga
7aa04ad065
v3dv: handle D/S buffer to image copies with the texel buffer path
...
We do this by converting them to a compatible color copy and using a
destination color mask as well as a source component swizzle to handle
D24 format semantics according to the V3D hardware requirements,
similar to what we do with our blit shader interface.
This path is faster than the terrible copy_buffer_to_image_blit,
which requires to copy the source buffer to a tiled image first
and should be avoided as much as possible, since it is slow and
can also quickly increase device memory usage.
This fixes occasional OOM errors when loading traces in renderdoc.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8875 >
2021-02-05 13:31:25 +01:00
Boris Brezillon
7ecb2eaf26
panfrost: Don't add the tiler BO when it's not accessed
...
Only batches involving the tiler block need to add the tiler heap to the
list of accessed BOs. While at it, clarify who's accessing this heap.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8822 >
2021-02-05 11:10:43 +01:00
Boris Brezillon
66125c429f
panfrost: Fix a polygon list corruption in the multi-context case
...
The polygon list is written by tiler jobs and read by fragment ones,
and nothing should re-use the heap until the fragment job is done.
4fec6c9448 ("panfrost: Add the tiler heap to fragment jobs") fixed
this for the !multi-context case by adding the heap BO to fragment job.
But the tiler heap is shared accross contexts, and vertex/tiler+fragment
job submission is done through 2 separate ioctls, meaning that
vertex/tiler and fragment jobs from 2 different context might be
interleaved.
Add a lock at the device level to ensure tiler/vertex+fragment jobs are
submitted sequentially, with no other jobs using the same tiler heap
in-between.
Cc: mesa-stable
Fixes: d8deb1eb6a ("panfrost: Share tiler_heap across batches/contexts")
Reported-by: Icecream95 <ixn@disroot.org >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Icecream95 <ixn@disroot.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8822 >
2021-02-05 11:10:43 +01:00
Caio Marcelo de Oliveira Filho
0c3fe06421
spirv: Skip creating unused variables in SPIR-V >= 1.4
...
Newer versions of SPIR-V require that all the global variables used by
the entry point are declared (in contrast to only I/O in previous
versions), so there's no need to remove dead variables or keep track
of the indirectly used variables.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8456 >
2021-02-05 04:52:46 +00:00
Caio Marcelo de Oliveira Filho
e3abbe7a24
spirv: Count variables *after* unused ones are removed
...
Previous code was counting more variables than those used by the entry
point.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8456 >
2021-02-05 04:52:46 +00:00
Caio Marcelo de Oliveira Filho
cc98ba2eaf
spirv: Use OpEntryPoint to identify valid I/O variables
...
OpEntryPoint declares the list of variables in Input and Output
storage classes that are used. Use that information to skip creating
other variables from such storage classes that are unused by the entry
point.
After that change, is not necessary to use remove dead variables for
those types of variables; and because of that is also not necessary to
lower initalizers for output variables.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8456 >
2021-02-05 04:52:46 +00:00
Vinson Lee
4654650d6b
nv50/ir: Initialize BindArgumentsPass member sub in constructor.
...
Fix defect reported by Coverity.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member sub is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7229 >
2021-02-04 20:17:59 -08:00
Eric Anholt
3a5bdd6cf7
freedreno/a6xx: Add support for glDrawTransformFeedback().
...
It's exposed with ARB_tf2, which we claimed support for. All the KHR-GL33
TF tests pass for me locally except for no_errors, which I have some
outstanding fixes for with khronos. Our CI build seems to be having some
issue with exceptions inside of deqp.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8843 >
2021-02-04 14:49:59 -08:00
Eric Anholt
59f047e6e7
docs: Document PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME.
...
It does more than the name suggests!
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8843 >
2021-02-04 14:02:12 -08:00
Eric Anholt
5009450413
freedreno/a6xx: Skip guessing VSC size with indirect TF draw counts.
...
Fixes an assertion failure when we try to figure out how many bits to
store the "0" draw count.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8843 >
2021-02-04 14:02:12 -08:00
James Park
fbaf136821
radv: Pointer arithmetic without void*
...
Fixes: 736834931b ("radv: memset the alignment hole in cache_entry to 0")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8871 >
2021-02-04 13:23:52 -08:00
Jason Ekstrand
27d496706e
anv: Move extension tables to anv_device.c
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8792 >
2021-02-04 20:02:12 +00:00
Jason Ekstrand
2d6de5d227
anv,vulkan: Move anv_icd.py to a common location
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8792 >
2021-02-04 20:02:12 +00:00
Jason Ekstrand
91931c4edd
anv: Make anv_icd.py more generic and independent
...
Instead of depending on anv_extensions.py, fetch the patch version from
the XML ourselves. This way it can be moved to common code and used by
other ICDs going forward.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8792 >
2021-02-04 20:02:12 +00:00
Jason Ekstrand
c7a045ed63
anv: Pull the patch version from the XML
...
For years, I've maintained that I like to bump this number manually
because it gives me a point at which to say, "I've looked at most of the
issues and I think we're up to date." The reality, however, is that I
just bump it every few months and don't really do any thorough checking.
We may as well just bump it on header updates.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8792 >
2021-02-04 20:02:12 +00:00
Jason Ekstrand
cf54fc768e
vulkan: Rework extension disabling on Android
...
Instead of building it into the auto-generated condition we use for the
per-driver ${driver}_physical_device_get_supported_extensions()
function, generate a table and handle it inside the various common
extension enumeration and verification routines. This reduces our
reliance on code-gen for extension enables.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8792 >
2021-02-04 20:02:12 +00:00
Jason Ekstrand
0260b4a7e7
vulkan: Add a common helper for enumerating instance extension properties
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Tested-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8792 >
2021-02-04 20:02:12 +00:00
Danylo Piliaiev
f26b336331
freedreno/a2xx: fix scissors clamp bounds
...
a2xx has maximum viewport dimensions of 4096
Fixes: 6ae726b799 ("freedreno: clamp scissor bounds")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8866 >
2021-02-04 19:47:11 +00:00
Eric Anholt
3aeb029728
freedreno: Drop pointless clear of used providers.
...
We don't reuse batches, no need to do anything special here.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8789 >
2021-02-04 19:31:30 +00:00
Eric Anholt
4338cafd7f
freedreno: Backport a5xx/a6xx fix for active query handling.
...
The batch might not have stage == FD_STAGE_BLIT set because
fd_blitter_pipe_begin was sticking the stage on some random batch (or none
at all) rather than the one that would be used in the meta operation.
What we actually wanted to be looking at was set_active_query_state(),
which is already called by util_blitter and whose state we just needed to
track.
Fixes these piglit tests on a307:
occlusion_query_meta_fragments
occlusion_query_meta_save
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8789 >
2021-02-04 19:31:30 +00:00
Eric Anholt
b709efeb09
freedreno: rename batch->active_providers to query_providers_used.
...
It's not the set of currently active providers, it's what's been used at
all in the current batch (this is used for doing the initialization of
query providers at initial HW setup in a submit).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8789 >
2021-02-04 19:31:30 +00:00
Eric Anholt
75a4386676
freedreno: Make sure that queries are disabled during shadow blits.
...
They shouldn't count toward occlusion queries.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8789 >
2021-02-04 19:31:30 +00:00
Mike Blumenkrantz
50bac9f3fb
zink: move maintenance2 extension to right file
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8862 >
2021-02-04 19:23:20 +00:00
Jesse Natalie
a88cd98315
drisw: Disable automatic use of layered drivers with LIBGL_ALWAYS_SOFTWARE
...
If LIBGL_ALWAYS_SOFTWARE is set, then drisw is selected, and internally,
drisw should choose one of the actual software drivers. If it's not set,
but drisw is still selected (no hardware DRM driver, like in WSL), then
layered drivers are preferred over pure software.
Fixes: 4a3b42a7 ("drisw: Prefer hardware-layered sw-winsys drivers over pure sw")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4171
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8782 >
2021-02-04 16:19:51 +00:00
Danylo Piliaiev
6ae726b799
freedreno: clamp scissor bounds
...
We don't have negative scissor coords and maximum dimensions are:
a3xx - 4096
a4xx+ - 16384
Fixes piglit tests:
fbo-viewport
viewport-clamp
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/30
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8209 >
2021-02-04 15:27:29 +00:00
Mike Blumenkrantz
da21eab142
radv: print image array size in debug mode
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8863 >
2021-02-04 10:10:29 -05:00
Erik Faye-Lund
564102b1be
docs: fix invalid rst syntax
...
We need a newline here to avoid syntax errors while builind the
sphinx-documentation.
The errors don't lead the build fail, so we didn't notice this on CI.
Which is a shame IMO. Instead, the blocks simply fail to render.
Fixes: 2e2edaa89b ("docs/ci: Document setting up the http cache for traces.")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8839 >
2021-02-04 13:38:40 +00:00
SureshGuttula
b4651890be
frontends/va: Update conditional checks for code stability.
...
Added parameter checks and updated returns based on that.
https://github.com/intel/libva-utils/tree/master/test
run test_va_api
Signed-off-by: SureshGuttula <sguttula@amd.com >
Reviewed-by: Thong Thai <thong.thai@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8374 >
2021-02-04 12:05:28 +00:00
Alyssa Rosenzweig
083843de1e
nir/lower_io: Fix grammar errors
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8846 >
2021-02-04 11:45:26 +00:00
Iago Toral Quiroga
6630825dcf
broadcom/compiler: let QPUs stall on TMU input/config overflows
...
We have been trying to avoid this by tracking fifo usages in the driver and
flushing all outstanding TMU sequences if we overflowed any of these, however,
this is actually not the most efficient strategy. Instead, we would like to
flush only enough operations to get things going again, which is better for
pipelining. Doing that in the driver would require some additional work, but
thankfully, it is not required, since this seems to be what the hardware does
automatically, so we can just remove overflow tracking for these two fifos
and enjoy the benefits.
This also further improves shader-db stats:
total instructions in shared programs: 8975062 -> 8955145 (-0.22%)
instructions in affected programs: 1637624 -> 1617707 (-1.22%)
helped: 4050
HURT: 2241
Instructions are helped.
total threads in shared programs: 236802 -> 237042 (0.10%)
threads in affected programs: 252 -> 492 (95.24%)
helped: 122
HURT: 2
Threads are helped.
total sfu-stalls in shared programs: 19901 -> 19592 (-1.55%)
sfu-stalls in affected programs: 4744 -> 4435 (-6.51%)
helped: 1248
HURT: 1051
Sfu-stalls are helped.
total inst-and-stalls in shared programs: 8994963 -> 8974737 (-0.22%)
inst-and-stalls in affected programs: 1636184 -> 1615958 (-1.24%)
helped: 4050
HURT: 2239
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
d57a358128
broadcom/compiler: log spilling shaders to perf output
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
0f90b729fb
broadcom/compiler: disallow spilling if TMU pipelining was enabled
...
TMU pipelining makes TMU spilling difficult and can easily lead to
doing large amounts of spills to compile a shader. It is best to
only use pipelining if we can compile without spilling.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
e18d6bbf2f
broadcom/compiler: disable TMU pipelining if we fail to register allocate
...
TMU pipelining can severely reduce our capacity to emit TMU spills,
causing us to fail to compile a shader we may otherwise be able to
compile. This is because pipelining extends the liveness of TMU
sequences by posponing the thread switch and LDTMU until a result
is needed, and we can't emit TMU spills while in the middle of a
TMU sequence.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
ecd654bf00
broadcom/compiler: support pipelining of image load/store instructions
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
0bdc6dca6c
broadcom/compiler: refactor image load/store TMU emission code
...
This mostly moves code around to group together the code involved with
actually emitting a TMU sequence. This will make it a bit easier to
then implement pipelining while reusing this code, similar to how we
handled other cases of TMU pipelining.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
be45960d3e
broadcom/compiler: support pipelining of tex instructions
...
This follows the same idea as for TMU general instructions of reusing
the existing infrastructure to first count required register writes and
flush outstanding TMU dependencies, and then emit the actual writes, which
requires that we split the code that decides about register writes to
a helper.
We also need to start using a component mask instead of the number
of components that we need to read with a particular TMU operation.
v2: update tmu_writes for V3D_QPU_WADDR_TMUOFF
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
197090a3fc
broadcom/compiler: implement pipelining for general TMU operations
...
This creates the basic infrastructure to implement TMU pipelining and
applies it to general TMU. Follow-up patches will expand this
to texture and image/load store operations.
TMU pipelining means that we don't immediately end TMU sequences,
and instead, we postpone the thread switch and LDTMU (for loads)
or TMUWT (for stores) until we really need to do them.
For loads, we may need to flush them if another instruction reads
the result of a load operation. We can detect this because in that
case ntq_get_src() will not find the definition for that ssa/reg
(since we have not emitted the LDTMU instructions for it yet), so
when that happens, we flush all pending TMU operations and then
try again to find the definition for the source.
We also need to flush pending TMU operations when we reach the end
of a control flow block, to prevent the case where we emit a TMU
operation in a block, but then we read the result in another block
possibly under control flow.
It is also required to flush across barriers and discards to honor
their semantics.
Since this change doesn't implement pipelining for texture and
image load/store, we also need to flush outstanding TMU operations
if we ever have to emit one of these. This will be corrected with
follow-up patches.
Finally, the TMU has 3 fifos where it can queue TMU operations.
These fifos have limited capacity, depending on the number of threads
used to compile the shader, so we also need to ensure that we
don't have too many outstanding TMU requests and flush pending
TMU operations if a new TMU operation would overflow any of these
fifos. While overflowing the Input and Config fifos only leads
to stalls (which we want to avoid anyway), overflowing the Output
fifo is incorrect and would end up with a broken shader. This means
that we need to know how many TMU register writes are required
to emit a TMU operation and use that information to decide if we need
to flush pending TMU operations before we emit any register
writes for the new TMU operation.
v2: fix TMU flushing for NIR registers reads (jasuarez)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
0e96f0f8cd
broadcom/compiler: prepare TMU spilling code to account for TMU pipelining
...
Follow-up patches will implement support for TMU pipelining in the
compiler, which basically means that we will be able to have more
than one outstanding TMU operation.
Our spilling code currently relies on properly identifying the end
of a TMU sequence (since we can't emit a new TMU sequence for a spill
in the middle of an existing TMU sequence), however, that code expects
that only one TMU sequence may be outstanding, which won't be true
once we implement pipelining.
This change fixes the 'end of TMU sequence' checks to account for this
in preparation for upcoming patches.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Iago Toral Quiroga
3926030183
broadcom/compiler: fix indentation with TABs
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8825 >
2021-02-04 10:33:10 +00:00
Michel Dänzer
14bafbba9b
ci: Run 'time' in the background and propagate signals to test process
...
Simply exec'ing time didn't produce any output from it when a test
timed out.
Fixes: 35f59e14f8 "ci: Use GNU time as meson test wrapper"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8830 >
2021-02-04 09:36:49 +00:00
Vinson Lee
09e421846d
nvc0/ir: Initialize SchedDataCalculator members in constructor.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member score is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member prevData is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member prevOp is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8604 >
2021-02-04 04:09:28 +00:00
Vinson Lee
8f1c6f36ec
nvc0/ir: Initialize NVC0LoweringPass member gpEmitAddress.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member gpEmitAddress is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8605 >
2021-02-03 19:45:15 -08:00
James Park
49d77357ea
amd: Disable surface modifier test on Windows
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8855 >
2021-02-04 02:02:27 +00:00
Bas Nieuwenhuizen
fdfd316d5b
radv: Implement VK_KHR_zero_initialize_workgroup_memory.
...
Reuses the pass that was implemented for ANV.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8751 >
2021-02-04 01:29:58 +00:00
Caio Marcelo de Oliveira Filho
1e59cdbf77
spirv: Fail when parsing invalid Initializers
...
Fail when parsing Initializers used in Variables with Storage Classes
that doesn't support it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8820 >
2021-02-03 15:21:13 -08:00
Dave Airlie
e41b0202c9
zink: don't pick a cpu device ever.
...
This goes down the list and picks the first non-cpu device, when
we merge the CI patch we should add a forcing env var in here.
Fixes: 8d46e35d1 ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8845 >
2021-02-03 23:11:19 +00:00
Marek Olšák
586f139713
winsys/amdgpu: expand the slab allocation range to [256 B, 1 MB]
...
This increases the wasted memory to 140 MB for DeusExMD, still below
the original number. The advantage is that we now get 2 MB pages for more
buffers and fewer total buffers allocated by the kernel, enabling faster
GPU page translation and slightly lower kernel overhead.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8683 >
2021-02-03 21:53:34 +00:00
Marek Olšák
e97af11ba9
winsys/amdgpu,pb_slab: add slabs with 3/4 of power of two sizes to save memory
...
Instead of aligning slab allocations to powers of two (e.g. 129K -> 256K),
implement slab allocations with 3/4 of power of two sizes to reduce
overallocation. (e.g. 129K -> 192K)
The limitation is that the alignment must be 1/3rd of the allocation size.
DeusExMD allocates 2.1 GB of VRAM. Without this, slabs waste 194 MB due
to alignment, i.e. 9.2%. This commit reduces the waste to 102 MB, i.e. 4.9%.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8683 >
2021-02-03 21:53:34 +00:00
Marek Olšák
35005881bf
winsys/amdgpu: clean up slab alignment code, handle small buffers better
...
The next commit will build upon this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8683 >
2021-02-03 21:53:33 +00:00
Marek Olšák
965c6445ad
winsys/amdgpu,radeonsi: add HUD counters for how much memory is wasted by slabs
...
Slabs always allocate the next power of two size from their pools. This
wastes memory if the size is not a power of two.
bo->base.size is overwritten because the default is the allocated power of
two size, but we need the real size to compute the wasted size in
amdgpu_bo_slab_destroy. entry_size is added to the hole in pb_slab_entry
to hold the real entry size.
Like other memory stats, no atomics are used.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8683 >
2021-02-03 21:53:33 +00:00
Samuel Pitoiset
7e47fe9a94
radv: fix waiting on the last enabled RB for occlusion queries
...
Wait on the last enabled RB, not the last RB. This fixes GPU hangs
because the GPU was waiting forever.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4212
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/8836 >
2021-02-03 20:29:24 +01:00
Rob Clark
c167b773fe
freedreno: Put an upper limit on VSC size
...
Left unchecked, an app that just did an endless series of draws could
result in VSC buffer sizes >4GB, which doesn't work out well.
This limit is semi-arbitrary (ie. it is lower than hw limit, but 32*8MB
seems a bit excessive and not a limit that you'd hit in the real world).
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8842 >
2021-02-03 18:35:38 +00:00
Rob Clark
ff61e9b54d
freedreno/decode: Fix overflow
...
CP_SET_DRAW_STATE state-groups count as a 4th level of IB. Fixes a
crash seen on 32b/arm builds of crashdec.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8842 >
2021-02-03 18:35:38 +00:00
Samuel Iglesias Gonsálvez
5723887676
turnip: fix resolve MSAA D32_SFLOAT_S8_UINT image to S8_UINT
...
According to VK_KHR_depth_stencil_resolve spec (see
VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03182):
"If the VkFormat of pDepthStencilResolveAttachment has a stencil
component, then the VkFormat of pDepthStencilAttachment must have a
stencil component with the same number of bits and numerical
type"
The issue with D32_SFLOAT_S8_UINT format is that it is implemented as
two planes, so we need to execute the separate_stencil path in
tu_emit_blit() to resolve its stencil component into S8_UINT image.
Fixes the following tests:
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.compatibility_depth_zero_stencil_zero_testing_stencil
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8527 >
2021-02-03 16:51:02 +00:00
Samuel Iglesias Gonsálvez
09e9be3d8f
turnip: fix resolve MSAA D24_UNORM_S8_UINT image to S8_UINT
...
According to VK_KHR_depth_stencil_resolve spec (see
VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-03182)
"If the VkFormat of pDepthStencilResolveAttachment has a stencil
component, then the VkFormat of pDepthStencilAttachment must have a
stencil component with the same number of bits and numerical type"
That means that we can resolve MSAA depth/stencil to a stencil only
image only if the stencil component matches with same number of bits
and type.
Although the driver only supports VK_RESOLVE_MODE_SAMPLE_ZERO_BIT
resolve mode, it was doing a sample average when resolving a MSAA
D24_UNORM_S8_UINT image to S8_UINT.
Fixes the following tests:
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint.compatibility_depth_zero_stencil_zero_testing_s
tencil
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint_separate_layouts.compatibility_depth_zero_stenc
il_zero_testing_stencil
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8527 >
2021-02-03 16:51:02 +00:00
Tapani Pälli
b609d4677d
i965: use aligned malloc for context instead of ralloc
...
Fixes: 3175b63a ("mesa: don't allocate matrices with malloc")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4118
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8805 >
2021-02-03 16:37:59 +00:00
Tapani Pälli
a545fe9742
intel/perf: introduce additional ralloc context parameter
...
This makes it possible to use a separate ralloc context, not gl context
itself which might not be allocated with ralloc.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8805 >
2021-02-03 16:37:59 +00:00
Tapani Pälli
095fd121a3
intel/perf: cleanup, remove duplicate function declaration
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8805 >
2021-02-03 16:37:59 +00:00
Bas Nieuwenhuizen
047d799a16
radv: Fix assert.
...
Fixes: 7f7da82dbb ("radv: Add image layout with drm format modifiers.")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8828 >
2021-02-03 16:18:20 +00:00
Bas Nieuwenhuizen
469341fabc
radv: Add modifier fails for CTS bug.
...
Fixes: 58e5232625 ("radv: Enable DRM format modifiers on GFX9+.")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8828 >
2021-02-03 16:18:20 +00:00
Witold Baryluk
736834931b
radv: memset the alignment hole in cache_entry to 0
...
Detected using valgrind. Otherwise these bytes at the end
will be touched by zstd compression, spamming valgrind output.
Other option is to do full memset(entry, 0, size),
but that is somehow unnecessary and suboptimal.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8229 >
2021-02-03 15:28:04 +00:00
Samuel Iglesias Gonsálvez
5fc5d18aac
turnip: fix UINT64_MAX size wrapping in tu_GetBufferMemoryRequirements()
...
tu_GetBufferMemoryRequirements() ends up wrapping the UINT64_MAX size
to 0 when aligning.
Fixes:
dEQP-VK.api.buffer.basic.size_max_uint64
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4493 >
2021-02-03 16:01:41 +01:00
Samuel Iglesias Gonsálvez
ea42632ba7
turnip: set sparseAddressSpaceSize to zero
...
According to Vulkan spec, "Table 46. Required Limits", as sparse
binding is unsupported, we need to return unsupported limit for
sparseAddressSpaceSize, which is zero.
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4493 >
2021-02-03 16:01:21 +01:00
Alyssa Rosenzweig
5a975fc8e7
pan/decode: Prefer sizeof to ARRAY_SIZE for char
...
One less macro.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:53 +00:00
Alyssa Rosenzweig
df8c4471b3
pan/decode: Remove tile range validation
...
Fault pointer works as you expect so it's not terribly useful.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:53 +00:00
Alyssa Rosenzweig
53c672aa12
pan/mdg: Drop unused stage parameter to disassembler
...
No longer used but was adding a dependency on compiler/shader_enums.h
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:53 +00:00
Alyssa Rosenzweig
a00db92e49
pan/decode: Remove mesa header dependencies
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:53 +00:00
Alyssa Rosenzweig
307191f88c
pan/decode: Remove unused disasm stats
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
641b8a6a19
pan/decode: Remove pandecode_prop
...
For pre-GenXML printing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
19ae0017d1
pan/decode: Simplify tiler printing
...
Again, most of this is either wrong or doesn't really matter.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
0aa3e959b8
pan/decode: Remove unused MEMORY_PROP macro
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
19a29f2e45
pan/decode: Deduplicate shader property printing
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
6c0669979d
pan/decode: Deduplicate SFBD blend printing
...
Annoying verbosity of traces on midgard.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
71c43211c1
pan/decode: Remove dependency of decoder on the encoder
...
Obstacle to decouple panwrap from the rest of mesa.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
776a6a8435
pan/decode: Remove tiler size checks
...
Bad dependency and also mostly speculation at the time of writing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Alyssa Rosenzweig
aba23ec43e
pan/decode: Be explicit when printing invocations
...
Our "canonical" forms weren't really... good.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8829 >
2021-02-03 14:04:52 +00:00
Jonathan Marek
dd388b14c8
turnip: add missing register write to disable dithering
...
This was causing rendering issues with low precision formats because GL
driver can enable it.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8707 >
2021-02-03 13:45:19 +00:00
Jonathan Marek
bdaa4d1ee0
turnip: don't always use 3d ops for blit_image
...
Revert this accidentally committed testing change.
Fixes: 872c4bcd27 ("turnip: implement z-scaling and z-mirroring BlitImage")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8707 >
2021-02-03 13:45:19 +00:00
Jonathan Marek
b37bd5f89b
turnip: IMAGE_FILTER_{LINEAR,CUBIC}_BIT only for non-integer formats
...
Avoid CTS trying to use linear filtering for integer formats.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8707 >
2021-02-03 13:45:19 +00:00
Jonathan Marek
b4653c1033
turnip: use vk_format_is_int to disable COLOR_ATTACHMENT_BLEND_BIT
...
This is simpler and easier to understand.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8707 >
2021-02-03 13:45:19 +00:00
Jonathan Marek
de44e700b1
turnip: delete unused vk_format_parse.py file
...
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8707 >
2021-02-03 13:45:19 +00:00
Jonathan Marek
596e82510d
turnip: fix logicOp
...
Don't ignore logic op for integer formats.
Blend also doesn't need this path, because it isn't valid for blendEnable
to be true for integer formats.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8707 >
2021-02-03 13:45:19 +00:00
Rhys Perry
0602d4ec69
radv: correctly enable WGP_MODE for tessellation control
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8811 >
2021-02-03 11:27:50 +00:00
Rhys Perry
2338e4ad36
radv: correctly enable WGP_MODE for NGG and GS
...
Previously, we would set WGP_MODE on GFX10+ and then only on GFX10.
Because we used bitwise or, the result was WGP_MODE being set on GFX10+.
We also set the wrong bit, S_00B848_WGP_MODE instead of S_00B228_WGP_MODE.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8811 >
2021-02-03 11:27:50 +00:00
Rhys Perry
56cd79b63d
radv: round-up num_records division in radv_flush_vertex_descriptors
...
Vertex attribute bounds checking is supposed to be done per-attribute:
is_oob = index * stride + attrib_offset + attrib_size > buffer_size
but we were obtaining num_records by dividing the buffer size by the
stride, making it per-vertex:
is_oob = index * stride + (stride - 1) >= buffer_size
An example from Dead Cells (Wine) is:
attribute bindings: 0, 1, 2
attribute formats: r32g32, r32g32, r32g32b32a32
attribute offsets: 0, 0, 0
binding buffers: all the same buffer
binding offsets: 0, 8, 16
binding sizes: 128, 120, 112
binding strides: 32, 32, 32
Workaround this issue without switching to per-attribute descriptors by
rounding up the division. This is still incorrect, but it should now no
longer consider in-bounds attributes out-of-bounds.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3796
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4199
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8835 >
2021-02-03 09:53:08 +00:00
James Park
4cec72c3a9
radv: Use typed outarray API
...
MSVC cannot perform GCC __typeof__ for C code. (C++ has decltype.)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8818 >
2021-02-03 08:57:59 +00:00
James Park
2e8b8f0514
ac: Remove unnecessary header
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8819 >
2021-02-03 08:32:01 +00:00
Tony Wasserka
5df057a3e6
aco/ra: Add helper to get a PhysRegInterval for the register demand
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8737 >
2021-02-03 08:17:49 +00:00
Marek Olšák
32fc4dada2
gallium/u_vbuf: skip non-indirect draws with 0 vertices
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8770 >
2021-02-02 19:53:44 -05:00
Marek Olšák
dc9645be67
Revert "gallium/u_vbuf: skip draws with 0 vertices"
...
This reverts commit be8d811e57 .
Fixes: be8d811e57
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4184
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8770 >
2021-02-02 19:53:44 -05:00
Caio Marcelo de Oliveira Filho
d49b0fa72f
anv: Implement VK_KHR_zero_initialize_workgroup_memory
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8708 >
2021-02-02 17:06:56 +00:00
Caio Marcelo de Oliveira Filho
a2414ada87
nir: Add nir_zero_initialize_shared_memory
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8708 >
2021-02-02 17:06:56 +00:00
Caio Marcelo de Oliveira Filho
c4f2297f00
spirv: Recognize zero initializers in Workgroup variables
...
This will be used to implement
VK_KHR_zero_initialize_workgroup_memory.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8708 >
2021-02-02 17:06:56 +00:00
Caio Marcelo de Oliveira Filho
378eca1394
spirv: Refactor variable initializer code
...
Pass the vtn_value and let vtn_create_variable do the validation.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8708 >
2021-02-02 17:06:56 +00:00
Erico Nunes
696b0ab2c9
lima: always set stride in texture descriptor
...
We can just always specify the stride parameter regardless of whether
an alignment was forced or not. This fixes some issues where it is not
straightforward to detect the need to specify stride by checking the
buffer width (e.g. imported dmabuf to be used as texture).
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8549 >
2021-02-02 16:54:47 +00:00
Erico Nunes
ce432ac7cd
lima: enable r and rg pixel formats again
...
Enable r and rg targets to allow r and rg so that lima exposes
GL_EXT_texture_rg.
This is notably required by programs working with textures for
video playback.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8549 >
2021-02-02 16:54:47 +00:00
Erico Nunes
f17c8dc798
lima: set yuv formats as external_only
...
lima is not able to use yuv textures directly.
Set them as external_only so that drivers don't attempt to send yuv
planes directly as dma bufs.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8549 >
2021-02-02 16:54:47 +00:00
Jason Ekstrand
774fae34f0
nir: Drop the lower_mem_constant_vars declaration
...
The function was removed in c730ace12b .
Fixes: c730ace12b "nir,clover: Drop nir_lower_mem_constant_vars"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8834 >
2021-02-02 16:34:22 +00:00
Karol Herbst
6adf410cc0
clover/api: make use of validate_mem_migration_flags in clEnqueueMigrateMemObjects
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6401 >
2021-02-02 16:11:35 +00:00
Jérôme Glisse
6e4f7e14af
nouveau: add support for SVM migrate
...
v2 (Ralph): don't allign address as the kernel handles that already
support migration from GPU to system RAM
v3 (Karol): use DIV_ROUND_UP for sizes not being page aligned
Signed-off-by: Jérôme Glisse <jglisse@redhat.com >
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6401 >
2021-02-02 16:11:35 +00:00
Jérôme Glisse
f7616c89a4
clover: implement clEnqueueSVMMigrateMem
...
Memory migration for SVM (share virtual memory). This allow to migrate
a range of virtual address of the process to device memory to speed up
device processing when that memory is in use by the device.
v2 (Karol): use tracked SVM allocation in order to support cases where
the size of the migration is not specified
Signed-off-by: Jérôme Glisse <jglisse@redhat.com >
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6401 >
2021-02-02 16:11:35 +00:00
Karol Herbst
3718938c1a
clover: track allocated svm pointers
...
We need those to proper validate the SVM API.
v2: use std::map instead of std::unordered_map
v3: guard against segfaults on std::prev with empty containers
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6401 >
2021-02-02 16:11:35 +00:00
Jérôme Glisse
e3c2432b37
gallium: add support for SVM (Share Virtual Memory) migrate
...
v2 (Karol): Fix declaration of pointers argument
v3 (Karol): Move flags into function interface as bools
Signed-off-by: Jérôme Glisse <jglisse@redhat.com >
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6401 >
2021-02-02 16:11:35 +00:00
Erik Faye-Lund
0e47422413
zink: wrap some long lines
...
These lines are very long, let's wrap them a bit.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
a7d9ac2956
zink: refactor vertex-order emitting
...
Using a ternary expression inside the argument list avoids some
repetition, showing that the rest of the call is the same. This increase
readability a tad.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
06e421fe5c
zink: add a get_spacing-helper
...
Similarly to the previous commit, this makes the code a bit easier to
read.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
e240221d15
zink: add a get_primitive_mode-helper
...
This just makes the code a bit easier to read, where the details are
hidden slightly.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
701ade314f
zink: do not insist shaders come from glsl
...
We don't know what shading-language our shaders come from. This
information is lost before we get here. So let's not declare that these
come from GLSL shaders, even though that's likely to be the case.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
84fd3b7709
zik: correct spir-v caps for textures and images
...
There's a couple of minor issues with these the way they where:
1. All shader stages can perform texturing. So let's check for textures
instead of fragment-shader
2. Not all implementations support StorageImageExtendedFormats. We don't
expose image support for those implementations, but we shouldn't
enable the cap just because we're texturing.
Both of these issues can be tackled by splitting these into texturing
and images conditionals.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
7ce9c029b1
zink: only emit cap when needed
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
b6da248c0e
zink: only emit SpvCapabilityDerivativeControl when needed
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
36a4b423fe
zink: correct return-type for function
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
9fbacf5bcf
zink: be more careful about limits when unsupported
...
These limits are dependent on feature caps, so let's try to thread
a bit more carefully when the cap is unsupported.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Erik Faye-Lund
5b9042577c
zink: remove stale TODO
...
By now, I think we're fairly sure about this one ;)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8832 >
2021-02-02 16:00:37 +00:00
Jason Ekstrand
f064b7a42c
nir: Add some ssa-only fast-paths for nir_src rewrite
...
Basically every pass in NIR uses nir_ssa_def_rewrite_uses which calls
nir_instr_rewrite_src which is fairly complex because it handles all
sorts of non-SSA cases. Since we already know a priori that every
source written by nir_ssa_def_rewrite_uses is SSA, we can check new_src
once at the top of the function and cut out all that complexity.
While we're at it, we expose a new SSA-only nir_ssa_def_rewrite_uses_ssa
helper which takes an SSA def which avoids the one SSA check. It's also
more convenient 90% of the time.
Compile time as tested by Rhys Perry <pendingchaos02@gmail.com >
Difference at 95.0% confidence
-797.166 +/- 418.649
-0.566174% +/- 0.296441%
(Student's t, pooled s = 325.459)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8790 >
2021-02-02 15:35:55 +00:00
SureshGuttula
592c17b39d
va/picture : Added failure check for stability
...
This patch created to exit from for loop incase handle function
returns error vaStatus. This will help to capture the correct
failure return to application.
Signed-off-by: SureshGuttula <sguttula@amd.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8679 >
2021-02-02 13:38:22 +00:00
Lionel Landwerlin
eec2d4e466
anv: switch intel perf queries to query layout
...
Apart from the single additional marker field, these queries will now
use the same layout as all other drivers.
This should allow us to modify a single component to add an additional
register for new metrics.
v2: Capture the query beging registers in reverse order to ensure
timestamp is as close as possible from measured draw call.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
8ca1f488e6
anv: switch khr perf query code to use query layout
...
This unifies performance data gathering between the GL & Vulkan
drivers.
v2: Also move all NOOPs to before the query, leaving none inside
v3: Capture the query beging registers in reverse order to ensure
timestamp is as close as possible from measured draw call.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
76bba61e0b
anv: compute commands required to implement perf queries
...
We'll use this later to try to limit the number of NOOPs emitted for
self modifying batches.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
185df6ac9c
intel/perf: drop the special READ_REG operator
...
Makes things a bit more uniform.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
f721f2ad05
intel/perf: add DG1 support
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
1b335bc55a
intel/perf: add RKL support
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
4d6741b11b
intel/dev: identify rocketlake
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
1b3443fbd9
intel/perf: break TGL perf configs in GT1/2
...
Programming and equations are different enough that we really need 2
files.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
f97fc0ff8b
intel/dev: identify tigerlake
...
We'll need that to pick the right query sets between TGL/RKL/DG1.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
6afe5d3624
intel/perf: add async compute metrics
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
7335faa1a9
intel/perf: small ICL equation refactor
...
No functional changes.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
b5f32e948f
intel/perf: update files from IGT
...
IGT has received a bunch of updates, this is resyncing the files with
it.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
5d0886089e
intel/perf: remove reordering script
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
01179d2bc3
intel/perf: reorder xml files
...
Make the file match the order of the ones from IGT (which have changed
because of python2->3 transition).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:55 +00:00
Lionel Landwerlin
12ee1ec25e
intel/perf: add reorder script
...
When transitioning the oa-*.xml files from Gputop to IGT, we also had
to deal with a python2->3 transition. Unfortunately the implementation
dependent hash table ordering leaked into the XML files and so things
changed quite a bit.
This script reorders things from the old to the new order in the
existing files.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
404d0f7626
intel/perf: rename lkf into ehl
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
3ed29f944c
anv: remove unused query pool field
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
0e64912446
anv: fix layout comment
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
3c51325025
intel/perf: switch query code to use query layout
...
That way we can describe new registers to that could be used both by
Anv & Iris/i965 without having to modifying code in multiple places.
v2: Do reverse order for begin queries so that we have MI_RPC as close
as possible from the drawcall
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
8750f43a90
intel/perf: add performance query layout using MI_SRM
...
For all generations supported we had a layout describing what register
to store to implement a MI_RPC replacement.
This is because, on Gen12 we need to snapshot OAG registers to get
correct values for the perf equations. There, the MI_RPC instruction
captures OAR register which do not have all the information we need.
v2: Fix commented code for debug (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
f32d1bf529
intel/perf: query register descriptions
...
This will be useful when we implement queries using a series of MI_SRM
instead of MI_RPC.
Unfortunately on Gen12, the MI_RPC command sources values from the OAR
unit which has a similar series of register as the OAG unit but some
of the configuration of HW doesn't reach OAR so we have to snapshot
OAG manually instead.
v2: Fix comments
Use const
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
a6e980e9bf
intel/perf: prep work to enable new perf counters
...
Those are not part of the OA reports and need some additional
scaffolding. Those counters are only available when doing queries as
we need to emit MI_SRMs to record them.
Equations making use of those counters are not there yet, they will
come in a follow up commit updating a bunch of oa-*.xml files.
v2: Fix typo
v3: Use PERF_CNT_VALUE_MASK (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Lionel Landwerlin
969f6efbc2
genxml: PERFCNT registers are available since HSW
...
We were using those registers on Gen7.5 in the GL driver already, we
just need them in Genxml for Anv too.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6518 >
2021-02-02 13:25:54 +00:00
Andrii Simiklit
adc7f97a70
iris: don't emit IRIS_DIRTY_VF depending on trash in restart_index
...
The `restart_index` field can be uninitialized if `primitive_restart`
is false so we have to track `restart_index` changes
only if `primitive_restart` is true
Here is a valgrind warning:
Conditional jump or move depends on uninitialised value(s)
==52021== at 0x6D44968: iris_update_draw_info (iris_draw.c:102)
==52021== by 0x6D450B5: iris_draw_vbo (iris_draw.c:273)
==52021== by 0x642FD8E: cso_multi_draw (cso_context.c:1708)
==52021== by 0x5C434D3: st_draw_gallium (st_draw.c:271)
==52021== by 0x5DF5F1B: _mesa_draw_arrays (draw.c:554)
==52021== by 0x5DF68F7: _mesa_DrawArrays (draw.c:768)
==52021== by 0x49011F2: stub_glDrawArrays (piglit-dispatch-gen.c:12181)
==52021== by 0x11C611: piglit_display (shader_runner.c:4549)
==52021== by 0x4994D83: process_next_event (piglit_x11_framework.c:137)
==52021== by 0x4994E47: enter_event_loop (piglit_x11_framework.c:153)
==52021== by 0x49939A4: run_test (piglit_winsys_framework.c:88)
==52021== by 0x49821A9: piglit_gl_test_run (piglit-framework-gl.c:229)
v2: - don't propagate trash to state->cut_index
(Kenneth Graunke <kenneth@whitecape.org >)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8409 >
2021-02-02 13:16:07 +00:00
Boris Brezillon
470d3a3640
panfrost: Update ctx->batch when a fresh batch is requested
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:49:58 +01:00
Boris Brezillon
834bb5e54c
panfrost: Add a panfrost_compile_shader() helper
...
This deduplicates the
if (pan_is_bifrost())
return bifrost_compile_shader_nir();
else
return midgard_compile_shader_nir();
pattern.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Boris Brezillon
89cfa4180b
panfrost: Use dev->arch where appropriate
...
The architecture has already been extracted in panfrost_open_device()
don't do it again.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Boris Brezillon
d78f686ad1
panfrost: Rename and move pan_render_condition_check()
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Boris Brezillon
3913089d2d
panfrost: Set attribs and attrib_bufs to NULL when attrib_count = 0
...
It's just easier to read pandecode traces when those pointers are set
to NULL for the attribute_count=0 case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Italo Nicola <italonicola@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Boris Brezillon
81a21ea9cd
panfrost: Only allocate the extra attribute buffer entry on Bifrost
...
Bifrost needs an empty attribute buffer entry to tell the prefecter it
should stop fetching attribute buffers, but Midgard doesn't have this
constraint. It's also useless to have 2 empty entries for the instance or
image case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Italo Nicola <italonicola@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Boris Brezillon
63d9e412ec
panfrost: Don't memset the last attribute buffer entry twice
...
It's already done a few lines below.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Italo Nicola <italonicola@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Boris Brezillon
4544d00e71
panfrost: Get rid of IS_BIFROST
...
Extract this information from dev->arch, and provide a helper to hide
this check.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Italo Nicola <italonicola@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Boris Brezillon
ec6c6f610c
panfrost: Fix tiler job injection (again)
...
2f1947b39c ("panfrost: Fix tiler job injection") had the tests
inverted: WRITE_VALUE jobs are only needed on Midgard, not Bifrost.
Cc: mesa-stable
Fixes: 2f1947b39c ("panfrost: Fix tiler job injection")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808 >
2021-02-02 09:04:15 +01:00
Arcady Goldmints-Orlov
93f8f83a95
broadcom/compiler: improve generation of if conditions
...
Where it is safe to do so, avoid the generation of code to convert a
condition code into a boolean which is then tested to generate a
condition code. This is only done in uniform ifs, and only for condition
values that are SSA and only used once (in that if statement).
shader-db relative to MR 7726:
total instructions in shared programs: 8985667 -> 8974151 (-0.13%)
instructions in affected programs: 390140 -> 378624 (-2.95%)
helped: 810
HURT: 276
helped stats (abs) min: 1 max: 49 x̄: 17.77 x̃: 16
helped stats (rel) min: 0.10% max: 33.63% x̄: 7.97% x̃: 6.45%
HURT stats (abs) min: 1 max: 46 x̄: 10.42 x̃: 10
HURT stats (rel) min: 0.16% max: 21.54% x̄: 2.26% x̃: 2.03%
95% mean confidence interval for instructions value: -11.46 -9.75
95% mean confidence interval for instructions %-change: -5.76% -4.97%
Instructions are helped.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8709 >
2021-02-02 06:55:49 +00:00
Marek Olšák
b60dfa2c09
radeon: decrease the size of radeon_cmdbuf by switching prev fields to uint16
...
This also removes the 32-bit hole in radeon_cmdbuf.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434 >
2021-02-02 05:42:32 +00:00
Marek Olšák
34114e1dcb
radeonsi: tune NGG shader culling vertex threshold for each chip
...
These are based on my testing and estimation.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434 >
2021-02-02 05:42:32 +00:00
Marek Olšák
ffbf3a5f8b
radeonsi: simplify the NGG culling condition in si_draw_vbo
...
Changes:
- disallow NGG culling for GS, fast launch for tess using template args
(GS can't do NGG culling, tess can't do fast launch)
- skip checking current_rast_prim with tessellation
(bake the condition into ngg_cull_vert_threshold)
- use only 1 vertex count threshold for enabling NGG shader culling
to simplify it. I think it doesn't have a big impact. The threshold
computation depends on more parameters than just fast launch.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434 >
2021-02-02 05:42:32 +00:00
Marek Olšák
7581743510
radeonsi: set current_rast_prim at bind time for tess and GS
...
It doesn't have to be done in draw_vbo.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8434 >
2021-02-02 05:42:32 +00:00
Mark Janes
2edfb27913
intel: combine common gather routines in INTEL_MEASURE
...
Anv and iris had separate, similar routines to gather intel_measure
timestamps. Timestamps are now managed within intel_measure, allowing
those routines to be consolidated.
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
d6fc72e286
intel: support secondary command buffers in INTEL_MEASURE
...
When a secondary command buffer is encountered, insert an event that
links to the new batch.
This commit leaves intel_measure timestamp buffer objects mmapped,
which is more efficient than mapping/unmapping several times. With
the BOs mapped at all times, timestamp buffers can be managed directly
by intel_measure, where it will iterate over timestamps of linked
secondary buffers.
With timestamp buffers managed by intel_measure, a more efficient and
accurate check for render completion can be moved into intel_measure
from anv/iris.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
9eacbfaf7b
intel: stop tracking submission state in INTEL_MEASURE
...
With secondary command buffers, it is inconvenient to track whether a
batch has been submitted and needs to be gathered. Instead, always
check for completed snapshots before destroying a command buffer.
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Kenneth Graunke
f7d4ebbf86
iris: add hooks to call INTEL_MEASURE
...
These hooks were written in the initial IRIS_MEASURE implementation.
Minor changes by Mark Janes <markjanes@swizzler.org > to adapt to the
INTEL_MEASURE reimplementation.
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
b338bb70e0
iris: add a iris_context reference to iris_batch
...
This eliminates the need to use container_of in error handling code.
INTEL_MEASURE will need to access the iris context from each batch.
suggested-by: Kenneth Graunke <kenneth@whitecape.org >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
e67b8f504b
iris: implement iris layer of INTEL_MEASURE
...
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
cec1a9bbb9
anv: add hooks to call INTEL_MEASURE
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
0b6209b908
blorp: add hook for INTEL_MEASURE
...
Saves the snapshot type within the blorp parameters.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
4a2d9e44ff
anv: implement anv layer of INTEL_MEASURE
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
c5f3eb1961
anv: enable timestamp for INTEL_MEASURE
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Mark Janes
0f4143ec37
intel: Print GPU timing data based on INTEL_MEASURE
...
This infrastructure collects GPU timestamps over common intervals, and
generates a CSV report to show how long rendering took. The overhead
of collection is limited to the flushing that is required at the
interval boundaries for accurate timestamps.
By default, timing data is sent to stderr. To direct output to a
file:
INTEL_MEASURE=file=/tmp/measure.csv {workload}
To begin capturing timestamps at a particular frame:
INTEL_MEASURE=file=/tmp/measure.csv,start=15 {workload}
To capture only 23 frames:
INTEL_MEASURE=count=23 {workload}
To capture frames 15-37, stopping before frame 38:
INTEL_MEASURE=start=15,count=23 {workload}
Designate an asynchronous control file with:
INTEL_MEASURE=control=path/to/control.fifo {workload}
As the workload runs, enable capture for 5 frames with:
$ echo 5 > path/to/control.fifo
Enable unbounded capture:
$ echo -1 > path/to/control.fifo
and disable with:
$ echo 0 > path/to/control.fifo
Select the boundaries of each snapshot with:
INTEL_MEASURE=draw : DEFAULT - Collects timings for every render
INTEL_MEASURE=rt : Collects timings when the render target changes
INTEL_MEASURE=batch : Collects timings when batches are submitted
INTEL_MEASURE=frame : Collects timings at frame boundaries
With INTEL_MEASURE=interval=5, the duration of 5 events will be
combined into a single record in the output. When possible, a single
start and end event will be submitted to the GPU to minimize
stalling. Combined events will not span batches, except in
the case of INTEL_MEASURE=frame.
Acked-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7354 >
2021-02-01 17:24:57 -08:00
Bas Nieuwenhuizen
f9960579c3
radv: Enable modifiers with the WSI.
...
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
58e5232625
radv: Enable DRM format modifiers on GFX9+.
...
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
7f7da82dbb
radv: Add image layout with drm format modifiers.
...
Half of it is passing the right modifier to ac_surface, the other half
is applying the offset/strides.
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
1fbb6ff563
radv: Add drm format modifier queries.
...
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
6c83e3ea98
radv: Add format modifier format queries.
...
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
4dbbd59a01
radv: Don't relayout images with modifiers.
...
The modifier should have been the exact layout of the image. Hence
we should not relayout the image according to the implicit modifier
on memory import (i.e. VkMemory allocation).
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
f543f09e2a
radv: Use the surface offset from ac_surface instead of a plane offset.
...
In preparation for doing this with modifiers in general.
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
bd816bddf2
radv: Extract DCC format support handling.
...
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Bas Nieuwenhuizen
21f476920e
amd/common: Add modifier size helper.
...
For use in Vulkan.
Reviewed-By: Chad Versace <chad@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667 >
2021-02-02 00:43:56 +00:00
Yevhenii Kolesnikov
a678ec9b8c
nir/from_ssa: don't check for interference within the same set
...
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8246 >
2021-02-01 14:28:35 -06:00
Yevhenii Kolesnikov
fd05620e43
nir/from_ssa: consider defs in sibling blocks
...
If def a and def b are in sibling blocks, the one with higher
parent_instr's index does not necessarily come after the other.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3712
Fixes: 943ddb9458 "nir: Add a better out-of-SSA pass"
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8246 >
2021-02-01 14:27:56 -06:00
Dylan Baker
abdaf5fab8
Scons: check for timespec_get on windows as well as unices
...
windows has a timespec_get function, and if we don't check that then it
will try to fall back to using clock_gettime, which windows doesn't
have.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8592 >
2021-02-01 19:40:20 +00:00
Jason Ekstrand
f2545f22f4
vulkan: Drop the type_prefix parameter from gen_extensions
...
Now that all the drivers are converted, it's set to 'vk' by everyone so
there's no point in having the parameter.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
bafd0c680d
vulkan: Rework vk_device_init and friends
...
Now that all drivers are converted over, we can make a few changes.
First off, vk_device_init no longer takes two separate allocators
because we can assume that the parent instance is non-null and it can
pull the instance allocator from that. Second, dispatch tables and the
instance extension table are no longer optional. We leave the device
extension table optional for now because we don't do any verification at
vk_init_physical_device time and some drivers find it more convenient to
set the extensions later in their own physical_device_init for various
reasons.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
3a7514ea09
anv,radv: Use common entrypoints for VK_KHR_deferred_operation
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
23ba48a0c7
vulkan: Make the debug_report implementation internal
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
41318a5819
vulkan: Use vk_object_base::type for debug_report
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
c41eaf0add
anv: Use vk_object_base::type for debug_report
...
This is way better than the giant macro thing we had before.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
bd1705a480
vulkan: Make vk_debug_report_callback derive from vk_object_base
...
Fixes: 51c6bc13ce "anv,vulkan: Implement VK_EXT_private_data"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
19d7cf0457
radv: Switch to the common VK_EXT_debug_report
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Jason Ekstrand
3f2341767b
radv: Use common entrypoints for VK_EXT_private_data
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Dave Airlie
23f8ca0c9d
radv: port to using common dispatch code.
...
I think this has the SQTT layer hooked in correctly, would
be good if somebody could confirm this.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Dave Airlie
7d16621281
radv: move to subclassed instance/physical_device structs
...
This moves to using the common base structs for these
two objects, this is prep work for the using the common
dispatch layer code.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:25 +00:00
Dave Airlie
abbca2fa92
radv: remove all entrypoint enabled debug option
...
This was useful back at the dawn of time when apps weren't as
well developed and layers mostly sucked. I don't think it's been
used in a quite a while so remove it, as the new dispatch
layer doesn't support it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Dave Airlie
f695957421
radv: move queue object to a common base object
...
This is needed to use the new dispatch layer code. While we're here, we
clean up the context on the error path.
Fixes: 9b1138e3f0 "radv: implement VK_EXT_private_data"
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
7fe36c1187
v3dv: Switch to the common VK_EXT_debug_report
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
9933b188d2
v3dv: Use common entrypoints for VK_EXT_private_data
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Alejandro Piñeiro
21f9a88673
v3dv: port to using common dispatch code.
...
This moves v3dv over to using the new common dispatch layer code.
v2 (Jason Ekstrand):
- Remove some now dead function declarations
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Alejandro Piñeiro
3e2bbf5d50
v3dv: remove reference to v3dv_instance on v3dv_physical_device
...
As we already have a reference to vk_instance at vk_physical_device,
that we are setting when calling vk_physical_device_init.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
bde7e1c313
v3dv: Drop v3dv_instance::app_info
...
There's an equivalent data structure in vk_instance.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Alejandro Piñeiro
9c0079e0ee
v3dv: move to subclassing instance/physical device
...
This moves to using the common base structs for these two objects, but
doesn't use any of the new features yet.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
249652fc1e
lavapipe: Drop some wrappers in favor of common code
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
394708b3cb
turnip: Switch to the common VK_EXT_debug_report
...
Acked-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
3a8060271c
turnip: Drop some legacy wrappers in favor of common code
...
Acked-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
0870cf4c06
turnip: Use common entrypoints for VK_EXT_private_data
...
Acked-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
59d70c47c7
turnip: Use the common dispatch framework
...
Acked-by: Jonathan Marek <jonathan@marek.ca >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Dave Airlie
ed9e75950b
lavapipe: use common dispatch layer.
...
This moves lavapipe over to using the new common dispatch layer code.
v2 (Jason Ekstrand):
- Less pointless messing around with python and meson
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Dave Airlie
ae895d308a
lavapipe: sort extensions in proper order.
...
Subsequent patch enforces this, so just do it in advance.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Dave Airlie
ce98c8f7af
lavapipe: add missing wsi entrypoint.
...
Add support for GetPhysicalDeviceSurfaceFormats2KHR which is helpful
to make the new dispatch code work.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Dave Airlie
fd3c665df0
lavapipe: move to subclassing instance/physical device.
...
This doesn't use any of the features yet, just moves to subclassing.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
bcdf481d13
anv: Switch to the common VK_EXT_debug_report
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
eef79aab1c
vulkan: Add a truly common VK_EXT_debug_report implementation
...
Now that we've got a common vk_instance, we can put the debug_report
stuff there and make it truly common. For drivers to use this
implementation, they need to delete their own vk_debug_report_instance
and make sure everything references the common one.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
06f877f6e6
vulkan,anv: Move VK_KHR_copy_commands2 wrappers to common code
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
ac6be0ef22
vulkan,anv: Move a bunch of trivial wrappers to common code
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
f51155a349
anv: Make Get*MemoryRequirements a wrapper
...
Instead of making Get*MemoryRequirements2 call the legacy version to
fill out the base struct, put everything in Get*MemoryRequirements2 and
make the old one a trivial wrapper.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
3536bec0fa
vulkan,anv: Add common entrypoints for VK_EXT_private_data
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
f8bc9a4e7a
vulkan,anv: Move GetDeviceProcAddr to common code
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
94d02e8dea
vulkan: Add framework for common entrypoints
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
0be8200839
anv: Use the common dispatch framework
...
This commit switches ANV to using the new common physical device and
instance base structs as well as the new dispatch framework. This
should make code sharing between Vulkan drivers much easier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
4e190bc2ae
anv: Add a single anv_genX switch macro
...
This should make future platform enabling a good bit easier and more
reliable than having 3 of them.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
9be7aa3fc8
vulkan: Add a common entrypoint table generator
...
This is based on the one in ANV but it's a bit different because it uses
vk_entrypoint_table instead of vk_dispatch_table. This is because,
without knowing what extensions are implemented by a driver, we have to
generate a table with everything and sort it all out later. We use the
same trick as ANV with weak function declarations to provide NULL values
for any entrypoints NOT implemented by the driver.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
66cdc0c0db
vulkan: Add common Get*ProcAddr implementations
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
46ecbff39b
vulkan: Add entrypoint tables and related helpers
...
Entrypoint tables are distinct from dispatch tables because they are not
de-duplicated. These are needed to make codegen easier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
eff07c0407
vulkan: Add generators for instance trampoline functions
...
ANV needs these because we have a different dispatch table for each
hardware generation and Vulkan requires that the device entrypoints
returned from vkGetInstanceProcAddr work regardless of which device
they're used with.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
d360a996f9
vulkan: Add common instance and physical device structs
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
0f22fdad95
vulkan: Add dispatch table lookup helpers
...
These both look up a name by string and check to see if it's actually
supported given instance and possibly device extension tables.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
1cf035a96b
vulkan-overlay-layer: Use the new dispatch tables
...
This lets us drop the dispatch tables in enum_to_str and replace them
with the new, better versions.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
74617eea46
vulkan: Add dispatch table loading helpers
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
04f1095e84
vulkan: Add common dispatch table generation
...
This is based off the dispatch table generation in ANV with the notable
exception that these tables de-duplicate aliased entrypoints by wrapping
all aliased entrypoints in a union which contains all the aliases.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
82f5acd952
anv: Use the common extension table struct
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
e4cc52c054
vulkan: Add common extension tables
...
Unlike the per-driver tables, these contain every extension ever and
assume the maximum extension version. This later assumption is ok
because Vulkan extension versions have only been used for something
interesting once in the history of the API. If it happens again, we can
afford a special case.
This requires us to rework the extension table generation scripts
somewhat because we want to use the same script for both common and
per-driver codegen right now. To do this we add a "prefix" variable to
go alongside "driver".
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
5d6ac87d61
vulkan: Add a return code to vk_device_init
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
8ee88948e3
vulkan: Move vk_device to its own file
...
Things are going to start getting more complicated so let's avoid the
single mega-file approach.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
b283965427
lavapipe: Properly clean up vk_device
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
62f966cf44
v3dv: Properly clean up vk_device
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
ce0e5cd35b
turnip: Properly clean up vk_device
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
7e76c0ea82
radv: Properly clean up vk_device
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:24 +00:00
Jason Ekstrand
b3419512db
anv: Clean up the vk_device on the CreateDevice error path
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:23 +00:00
Jason Ekstrand
8d6cf9e1c2
vulkan/meson: Add missing dependencise on vk_extensions_gen.py
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676 >
2021-02-01 18:54:23 +00:00
Eric Anholt
8647c98440
ci/freedreno: Add Valve games and other traces now that we have GLX.
...
Two games are skipped until we fix up their runtimes (or maybe make
scheduled overnight pipelines for longer traces?)
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Eric Anholt
23350b5939
ci/freedreno: Do our piglit runs against Xorg.
...
We were using surfaceless, which misses out on some useful coverage we'd
like to have in the GLX/EGL piglit tests, but more importantly prevented
many traces from running.
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Eric Anholt
d4855d2930
ci/lava+baremetal: Add an xserver to the root fs.
...
We want to be able to test GLX and EGL on real hardware, and we can't do
that with just the surfaceless backend. Bringing up the xserver is pretty
easy.
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Eric Anholt
2e2edaa89b
docs/ci: Document setting up the http cache for traces.
...
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Eric Anholt
04a2f1462e
ci/docs: Update CI farm requirements suggestions.
...
We have a handy printout for slow tests now, and DEQP_FRACTION is now
compatible with parallel.
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Eric Anholt
2af6b53588
ci/freedreno: Use the http cache for artifacts downloads, too.
...
The gitlab artifacts handling has been slow in the past as we hit
gitlab.fdo from multiple runners, and it costs fd.o egress bandwidth. Use
the local http cache against the packet.net minio to cut that downloads
cost.
Closes : #3249
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Eric Anholt
a45810a246
ci/freedreno: Use the new nginx cache for trace downloads.
...
As we introduce bigger traces to the replay, pulling all of that down all
the way from packet is going to get unreasonable.
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Eric Anholt
18bfb74292
ci/freedreno: Drop pointless GIT_STRATEGY setting for a630.
...
It's already in place due to extending from .test.
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727 >
2021-02-01 18:32:01 +00:00
Bas Nieuwenhuizen
1eaefe6cfd
radv: Do not hash vk_object_base in descriptor set layout.
...
It contains potentially pointer-y stuff.
Fixes: 178adfa6a8 ("radv: use the base object struct types")
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8809 >
2021-02-01 17:03:43 +00:00
Samuel Pitoiset
e870796113
radv: prefer CP DMA for GTT buffer copies/clears on dGPUs due to slow PCIe
...
The CP DMA bandwidth is always better than PCIe, so I think wasting
compute resources is not a good idea. This is only enabled on GFX10+
because untested on older gens and also because RadeonSI does that.
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/8763 >
2021-02-01 12:26:20 +00:00
Samuel Pitoiset
f5a02d16a6
radv/winsys: move the initial BO domain to radeon_winsys_bo
...
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/8763 >
2021-02-01 12:26:20 +00:00
Michel Dänzer
35f59e14f8
ci: Use GNU time as meson test wrapper
...
This will hopefully give us more information about why some tests are
intermittently timing out.
Only in build jobs using the x86_build docker image for now, since
those are where we're currently seeing most such timeouts. But may
expand this later if it provides the expected benefits.
v2:
* Add comment about why we test for and use /usr/bin/time explicitly.
Acked-by: Eric Engestrom <eric@engestrom.ch > # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8776 >
2021-02-01 11:55:56 +00:00
Gert Wollny
cf23161040
r600/sfn: Use the constant buffer ID when given
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800 >
2021-02-01 10:11:49 +00:00
Gert Wollny
d81439463a
r600/sfn: Fix dual source blend lowered to FRAG_DATA
...
This fixes the Unigine benchmarks.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800 >
2021-02-01 10:11:49 +00:00
Gert Wollny
576da40a73
r600/sfn: Fix FS inputs when reading from the same position
...
Don't add another varying in this case.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800 >
2021-02-01 10:11:49 +00:00
Gert Wollny
374bc76706
r600/sfn: Add the position input as varying
...
Like this it will be handled correctly in the shader IO structure
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800 >
2021-02-01 10:11:49 +00:00
Gert Wollny
fd6c95a1b1
r600/sfn: Set unnormalized flag for z-coordinate when fetching from array
...
It shouldn't be relewant for fetch, but the TGSI code path does it, so
let's do it here as well.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800 >
2021-02-01 10:11:49 +00:00
Gert Wollny
80200c75e0
r600/sfn: Fix use of cnde_int for bcsel
...
The boolean is an int, so use the int version of the opcode.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800 >
2021-02-01 10:11:48 +00:00
Erik Faye-Lund
56f1eb9de7
docs/features: mark ssbos as done for zink
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8778 >
2021-02-01 09:23:08 +00:00
Arcady Goldmints-Orlov
e47a9938d3
v3dv: Only lower local arrays of size up to 2 to if-chains
...
Larger arrays get lowered to scratch access later, as that turns out
to be faster, while the if-chain is actually faster for arrays of
2 elements.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov
8f583df7b6
broadcom/compiler: Enable PER_QUAD TMU access only in uniform control flow
...
PER_QUAD TMU lookups will partially override the predication mask on TMU
writes. If some but not all lanes in a quad are predicated out, setting
PER_QUAD will force them all to be enabled. This can result in TMU
access to bogus addresses when in nonuniform control flow. Also, since
PER_QUAD is needed to make sure derivatives work with helper
invocations, and derivatives are undefined in nonuniform control flow,
there is no reason to leave it enabled in this case.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov
79bde75131
broadcom/compiler: Emit uniform loops using uniform control flow
...
Similarly to if statements, uniform loops are now emitted without
predication, using simple branches for breaks and continues. The
uniformity of the loop is determined by running the
nir_divergence_analysis pass.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov
6643bdbd53
broadcom/compiler: Use ANYA for branches in uniform ifs
...
Using ANYAP instead of ALLAP makes things work correctly in cases
where all lanes are masked out.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Jason Ekstrand
c7fc44f9eb
nir/from_ssa: Respect and populate divergence information
...
Reviewed-by: Arcady Goldmints-Orlov <agoldmints@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov
8fb6cbdcb6
nir: store the results of divergence analysis on loops
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov
019449dad7
nir: handle v3d intrinsics in divergence analysis
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov
349e4f3c65
nir: add more intrinsics to divergence analysis
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726 >
2021-02-01 08:11:48 +00:00
Rob Clark
824ae64477
mesa: Remove _mesa_destroy_context()
...
There was only one caller, an error path in mesa/st. But this is now
incorrect as we need align_free(). Just remove it.
Fixes: 55e853d823 ("mesa/st: Allocate the gl_context with 16-byte alignment.")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8801 >
2021-02-01 01:33:02 +00:00
Mauro Rossi
28d902dd62
android: pan/mdg: create nir pass to lower image coord bitsize
...
Fixes the following building error:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: midgard_nir_lower_image_bitsize
>>> referenced by midgard_compile.c:321 (external/mesa/src/panfrost/midgard/midgard_compile.c:321)
Fixes: db725e1d52 ("pan/mdg: create nir pass to lower image coord bitsize")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8802 >
2021-02-01 00:52:19 +01:00
Vinson Lee
c897f7a722
v3dv: Fix assert.
...
Fix defect reported by Coverity Scan.
Side effect in assertion (ASSERT_SIDE_EFFECT)
assignment_where_comparison_intended: Assignment job->ez_state =
VC5_EZ_DISABLED has a side effect. This code will work differently in a
non-debug build.
Fixes: cec2ed7c80 ("v3dv: fix disabling Early Z for the whole frame")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8666 >
2021-01-31 22:28:53 +00:00
Vinson Lee
70652885e3
lima: Fix typos.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8658 >
2021-01-31 11:27:40 -08:00
Marek Olšák
e014e3b6be
mesa: don't count buffer references for the context that created them
...
See mtypes.h - it gives you the top level view of how it works, and other
code contains a lot of comments.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8606 >
2021-01-30 21:57:58 +00:00
Marek Olšák
c679e7debd
mesa: pop all textures up to NumCurrentTexUsed, not just MaxTextureUnits
...
glPush/PopAttrib had 2 defects:
- Only MaxTextureUnits were pushed and popped (which is 8 at most).
- If some texture units had been unused, we would still push/pop them.
This fix changes how many units we push and pop to NumCurrentTexUsed,
which is the maximum texture unit + 1 that was used to by the user.
This commit:
- In glPushAttrib, save NumCurrentTexUsed texture units.
- In glPopAttrib, restore the same number of texture units, and if
NumCurrentTexUsed has increased since glPushAttrib, bind 0 in the newly
used units to get them to the state before glPushAttrib.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
81e6f6ef0c
mesa: don't push/pop default texture attributes redundantly
...
Since default texture objects are bound in almost all texture units and all
texture targets, we can skip saving and restoring their attributes if we
just do that for default texture objects outside the loop saving all texture
units.
This reduces CPU time spent in glPushAttrib from 2.1% to 1.35% in one
subtest of viewperf13/catia.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
5da8352225
mesa: don't save gl_shared_state in glPushAttrib
...
glPushAttrib only saves values and names. It doesn't save objects.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
8706e97ffd
mesa: partially skip glPush/PopAttrib for MSAA textures and texture buffers
...
This is based on the GL 4.6 Compatibility profile spec. Some fields just
don't have to be restored. This decreases CPU overhead.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
68030bbf73
mesa: only pop states in glPopAttrib that have been changed since glPushAttrib
...
PopAttribState records all state changes. glPopAttrib uses it to skip
restoring state groups that haven't been changed.
This eliminates a lot of glPopAttrib overhead.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
807c365c5e
mesa: optimize out _NEW_ALL in glPopAttrib(GL_ENABLE_BIT)
...
I reviewed all affected states and this if the minimum attrib mask.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
cd0148dd38
mesa: fix trivial bugs in glPopAttrib
...
There were quite a few. Hopefully the comments make it clear.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
674d275f59
mesa: for every state change, remember states we changed for glPopAttrib
...
The idea is to restore only those states in glPopAttrib that have been
changed. This will reduce glPopAttrib overhead a lot.
This is based on the state tables in the OpenGL 4.6 Compatibility Profile
specification and many extension specifications.
This code might superfluously flag GL_TEXTURE_BIT for texture and
sampler functions that don't have effect on states popped by glPopAttrib,
but I don't wanna test my luck and make a mistake. Thus,
if _NEW_TEXTURE_OBJECT if flagged, GL_TEXTURE_BIT is usually flagged too.
This has no effect on glPopAttrib yet. glPopAttrib will use this in a later
commit. This only adds attrib masks into FLUSH_VERTICES based on specs.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:29 -05:00
Marek Olšák
a1f16b59b3
mesa: flush glBegin/End before changing GL_DEPTH_STENCIL_TEXTURE_MODE
...
Fixes: 23e81b93bb "mesa: Add core API support for GL_ARB_stencil_texturing (from 4.3)."
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:25:26 -05:00
Marek Olšák
35be83846e
mesa: fix glPopAttrib for many texture fields
...
Move the fields that should be restored by glPopAttrib into the Attrib
structure, which is the only portion of texture objects that is restored
by glPopAttrib. Also moves fields that should not be restored by glPopAttrib
out of the Attrib structure.
This is based on the GL 4.6 Compatibility spec.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:23:53 -05:00
Marek Olšák
230b46bcee
mesa: don't push/pop gl_texture_object::Target
...
This field is immutable because each texture unit is an array of texture
target slots and only matching targets can be bound into each slot.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:23:53 -05:00
Marek Olšák
6c0a8ddb6f
mesa: optimize glPopAttrib(GL_VIEWPORT_BIT)
...
We can just copy the variables because they are already clamped
to ctx->Const limits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:23:53 -05:00
Marek Olšák
a04939662d
mesa: optimize most _mesa_ActiveTexture calls in glPopAttrib
...
_mesa_ActiveTexture changes CurrentUnit and the texture matrix stack
if the matrix mode is a texture matrix. In these cases, the texture matrix
stack is not touched.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:23:53 -05:00
Marek Olšák
a4490541c6
mesa: remove/replace FLUSH_VERTICES when it doesn't do anything
...
In _mesa_PopAttrib, we call FLUSH_VERTICES at the beginning, so we don't
need to do it again.
In the MultiMode functions, we call standard Draw functions
using the dispatch, which do the flushing by themselves.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181 >
2021-01-30 16:23:53 -05:00
Marek Olšák
85d300ecd1
radeonsi: precompute NGG cull flags in si_create_rs_state
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
47587758f2
radeonsi: prefetch VB descriptors right after uploading
...
This skips the logic that sets and checks prefetch_L2_mask.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
d5b529ad14
radeonsi: set VB user SGPRs in si_upload_vertex_buffer_descriptors
...
so that we don't have to enter the state emit loop and invoke the more
complicated function si_emit_graphics_shader_pointers.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
81139adad0
radeonsi: reorganize si_draw_vbo for lower register pressure (part 2)
...
Move statements that use the least number of local variables as close
to the beginning as possible. Also move local variables closer to their use.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
c2671ffd75
radeonsi: reorganize si_draw_vbo for lower register pressure (part 1)
...
Move statements that use the least number of local variables as close
to the beginning as possible. Also move local variables closer to their use.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
6193aab655
radeonsi: optimize si_emit_prefetch_L2 when it's split
...
When using the prefetch with VS_ONLY=true followed by VS_ONLY=false,
we tested the VS_ONLY bits in the mask when executing VS_ONLY=false where
the bits were always 0. It's also useless to clear the prefetch mask when
VS_ONLY=true.
This commit skips those tests by splitting the function properly using
BEFORE_DRAW and AFTER_DRAW template parameters.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
c28396cf20
radeonsi: don't check for redundant and NULL states in si_emit_all_states
...
All places set dirty_states correctly now.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
11293d71f2
radeonsi: delete si_pm4_delete_state
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
d4b503d0bc
radeonsi: move si_pm4_delete_state logic into si_pm4_free_state
...
also clear dirty_states.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
b0bc5edfbd
radeonsi: mark shader_pointers dirty once outside the upload descriptors loop
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
e8dda30c6f
radeonsi: optimize no-op cases in si_upload_shader_descriptors
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:41:23 -05:00
Marek Olšák
e93b42c214
ac,radeonsi: track memory usage in KB to reduce types from uint64 to uint32
...
Decreasing the time spent in radeon_cs_memory_below_limit is the motivation.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794 >
2021-01-30 15:38:15 -05:00
Dylan Baker
205e737f51
docs: update calendar for 21.0.0-rc3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8791 >
2021-01-29 20:14:07 -08:00
Dylan Baker
41997bb860
docs: update calendar for 21.0.0-rc2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8791 >
2021-01-29 20:13:58 -08:00
Dylan Baker
ea6f5ef779
docs: update calendar and link releases notes for 20.3.4
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8791 >
2021-01-29 20:13:33 -08:00
Dylan Baker
98d21ee5e1
docs: Add sha256sum for 20.3.4
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8791 >
2021-01-29 20:13:14 -08:00
Dylan Baker
ea26354ce7
docs: add release notes for 20.3.4
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8791 >
2021-01-29 20:13:10 -08:00
Caio Marcelo de Oliveira Filho
1869072c80
spirv: Store SPIR-V version of the module
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8786 >
2021-01-29 23:36:29 +00:00
Caio Marcelo de Oliveira Filho
a0d73ca65c
spirv: Don't remove dead variables in create_library mode
...
The issues fixed by the removal happen when a module has multiple
entry points and conflicting global variables. Neither conditions are
expected in a library.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8786 >
2021-01-29 23:36:29 +00:00
Caio Marcelo de Oliveira Filho
fd44bcf9a8
spirv: Don't bother counting num_images/num_textures
...
Not only these are recalculated in nir_shader_gather_info, but
currently they are also counting all the images / textures in the
module instead of in the shader (entrypoint).
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8786 >
2021-01-29 23:36:29 +00:00
Eric Anholt
55e853d823
mesa/st: Allocate the gl_context with 16-byte alignment.
...
The _ModelProjectMatrix matrix embedded inside has members inside of it
marked as 16-byte aligned, and so the context also has to be 16-byte
aligned or access to those members would be invalid. I believe the
compiler used this to use better 16-byte-aligned load/stores to other
members of the context, breaking when the context's alignment was only 8
(as normal mallocs guarantee).
Fixes: 3175b63a0d ("mesa: don't allocate matrices with malloc")
Tested-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8783 >
2021-01-29 22:58:57 +00:00
Dave Airlie
25c70a9a1e
lavapipe: add missing loader interface negoitation
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8769 >
2021-01-30 07:59:59 +10:00
Michael Tang
f026345b34
microsoft/compiler: Make resource_state_manager only build with_gallium_d3d12
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8785 >
2021-01-29 12:54:02 -08:00
Benjamin Tissoires
8deca5a72e
CI: windows: Force using LLVM 12
...
LLVM is moving to the 13 release, but LLVM-SPIRV is still so in the past.
Given that LLVM 12.0.0 is still not out (we are at 12.0.0-rc1 today),
use the `release/12.x` branch for LLVM.
We should also tag LLVM-SPIRV, but... it seems that they haven't caught up
yet, so keep using the master branch, but add a note for a future
committer.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8740 >
2021-01-29 17:54:56 +00:00
Benjamin Tissoires
a69ab2ae36
CI: windows: split the layers to meet new registry requirements
...
The new registry caching in place for registry.fd.o can not handle layers
bigger than 5 GB. The last layer we used to build on windows was 5.2 GB,
meaning that the upload would fail.
Split the layers by calling multiple `RUN`, hoping that the size will be
roughly split between those steps if we have a special layer for VS2019.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8740 >
2021-01-29 17:54:56 +00:00
Benjamin Tissoires
0ef1f418bb
CI: windows: augment the timeout of building the windows container
...
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/6898838 failed at
uploading the containers but got kicked out right before being able to
give us a valid error.
Bump the timeout for windows container builds, to not have this
unfortunate situation.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8740 >
2021-01-29 17:54:56 +00:00
Mike Blumenkrantz
d76f51d6fd
glsl: support 64bit integer loop iterators
...
this was crashing due to the assumption that non-32bit integer values must be
floats
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7316 >
2021-01-29 17:13:14 +00:00
Alyssa Rosenzweig
234ba13f10
pan/bi: Add packing format tests
...
These are based on reference outputs generated by the blob.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
9497d8025f
pan/bi: Test pack_sync
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
e0a5e5eb15
pan/bi: Test pack_tuple_bits
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
7898decbd3
pan/bi: Test pack_upper
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
e383af639a
pan/bi: Test pack_literal
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
80157fac68
pan/bi: Add packing unit test group
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
4379f7bad2
pan/bi: Pack multiple tuples per clause
...
Use all of the new helpers to pick formats and use them.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
9362a13982
pan/bi: Calculate pos for constant packing
...
We do not yet support multiple (format 12 quadword) constants per clause
but this is a step in the right direction.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
51f13185c8
pan/bi: Add pack_format helper
...
Packs a single quadword of a clause with a particular format and
parameters.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
0e9a05c004
pan/bi: Add subword 4 or 7 pack
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
1adb996acc
pan/bi: Add subword 5/6 pack
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
038bb8eabe
pan/bi: Add tuple/embedded constant pack
...
Used for the first 4 subwords.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
2258acf5ca
pan/bi: Add bi_pack_sync
...
The type/sync byte, also known as the tag.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
5f523c60fc
pan/bi: Add bi_pack_tuple_bits
...
More general than the top 3 bit special case. There's some serious
complication around 78-bit shifting but I digress.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
0812a5204b
pan/bi: Add bi_pack_upper
...
Top 3-bits, found e.g. in the tag.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
62696e5ff5
pan/bi: Add bi_pack_literal
...
Identifies formats.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
576a94b7b8
pan/bi: Move bi_packed_tuple to compiler.h
...
To be used for pack prototype.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
9496689f57
pan/bi: Add clause encodings as a table
...
We would rather not type out all of the packs by hand (that's error
prone), so declaratively specify the encodings as a table corresponding
to the bit patterns.
This is all formats, except for format 12 which just encodes constants.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
34a80e910e
pan/bi: Pack multiple tuples in-memory
...
There's still some silly clause-level packing required, but this way the
register slots are at least assigned correctly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
fb8b80843c
pan/bi: Amend misleading comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
4b480444e1
pan/bi: Clarify tuple comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
47348db7e8
pan/bi: Use enum bifrost_message_type
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
ce2ef3dad6
pan/bi: Use canonical terminology for tuple
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
f74dda9377
pan/bi: Move bi_constants to bifrost.h
...
Although it's software-defined, this stems from architectural traits and
is useful in both the disasm and the compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
ac2b8a56cd
pan/bi: Test read predicates
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
d0e88a2c2e
pan/bi: Test bi_must_message
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
e3436e784e
pan/bi: Test bi_must_last
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
7bd6ca934d
pan/bi: Unit test bi_can_{fma, add}
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
c05092d9a3
pan/bi: Add various read predicates
...
Correpsonding to source masks in the XML.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
ea402eae03
pan/bi: Emit branch and table bits in opcode table
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
674ec5dc3f
pan/bi: Label table instructions
...
Table instructions are a subset of those scheduled to the ADD unit. They
typically involve lookup tables. Table (TBL) instructions have
additional restrictions on their sources which the scheduler must
respect.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
56e35a4022
pan/bi: Add bi_must_message predicate
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
ab4234bdf0
pan/bi: Add bi_must_last predicate
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
eb217914f7
pan/bi: Pipe last flag into opcode tables
...
Only ADD unit for now.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
df4960499e
pan/bi: Annotate ISA.xml with 'last' parameter
...
If this instruction must be the last in the clause.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
31a7e49613
pan/bi: Add bi_can_{fma, add} predicates
...
Stubs due to some edge cases, for the scheduler.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
7434f31e09
pan/bi: Factor nir_function_impl out of the context
...
Unnecessary and complicates unit testing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
114a0f9798
pan/bi: Stub out scheduler unit test
...
Someone who understands meson and gtest could do something much nicer,
but for now let's just stuff some assertions into debug builds of the
standalone compiler and call it a day...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
81692b6d2c
pan/bi: Add "word equivalence" relation for index
...
Takes offset *but not swizzle* into account, so the scheduler can
predict whether indices will end up mapped to the same scalar register.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
ab6f05eabd
pan/bi: Move init_builder to common code
...
Needs to take a cursor to be applicable outside NIR->BIR of course.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
60c0df2c3b
pan/bi: Print multiple destinations if needed
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
a7cc458dc4
pan/bi: Add CUBEFACE pseudoinstruction
...
Abstracts over *CUBEFACE1/+CUBEFACE2, takes the sources of the former
and outputs two destinations.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:44 +00:00
Alyssa Rosenzweig
44726101d1
pan/bi: Don't fill garbage
...
If an index is an SSA form and we haven't even written to it yet, there
is absolutely no value in filling it, it'd just be uninitialized garbage
that won't get used. Saves some fills in STK.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
ee7aaa27b8
pan/bi: Implement spilling at the clause-level
...
We use essentially the same logic, but we need to treat entire clauses
as large instructions, and spill on clause boundaries instead of
instruction boundaries. So factor out the code a bit, using the new
iterators, removing bi_unwrap_singleton.
A few specific fixes are needed to adapt. One is simple: rewriting
destinations needs to preserve clamps and such. The other is a much more
subtle bug. Consider the clause
{
ADD 0, ...
---unrelated code---
MUL 1, 0, ...
}
Suppose we spill 0. The naive spill code would generate an SSA temporary to
spill to and another SSA temporary to fill from, generating:
{
LOAD.tl 10
}
{
ADD 11, ...
---unrelated code---
MUL 1, 10, ...
}
{
STORE.tl 11
}
But this is wrong; the MUL now reads stale (and for SSA, likely
undefined/uninitialized) data. The simplest fix, employed here, is to
spill/fill within a clause simultaneously, which means the temporary
can't be SSA, generating correct code:
{
LOAD.tl r0
}
{
ADD r0, ...
---unrelated code---
MUL 1, r0, ...
}
{
STORE.tl r0
}
This is suboptimal, since the LOAD is still likely reading garbage that
is unused. But it is still correct, and the next commit will avoid
generating the load in this case.
To make the bug even more subtle, if ADD/MUL are within 2-3 instructions
of each other, the scheduler will optimize the load to a
temporary/passthrough, so the bug isn't noticed. It only happens if they
are 3+ instructions apart yet still in the same clause (<=16
instructions).
Special thanks to macc24 for reporting this bug and to Jason Ekstrand
for allowing me to rubberduck.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
c578ca7393
pan/bi: Add interference per clause
...
With new helpers.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
108e10f32a
pan/bi: Permit multiple destinations in RA
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
07b13647cb
pan/bi: Don't open code bi_foreach_dest
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
083a658ee8
pan/bi: Add destination iterator macro
...
Convenience.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
eca516ebdb
pan/bi: Add bi_foreach_instr_in_clause iterators
...
These are convenient for post-sched passes, in particular register
allocation. They work by noting the underlying linked list of
instructions in the block must be preserved by scheduling. It isn't
necessary iterate the clause structure directly, it can simply be used
to bound a iteration within the block by recalling clauses are strictly
contained in a single block.
<alyssa> I don't think I'm enough of a C ninja to write fancy iterator macros yet.
<zmike> sometimes those can get pretty mind-bendy
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
62239f68b7
pan/bi: Add bi_foreach_instr_in_tuple helper
...
Written in a funny way but easy to convince yourself of correctness by
considering cases.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
2f785ad9ac
pan/bi: Add bi_foreach_clause_in_block_rev
...
Trivial absense.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
ec0d0426d6
pan/bi: Add bi_{before,after}_clause cursors
...
Will be needed to insert spill code after scheduling once we have
multiple instructions in a clause.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
3ce67cb0d9
pan/bi: Add "soft" mode to DCE
...
We would like to reuse the DCE logic to eliminate register writes
without eliminating instructions, as a post-sched pass. This type of
operation will eventually generalize to intrinsics that write a register
*and* have side effects (just atomics, I think).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
623bd2127f
pan/bi: Add dead branch elimination pass
...
Ported from Midgard due to the same quirk of our code generation.
Additional validation, though.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
d0902aa2d4
pan/bi: Pass through wait_{6, 7} flags
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
19b195d3bf
pan/bi: Move bi_next_clause to bir.c
...
Not really packing specific anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
2492074d3d
pan/bi: Pull out bi_count_read_registers helper
...
I want to transition away from the ad hoc masks anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
a69c73988b
pan/bi: Fix M1/M2 decoding in disassembler
...
C's definition of the % operator has a footgun around sign conversion.
Avoid it and just use bitwise arithemtic instead like the hardware
would, fixing the disassembly and making buggy assembly more obvious.
Fixes: 08a9e5e3e8 ("pan/bi: Decode M values in disasm")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
6f28a4449a
pan/bi: Fix dependency wait calculation
...
Unconditional branches have a successor in the first slot only.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
6cb0a0ad63
pan/bi: Fix staging register packing
...
Writes are from the previous tuple, not the current one, otherwise we
incorrectly write to "two" places at once and raise an INSTR_INVALID_ENC
fault. While we're at it, fix the weird spacing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
bca242c785
pan/bi: Fix IDLE register mode packing
...
Was incorrectly returning zero. Special case like IDLE_1.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
f1d551ea9f
pan/bi: Print disasm/stats with DEBUG=internal
...
Arguably more important than the IR prints.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
d3c92d32ba
pan/bi: Lint for infinite loops
...
I would make this unconditional, but conditionally branching to the same
clause in a tight loop is (disturbingly) legal, as far as I know.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
63c2ee2c4c
pan/bi: Refactor PC-relative printing
...
Let's get the offset in a named variable for validation.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
24991d787f
pan/bi: Print FAU index in verbose mode
...
Even if we're not loading a uniform, this is useful information. The
uniform pretty-printing didn't correspond well to the hardware anyway so
this is a net win, although if somebody really wanted pretty-printing
could be added in here.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
15d03ed783
pan/bi: Validate format 12 tuple count in disasm
...
We were throwing away this information. Let's just use a lookup table
and add an assertion. Would have caught a bug in this series resulting
in INSTR_INVALID_ENC faults.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
61af9cb76b
pan/bi: Add internal debug flag
...
Since 3186401751 ("pan/bi: Suppress disassembly for internal shaders"),
we haven't had a good way to debug blit shaders. I keep rewriting this
patch manually, let's just a debug flag for it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
b1ebe7a19b
panfrost: Allow waiting on slots 6/7 during preload
...
I don't understand the underlying uarch details but ATEST needs to wait
on slot 6 and BLEND needs to wait on both, so these bits are used if
ATEST/BLEND are in the first clause, which happens if e.g. a constant
colour is written, or if the input is preloaded.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Alyssa Rosenzweig
a5780cdb9b
panfrost: Fix TLS sizing if cores are missing
...
I have no idea if there are any implementations we care about that have
missing shader cores (a mask of 1101 or something like that), but if one
crops up, this would be a royal pain to debug so let's just get it
right...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723 >
2021-01-29 16:55:43 +00:00
Mike Blumenkrantz
26b009b054
zink: move tess/geom shader info to vs shader key
...
now that there exists a shader key for vertex stages, we can stop modifying
the zink_shader values and instead use this as a more reliable method of detecting
the state
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8682 >
2021-01-29 15:38:06 +00:00
Mike Blumenkrantz
9b8c121917
zink: flag shaders as needing update when clip_halfz changes
...
this means we may or may not need to run the nir pass in the shader,
so force this to go back through the update path using the shader key
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8682 >
2021-01-29 15:38:06 +00:00
Mike Blumenkrantz
03971d8ddc
zink: add shader key for vs shaders
...
we're reusing these for tes/gs for now too
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8682 >
2021-01-29 15:38:06 +00:00
Mike Blumenkrantz
079f348a5c
zink: flag previous vertex stages as dirty when toggling a later stage
...
this ensures that the correct variant is used for streamout and halfz
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8682 >
2021-01-29 15:38:06 +00:00
Mike Blumenkrantz
aedde2d60d
zink: improve barrier helper for buffer resources and add check for barrier need
...
now we've got the ability to add fine-grained barriers for buffer resources, so we
can also have a utility function to check whether we need to use barriers and
then skip them when we don't
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8669 >
2021-01-29 13:21:37 +00:00
Mike Blumenkrantz
49ee821eb9
zink: add helper function for checking if access flags include write access
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8669 >
2021-01-29 13:21:37 +00:00
Mike Blumenkrantz
1077bd0c64
zink: add a stage param for buffer resource barriers
...
it's useful to be able to set this more granularly when doing resource
barriers
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8669 >
2021-01-29 13:21:37 +00:00
Mike Blumenkrantz
37cd4070e8
zink: add barrier helper for buffer resources
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8669 >
2021-01-29 13:21:36 +00:00
Samuel Pitoiset
718c4726f3
radv: fix centroid with VRS coarse shading
...
Ported from RadeonSI.
Cc: mesa-stable
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/8775 >
2021-01-29 12:53:15 +00:00
Samuel Pitoiset
c092ff2f2f
radv: re-disable TC-compat HTILE for D32S8 on all generations
...
This actually introduced some VRS related regressions and some others.
Fixes: cc5b6a0e89 ("radv: enable TC-compat HTILE with D32S8 and MSAA on GFX9+")
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/8777 >
2021-01-29 13:29:32 +01:00
Marcin Ślusarz
97c3ec6116
intel/compiler: cache computed register pressure benefit
...
This halves the number of calls to get_register_pressure_benefit
and decreases shader-db CPU time by ~1.5%.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8741 >
2021-01-29 11:31:39 +00:00
Pierre-Eric Pelloux-Prayer
5dc823304b
radeonsi/sqtt: forward string markers to sqtt
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8746 >
2021-01-29 08:44:12 +00:00
Pierre-Eric Pelloux-Prayer
3bd5120a57
radeonsi/sqtt: allow AMD_THREAD_TRACE_TRIGGER to be a frame number
...
This makes it easier to capture the exact same frame (for instance from an
apitrace replay).
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8746 >
2021-01-29 08:44:11 +00:00
Pierre-Eric Pelloux-Prayer
80c3ed147b
radeonsi/sqtt: fix SQTT bo size overflow
...
Ported from c40ea24ee0
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8746 >
2021-01-29 08:44:11 +00:00
Pierre-Eric Pelloux-Prayer
f2d57d28ed
radeonsi/sqtt: use more event identifier
...
Using event identifiers allows to add a bit more context to the RGP trace.
Without this all draw calls are identified as vkCmdDraw.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8746 >
2021-01-29 08:44:11 +00:00
Pierre-Eric Pelloux-Prayer
a77834cecf
ci: split src/mesa/**/* matching rule
...
Split the rule to avoid running useless tests when touching the driver specific
sources.
v2: removed src/mesa/drivers/x11/**/*
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Eric Anholt <eric@anholt.net > (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8735 >
2021-01-29 09:18:24 +01:00
Kenneth Graunke
84a38ec133
iris: Enable PIPE_CAP_SHAREABLE_SHADERS.
...
Now that we store shader variants in the objects themselves rather
than a per-context hash table, they are actually global across
contexts. We can enable this feature.
This makes shaders shared across contexts, so apps can compile in
one and use it in another. This has always been allowed by GL,
but in the past we've simply recompiled the shaders in every context,
which is slow and painful.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7668 >
2021-01-29 06:26:29 +00:00
Kenneth Graunke
1afed51445
iris: Store a list of shader variants in the shader itself
...
We've traditionally stored shader variants in a per-context hash table,
based on a key with many per-stage fields. On older hardware supported
by i965, there were potentially quite a few variants, as many features
had to be emulated in shaders, including things like texture swizzling.
However, on the modern hardware targeted by iris, our NOS dependencies
are much smaller. We almost always guess the correct state when doing
the initial precompile, and so we have maybe 1-3 variants. iris NOS
keys are also dramatically smaller (4 to 24 bytes) than i965's.
Unlike the classic world, Gallium also provides a single kind of object
for API shaders---pipe_shader_state aka iris_uncompiled_shader. We can
simply store a list of shader variants there. This makes it possible
to access shader variants across contexts, rather than compiling them
separately for each context, which better matches how the APIs work.
To look up variants, we simply walk the list and memcmp the keys.
Since the list is almost always singular (and rarely ever long),
and the keys are tiny, this should be quite low overhead.
We continue storing internally generated shaders for BLORP and
passthrough TCS in the per-context hash table, as they don't have
an associated pipe_shader_state / iris_uncompiled_shader object.
(There can also be many BLORP shaders, and the blit keys are large,
so having a hash table rather than a list makes sense there.)
Because iris_uncompiled_shaders are shared across multiple contexts,
we do require locking when accessing this list. Fortunately, this
is a per-shader lock, rather than a global one. Additionally, since
we only append variants to the list, and generate the first one at
precompile time (while only one context has the uncompiled shader),
we can assume that it is safe to access that first entry without
locking the list. This means that we only have to lock when we
have multiple variants, which is relatively uncommon.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7668 >
2021-01-29 06:26:29 +00:00
Kenneth Graunke
578cd00d93
iris: Refcount shader variants
...
There is a small gap of time where the currently bound uncompiled
shaders, and compiled shader variant, are out of sync. Specifically,
between pipe->bind_*_state() and the next draw.
Currently, shaders variants live entirely within a single context,
and when deleting an iris_uncompiled_shader, we check if any of its
variants are currently bound, and defer deleting those until the next
iris_update_compiled_shaders() hook runs and binds new shaders to
replace them. (This is due to the time gap between binding new
uncompiled shaders, and updating variants at draw time when we have
the required NOS in place.)
This works pretty well in a single context world. But as we move to
share compiled shader variants across multiple contexts, it breaks down.
When deleting a shader, we can't look at all contexts to see if its
variants are bound anywhere. We can't even quantify whether those
contexts will run a future draw any time soon, to update and unbind.
One fairly crazy solution would be to delete the variants anyway, and
leave the stale pointers to dead variants in place. This requires
removing any code that compares old and new variants. Today, we do
that sometimes for seeing if the old/new shaders toggled some feature.
Worse than that, though, we don't just have to avoid dereferences, we'd
have to avoid pointer comparisons. If we free a variant, and quickly
allocate a new variant, malloc may return the same pointer. If it's
for the same shader stage, we may get a new different program that has
the same pointer as a previously bound stale one, causing us to think
nothing had changed when we really needed to do updates. Again, this
is doable, but leaves the code fragile - we'd have to guard against
future patches adding such checks back in.
So, don't do that. Instead, do basic reference counting. When a
variant is bound in a context, up the reference. When it's unbound,
decrement it. When it hits zero, we know it's not bound anywhere and
is safe to delete, with no stale references. This ends up being
reasonably cheap anyway, since the atomic is usually uncontested.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7668 >
2021-01-29 06:26:29 +00:00
James Park
bef0af3f21
microsoft: Fix comma in variadic macro for MSVC
...
New preprocessor seems to be enabled by default when C17 mode is active.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8772 >
2021-01-29 05:43:31 +00:00
James Park
3c7062417b
gallium/tessellator: Fix warning suppression
...
Single-line version of MSVC warning suppression does not extend beyond
the #endif directive. Use push/disable/pop instead.
Also suppress 26452, which is a similar analysis warning.
This could also be fixed with constexpr if, but C++17 would be required.
Fixes: 790516db0b ("gallium/swr: fix gcc warnings")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8093 >
2021-01-29 05:17:38 +00:00
Icecream95
4fec6c9448
panfrost: Add the tiler heap to fragment jobs
...
In some cases the GPU reads from the tiler heap in fragment jobs, so
always add it to GPU jobs.
Fixes faults in many applications that use multiple windows
(e.g. Firefox, plasmashell).
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4157
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8773 >
2021-01-29 02:59:05 +00:00
Marek Olšák
d860b61f09
glapi: guard against invalid XML definitions for glthread
...
This would have prevented the bug that the previous commit fixes.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8753 >
2021-01-29 02:28:42 +00:00
Marek Olšák
b5a0714aae
glthread: fix glVertexAttribDivisor calls not being tracked by non-VBO uploads
...
marshal_call_after is ignored if the function is an alias of another
function. Move it to the right place.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8753 >
2021-01-29 02:28:42 +00:00
Marek Olšák
76c322a48d
glthread: fix interpreting vertex size == GL_BGRA for vertex attribs
...
Fixes: c9c9f57b02 - glthread: track pointers and strides for Pointer & EXT_dsa attrib functions
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4116
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8753 >
2021-01-29 02:28:42 +00:00
Eric Anholt
b308d56e20
ci: Update baremetal kernel to 5.11-rc5 plus patches.
...
The dr_mode hack is now folded into the git tree. The uprev brings in a
shrinker fix for msm and a fix for the GPU_SET OOB messages on cheza
(possibly involved in piglit flakes).
Reviewed-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8768 >
2021-01-29 01:30:46 +00:00
Kenneth Graunke
97fbe2d45f
iris: Move VS draw parameter dirty flagging to iris_bind_vs_state
...
Now that we're looking at shader info system values rather than
vs_prog_data, there's no reason we have to do this when updating
the shader variants. We can simply check it when binding a new
shader from the API point of view.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8759 >
2021-01-29 01:24:14 +00:00
Kenneth Graunke
fdbb5d4dd9
iris: Minor code restyling in iris_bind_vs_state
...
We'll be adding more code here shortly, this will make it easier.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8759 >
2021-01-29 01:24:14 +00:00
Kenneth Graunke
ddfdd94468
iris: Use shader_info rather than vs_prog_data for draw parameter checks
...
brw_compile_vs sets the vs_prog_data fields based on the NIR program's
system values read info field. We can use that directly, enabling more
cleanups in the next patches.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8759 >
2021-01-29 01:24:14 +00:00
Bas Nieuwenhuizen
d938fcefb9
radv: Expose VK_KHR_workgroup_memory_explicit_layout.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8752 >
2021-01-29 00:05:36 +01:00
Eric Anholt
7d0c940d70
freedreno: Remove duplicate bc invalidate on flush_write_batch().
...
The fd_batch_flush() internals already do the invalidate at the end to
clean up the bc's references to the batch.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8729 >
2021-01-28 14:50:43 -08:00
Eric Anholt
f179594cf9
freedreno: Early-out from the resource write path when we're the writer.
...
No need to do the other checks in this case, because then we know that
we've done the UBWC clears and recursed on stencil and added deps on read
batches.
Done as a separate patch to reduce behavior changes in my upcoming move of
the batch cache to the context.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8729 >
2021-01-28 14:50:43 -08:00
Eric Anholt
d1a0eba241
freedreno: Use a real type instead of void * for the fd_batch->key.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8729 >
2021-01-28 14:48:45 -08:00
Jesse Natalie
695d3bcb12
mapi: Undefine MemoryBarrier
...
Reviewed-by: Marek Olák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8661 >
2021-01-28 18:35:13 +00:00
Jesse Natalie
92f1b6bad5
glapi: Undefine MemoryBarrier
...
Reviewed-by: Marek Olák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8661 >
2021-01-28 18:35:13 +00:00
Jordan Justen
4656be70dd
anv: Support multiple engines with DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT
...
v2 (Jason Ekstrand):
- Separate the anv_gem interface from anv_queue internals
- Rework on top of the new anv_queue_family stuff
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:33 +00:00
Jordan Justen
c5e7c91487
anv: Add anv_gem_count_engines
...
v2 (Jason Ekstrand):
- Take a drm_i915_query_engine_info
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:33 +00:00
Jordan Justen
5d84c764fd
anv: Gather engine info from i915 if available
...
v2 (Jason Ekstrand):
- Don't take an anv_physical_device in anv_gem_get_engine_info()
- Return the engine info from anv_gem_get_engine_info()
- Free the engine info in anv_physical_device_destroy()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:33 +00:00
Jordan Justen
c0d07c838a
anv: Support i915 query (DRM_IOCTL_I915_QUERY) from Linux v4.17
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:33 +00:00
Jordan Justen
8d07f71918
anv: Print queue number with INTEL_DEBUG=bat
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:33 +00:00
Jordan Justen
9fd0806621
anv: Turn device->queue into an array
...
Rework: Lionel
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:33 +00:00
Jordan Justen
40d4799d8a
anv: Add exec_flags to anv_queue
...
This may vary based on the newer kernel engines based contexts.
v2 (Jason Ekstrand):
- Initialize anv_queue::exec_flags in anv_queue_init
- Don't conflate this with refactors to get_reset_stats
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:33 +00:00
Jason Ekstrand
89ae945730
anv: Add an anv_queue_family struct
...
This is modeled on anv_memory_type and anv_memory_heap which we already
use for managing memory types. Each anv_queue_family contains some data
which is returned by vkGetPhysicalDeviceQueueFamilyProperties() verbatim
as well as some internal book-keeping bits. An array of queue families
along with a count is stored in the physical device. Each anv_queue
then contains a pointer to the anv_queue_family to which it belongs.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:32 +00:00
Lionel Landwerlin
4b920ba5ab
anv: store queue creation flags on anv_queue
...
v2 (Jason Ekstrand):
- Pass the whole VkDeviceQueueCreateInfo into anv_queue_init()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:32 +00:00
Jason Ekstrand
e18d045b69
anv: Refactor anv_queue_finish()
...
By moving vk_object_base_finish() to the end and putting the thread
clean-up in an if block we both better mimic anv_queue_init() and have a
more correct object destruction order. It comes at the cost of a level
of indentation but that seems to actually make the function more clear.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:32 +00:00
Lionel Landwerlin
34721e2af4
anv: pass context to reset stats helper
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:32 +00:00
Jason Ekstrand
e2cd83fbc5
anv: Fix an old parameter name in GetDeviceQueue
...
I don't know if this is a typo or an artifact of ancient versions of the
Vulkan API. In any case, it's wrong.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:32 +00:00
Jason Ekstrand
dc8d74a555
anv: Drop anv_dump
...
I originally wrote this several years ago to aid in app debugging. Now
that we have nice tools like RenderDoc, it's no longer needed. I don't
think anyone's really used it in 4 years or more.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667 >
2021-01-28 18:26:32 +00:00
Witold Baryluk
65ef4a2e02
util: Use explicit relaxed reads for u_queue
...
These are no-op, but make clang thread sanitizer happy.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8230 >
2021-01-28 18:07:09 +00:00
Jason Ekstrand
f3a43e36e0
intel/fs: Add an ex_desc field to fs_inst for SHADER_OPCODE_SEND
...
I meant to do this years ago when I first added SHADER_OPCODE_SEND. At
the time, the only use for the extended descriptor was bindless handles
which were always one thing and never non-constant. However, it doesn't
actually require any extra instructions because we have to OR in ex_mlen
anyway.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8748 >
2021-01-28 17:57:48 +00:00
BillKristiansen
9003735b91
d3d12: fix for upside-down multisample stencil blit
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8704 >
2021-01-28 16:40:17 +00:00
Christian Gmeiner
f33b958010
vc4: add drm-shim
...
Is enought to run shader-db.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8736 >
2021-01-28 16:14:06 +00:00
Mike Blumenkrantz
e25a3e21f8
ci: disable glcpp tests for now
...
these are too flaky to continue running for now
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8738 >
2021-01-28 15:52:32 +00:00
Mike Blumenkrantz
f9ae947e72
meson: add enable-glcpp-tests option
...
these are too intermittent to be left enabled on CI for now
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8738 >
2021-01-28 15:52:32 +00:00
Mike Blumenkrantz
6a29632dd2
Revert "glcpp: disable 'windows' tests"
...
This reverts commit f7527f7f65 .
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8738 >
2021-01-28 15:52:32 +00:00
Mike Blumenkrantz
514b17235f
zink: export ssbo caps
...
PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT is needed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:28 +00:00
Mike Blumenkrantz
7e5c4b4da3
zink: flatten out ssbo/ubo variable decls in ntv
...
we were using a system of block=array<uvec4> here, but we can really
just simplify this to block=array<uint> to make all the related code much
simpler
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:28 +00:00
Mike Blumenkrantz
388f43c036
zink: implement get_ssbo_size nir intrinsic
...
this is a little hacky since we're still using unpacked layout for everything,
requiring that we "adjust" the value we pass back to the user for std430 to
be the expected value as though we were using packed layout
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:28 +00:00
Mike Blumenkrantz
313c77f326
zink: support nir_intrinsic_store_ssbo
...
this is gross, but it works
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:28 +00:00
Mike Blumenkrantz
b0847a4324
zink: rework ssbo indexing and binding
...
this is actually crazy, but there's no other way to do it from the variable.
ideally, nir would have a separate type for atomic counters to simplify this
and then also stop mangling binding/block index during lower_buffers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:28 +00:00
Mike Blumenkrantz
deeafe47b6
zink: handle more ssbo ops in ntv
...
this is easiest with a macro since it's already implemented for images
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:27 +00:00
Mike Blumenkrantz
39665fc8c0
zink: handle null ssbo attachments without crashing
...
basically the same as any other null buffer descriptor attachment
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:27 +00:00
Mike Blumenkrantz
bceb47d57b
zink: flag ssbo buffer resources as having pending writes per stage
...
I meant to squash this down but didn't get around to it
Fixes: e79d905f5a ("zink: flag ssbo buffer resources as having pending writes on batch")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:27 +00:00
Mike Blumenkrantz
db1c9b36b4
zink: add spirv builder function for OpAtomicStore
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628 >
2021-01-28 14:34:27 +00:00
cheyang
070334dc69
glsl: redeclare built-in variable with separate shader
...
according to :
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_separate_shader_objects.gles.txt
properly handle the declaration of these interface block varibales
Signed-off-by: cheyang <cheyang@bytedance.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8101 >
2021-01-28 13:15:13 +00:00
Kenneth Graunke
9d63547f2f
iris: Properly handle new unbind_num_trailing_slots parameters
...
Commits 0278d1fa323cf1f289..b688ea31fcf7e20436 added a new parameter
to set_vertex_buffers(), set_shader_images(), and set_sampler_views()
which specifies a number of trailing slots to unbind. They updated
the iris functions to do the unbinding, but didn't update the code
to mark which things are bound in the bitfields. This meant that
later code would assume those unbound slots were bound, and crash
on a NULL dereference. All that's needed is to add that slot count
when unbinding things in the bitfield.
Fixes: 0278d1fa32 ("gallium: add unbind_num_trailing_slots to set_vertex_buffers")
Fixes: 72ff66c3d7 ("gallium: add unbind_num_trailing_slots to set_shader_images")
Fixes: b688ea31fc ("gallium: add unbind_num_trailing_slots to set_sampler_views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8758 >
2021-01-28 00:54:22 -08:00
Ian Romanick
0f1a8f8a6d
i965: Don't parse driconf again
...
It was already parsed in intelInitScree2, and the results are stored in
the screen.
Fixes: d67ef48580 ("i965/screen: Allow drirc to set 'allow_rgb10_configs' again.")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387 >
2021-01-27 19:10:05 -08:00
Ian Romanick
f11a827941
i965: Use allow_higher_compat_version option during screen initialization
...
Currently, `allow_higher_compat_version` is only used during context
creation. Doing that means an application that doesn't request a
specific version can be given a version higher than 3.0.
However, an application still cannot request a higher version via
glXCreateContextAttribsARB. The GLX and DRI layers will only see that
version 3.0 is supported, so context creation will fail before the drive
is called. For this to work, max_gl_compat_version must be set to a
higher version.
This enables running many piglit tests on i965 with
allow_higher_compat_version.
v2: Fix a typo in a comment. Noticed by Tim. Fix a typo in the commit
message. Noticed by the spell checker. :)
v3: Don't parse driconf again. Suggested by Tim.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387 >
2021-01-27 19:10:01 -08:00
Ian Romanick
dbf6c17a1b
i965: Don't advertise OpenGL 3.3+ if driconf disables GL_ARB_blend_func_extended
...
This prevents the assertion added in "i965: Use
allow_higher_compat_version option during screen initialization" from
failing when disable_blend_func_extended=true.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387 >
2021-01-27 19:09:43 -08:00
Simon Zeni
d0444b7618
egl/dri2: enable EGL_WL_bind_wayland_display in EGL device platform
...
EGL_WL_bind_wayland_display was previously supported on all platforms,
except the EGL device platform.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8638 >
2021-01-28 00:30:10 +00:00
Marek Olšák
dbf09c0c26
radeonsi: fix centroid with VRS coarse shading
...
This has no effect on other shading. It should have been the default value.
Fixes: c3432ad852 - radeonsi: add an option to enable 2x2 coarse shading for non-GUI elements
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8726 >
2021-01-28 00:14:32 +00:00
Marek Olšák
be8d811e57
gallium/u_vbuf: skip draws with 0 vertices
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
431cd34cdb
st/mesa: set take_index_buffer_ownership to skip an atomic in u_threaded
...
This reduces overhead by skipping the atomic, which is slow on AMD Zen.
It uses the same mechanism as vertex buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
e6da78e4cc
gallium,u_threaded: add pipe_draw_info::take_index_buffer_ownership
...
to skip atomics in u_threaded_context. This will decrease CPU overhead.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
104a41bd07
gallium/util: optimize pipe_vertex_buffer_reference binding the same buffer
...
This eliminates atomic ops when the buffer doesn't change.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
cf82b3dc74
gallium/u_threaded: unify user and non-user codepaths in set_constant_buffer
...
We can do this cleanup thanks to take_ownership.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
dcc94af6b1
gallium/u_threaded: add a null constant buffer codepath
...
This consumes less space in the batch buffer.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
ccf9ef3628
gallium/u_upload_mgr: eliminate all atomics for the upload buffer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
b18b68ba18
st/mesa: skip atomics when binding UBOs
...
This uses the same mechanism as vertex buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
7688b8ae98
st/mesa: eliminate all atomic ops when setting vertex buffers
...
This implements the same optimization as u_upload_mgr.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
a4a21b6104
cso_context,u_vbuf: add take_ownership param into set_vertex_buffers
...
st/mesa will use this to skip atomic ops for reference counting.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
27dcb46629
gallium: add take_ownership param into set_vertex_buffers to eliminate atomics
...
There are a few places (mainly u_threaded_context) that do:
set_vertex_buffers(...);
for (i = 0; i < count; i++)
pipe_resource_reference(&buffers[i].resource.buffer, NULL);
set_vertex_buffers increments the reference counts while the loop
decrements them.
This commit eliminates those reference count changes by adding a parameter
into set_vertex_buffers that tells the callee to accept all buffers
without incrementing the reference counts.
AMD Zen benefits from this because it has slow atomics if they come from
different CCXs.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
b688ea31fc
gallium: add unbind_num_trailing_slots to set_sampler_views
...
Instead of calling this functions again to unbind trailing slots,
extend it to do it when binding. This reduces CPU overhead.
A lot of drivers ignore "start" and always unbind all slots after "count".
Such drivers don't need any changes here.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:35 +00:00
Marek Olšák
72ff66c3d7
gallium: add unbind_num_trailing_slots to set_shader_images
...
Instead of calling this function again to unbind trailing slots,
extend it to do it when images are being set. This reduces CPU overhead.
Only st/mesa benefits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:34 +00:00
Marek Olšák
0278d1fa32
gallium: add unbind_num_trailing_slots to set_vertex_buffers
...
Instead of calling this functions again to unbind trailing slots,
extend it to do it as part of the call that sets vertex buffers.
This reduces CPU overhead. Only st/mesa benefits from this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:34 +00:00
Marek Olšák
a51d4b10f1
gallium: add take_ownership param into set_constant_buffer to eliminate atomics
...
We often do this:
pipe->set_constant_buffer(pipe, shader, slot, &cb);
pipe_resource_reference(&cb->buffer, NULL);
That results in atomic increment in set_constant_buffer followed by
atomic decrement after set_constant_buffer. This new interface
eliminates those atomics.
For the case above, this should be used instead:
pipe->set_constant_buffer(pipe, shader, slot, true, &cb);
cb->buffer = NULL; // if cb is not a local variable, else do nothing
AMD Zen benefits from this. The perf improvement is ~3% for Viewperf13/Catia.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:34 +00:00
Marek Olšák
0aa63c31ca
Revert "gallium/u_upload_mgr: allow use of FLUSH_EXPLICIT with persistent mappings"
...
It's no longer needed after radeonsi had its SDMA uploads removed.
This reverts commit 54f7545cd7 .
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298 >
2021-01-27 23:53:34 +00:00
Dave Airlie
8be936f295
lavapipe: handle shader draw parameters
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8219 >
2021-01-27 23:36:52 +00:00
Dave Airlie
ae2edc8127
llvmpipe: handle firstvertex for vulkan draw parameters
...
Vulkan defines this a bit differently, so add support for
load_first_vertex.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8219 >
2021-01-27 23:36:52 +00:00
Eleni Maria Stea
4ad4cd8906
anv: Enabled the VK_EXT_sample_locations extension
...
Enabled the VK_EXT_sample_locations for Intel Gen >= 7.
v2: Replaced device.info->gen >= 7 with True, as Anv doesn't support
anything below Gen7. (Lionel Landwerlin)
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Eleni Maria Stea
6ab5dc45f6
anv: Removed unused header file
...
In src/intel/vulkan/genX_blorp_exec.c we included the file:
common/gen_sample_positions.h but not use it. Removed.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Eleni Maria Stea
27ee40f4c9
anv: Add support for sample locations
...
Allowing the user to set custom sample locations, by filling the
extension structs and chaining them to the pipeline structs according
to the Vulkan specification section [26.5. Custom Sample Locations]
for the following structures:
'VkPipelineSampleLocationsStateCreateInfoEXT'
'VkSampleLocationsInfoEXT'
'VkSampleLocationEXT'
Once custom locations are used, the default locations are lost and need
to be re-emitted again in the next pipeline creation. For that, we emit
the 3DSTATE_SAMPLE_PATTERN at every pipeline creation.
v2: In v1, we used the custom anv_sample struct to store the location
and the distance from the pixel center because we would then use
this distance to sort the locations and send them in increasing
monotonical order to the GPU. That was because the Skylake PRM Vol.
2a "3DSTATE_SAMPLE_PATTERN" says that the samples must have
monotonically increasing distance from the pixel center to get the
correct centroid computation in the device. However, the Vulkan
spec seems to require that the samples occur in the order provided
through the API and this requirement is only for the standard
locations. As long as this only affects centroid calculations as
the docs say, we should be ok because OpenGL and Vulkan only
require that the centroid be some lit sample and that it's the same
for all samples in a pixel; they have no requirement that it be the
one closest to center. (Jason Ekstrand)
For that we made the following changes:
1- We removed the custom structs and functions from anv_private.h
and anv_sample_locations.h and anv_sample_locations.c (the last
two files were removed). (Jason Ekstrand)
2- We modified the macros used to take also the array as parameter
and we renamed them to start by GEN_. (Jason Ekstrand)
3- We don't sort the samples anymore. (Jason Ekstrand)
v3 (Jason Ekstrand):
Break the refactoring out into multiple commits
v4: Merge dynamic/non-dynamic changes into a single commit (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Lionel Landwerlin
43acc10bd0
intel/common: store sample position in plain arrays
...
Allows to extract the values in different ways than just the genxml
format.
v2 (Jason Ekstrand):
- Add a struct gen_sample_location so that we can re-use the array
macros from the earlier commit.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Eleni Maria Stea
cb082d8260
anv/state: Take explicit sample locations in emit helpers
...
This commit adds a "locations" parameter to emit_multisample and
emit_sample_pattern which, if provided, will override the default
sample locations.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Jason Ekstrand
a02891fdfd
anv: Break SAMPLE_PATTERN and MULTISAMPLE emit into helpers
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Eleni Maria Stea
983cebb5d2
anv: Implement physical device properties for VK_EXT_sample_locations
...
The VkPhysicalDeviceSampleLocationPropertiesEXT struct is filled with
implementation dependent values and according to the table from the
Vulkan Specification section [36.1. Limit Requirements]:
pname | max | min
pname:sampleLocationSampleCounts |- |ename:VK_SAMPLE_COUNT_4_BIT
pname:maxSampleLocationGridSize |- |(1, 1)
pname:sampleLocationCoordinateRange|(0.0, 0.9375)|(0.0, 0.9375)
pname:sampleLocationSubPixelBits |- |4
pname:variableSampleLocations | true |implementation dependent
The hardware only supports setting the same sample location for all the
pixels, so we only support 1x1 grids.
Also, variableSampleLocations is set to true because we can set sample
locations per draw.
Implement the vkGetPhysicalDeviceMultisamplePropertiesEXT according to
the Vulkan Specification section [36.2. Additional Multisampling
Capabilities].
v2: 1- Replaced false with VK_FALSE for consistency. (Sagar Ghuge)
2- Used the isl_device_sample_count to take the number of samples
per platform to avoid extra checks. (Sagar Ghuge)
v3: 1- Replaced VK_FALSE with false as Jason has sent a patch to replace
VK_FALSE with false in other places. (Jason Ekstrand)
2- Removed unecessary defines and set the grid size to 1 (Jason Ekstrand)
v4: Fix properties reporting in GetPhysicalDeviceProperties2, not
GetPhysicalDeviceFeatures2 (Lionel)
Use same alignment as other functions (Lionel)
Report variableSampleLocations=true (Lionel)
v5: Don't overwrite the pNext in GetPhysicalDeviceMultisamplerPropertiesEXT
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com > (v3)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Eleni Maria Stea
ecd8477e93
anv: Added the VK_EXT_sample_locations extension to the anv_extensions list
...
Added the VK_EXT_sample_locations to the anv_extensions.py list to
generate the related entrypoints.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887 >
2021-01-27 23:25:27 +00:00
Eric Anholt
ced77af3fd
ci/freedreno: Make a630 piglit_shader run a manual run, too.
...
We haven't been able to stabilize the remaining flakes (scattered through
a bunch of innocuous-looking tests), so disable it until we can fix it or
replace the piglit runner with one that can handle flakes.
Closes : #4170
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8747 >
2021-01-27 23:06:36 +00:00
Caio Marcelo de Oliveira Filho
804c90e256
anv: Implement VK_KHR_workgroup_memory_explicit_layout
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699 >
2021-01-27 22:20:53 +00:00
Caio Marcelo de Oliveira Filho
5de6c5973a
spirv: Implement SPV_KHR_workgroup_memory_explicit_layout
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699 >
2021-01-27 22:20:53 +00:00
Caio Marcelo de Oliveira Filho
a9d230077f
nir: Two shared memory *blocks* may alias each other
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699 >
2021-01-27 22:20:53 +00:00
Caio Marcelo de Oliveira Filho
bb2a0fbcd3
spirv: Update headers and metadata from latest Khronos commit
...
This corresponds to faa570afbc91ac73d594d787486bcf8f2df1ace0
("Merge pull request #192 from cmarcelo/SPV_KHR_workgroup_memory_explicit_layout") in
https://github.com/KhronosGroup/SPIRV-Headers .
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699 >
2021-01-27 22:20:53 +00:00
Caio Marcelo de Oliveira Filho
73fb2bcaaf
vulkan: Update XML and headers to 1.2.168
...
This brings in the following extensions:
- VK_KHR_workgroup_memory_explicit_layout
- VK_KHR_zero_initialize_workgroup_memory
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699 >
2021-01-27 22:20:52 +00:00
Eric Anholt
c90ef5bcf4
ci/freedreno: Ban more flaky clip-enables tests.
...
Same cause as vs-clip-vertex-enable, presumably.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8744 >
2021-01-27 21:19:41 +00:00
Adam Jackson
2a73a2a679
egl: Fix error string returned by eglQueryDeviceAttribEXT
...
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8725 >
2021-01-27 20:58:32 +00:00
Dave Airlie
9f97cbad5e
lavapipe: add support for external memory/fd/sempahore extensions
...
These are just dummy versions of these but enough to pass CTS
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8218 >
2021-01-28 06:27:15 +10:00
Marek Olšák
24ede1ba5b
st/mesa: don't enable smoothing if multisampling is enabled
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8684 >
2021-01-27 18:54:37 +00:00
Kenneth Graunke
f45d77038b
iris: Move the URB size checks into iris_update_compiled_xs
...
Instead of looping over all stages and re-accessing prog_data at the
end, we can just move the URB size check into iris_update_compiled_xs,
in the new != old block, where we know the shader changed - plus where
we're disabling tessellation. We already have the prog_data handy in
these cases, with a bit less pointer chasing.
Improves performance in Piglit's drawoverhead microbenchmark
(#63 : DrawArrays, no state change) by 4.07856% +/- 0.540517% (n=850).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8721 >
2021-01-27 18:30:54 +00:00
Kenneth Graunke
939bc0c588
iris: Reconfigure the URB only if it's necessary or possibly useful
...
Reconfiguring the URB partitioning is likely to cause shader stalls,
as the dividing line between each stage's section of memory is moving.
(Technically, 3DSTATE_URB_* are pipelined commands, but that mostly
means that the command streamer doesn't need to stall.) So it should
be beneficial to update the URB configuration less often.
If the previous URB configuration already has enough space for our
current shader's needs, we can just continue using it, assuming we
are able to allocate the maximum number of URB entries per stage.
However, if we ran out of URB space and had to limit the number of
URB entrties for a stage, and the per-entry size is larger than we
need, we should reconfigure it to try and improve concurrency.
So, we begin tracking the last URB configuration in the context,
and compare against that when updating shader variants.
Cuts 36% of the URB reconfigurations (excluding BLORP) from a
Shadow of Mordor trace, and 46% from a GFXBench Manhattan 3.0 trace.
One nice thing is that this removes the need to look at the old
prog_data when updating shaders, which should make it possible to
unbind shader variants without causing spurious URB updates.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8721 >
2021-01-27 18:30:54 +00:00
Kenneth Graunke
a710145b5b
intel: Produce a "constrained" output from gen_get_urb_config()
...
When calculating a URB configuration, we start with a notion of how
much space each stage /wants/ (to achieve the maximum amount of
concurrency), but sometimes fall back to giving it less than that,
because we don't have enough space. (Typically, this happens when
the per-stage size is large, or there are many stages, or both.)
We now output a "constrained" boolean which is true if we weren't
able to satisfy all the "wants" due to a lack of space.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8721 >
2021-01-27 18:30:54 +00:00
Mike Blumenkrantz
86ff78e8fe
zink: don't export PIPE_CAP_MAX_COMBINED_SHADER_BUFFERS value
...
gallium automatically sums up the per-stage buffers if this isn't set,
and some drivers (e.g., amdvlk) export UINT_MAX here which breaks the universe
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8742 >
2021-01-27 10:44:50 -05:00
Rhys Perry
b2dbe2b87b
aco: implement non-uniform get_ssbo_size
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3711
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7969 >
2021-01-27 13:00:33 +00:00
Rhys Perry
2f2a9f253e
radv,ac/nir: implement non-uniform get_ssbo_size
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3711
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7969 >
2021-01-27 13:00:33 +00:00
Rhys Perry
30f40364f6
nir,spirv: allow non-uniform OpArrayLength
...
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/7969 >
2021-01-27 13:00:33 +00:00
Italo Nicola
b64fdefad5
panfrost: advertise images for midgard
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
7584a25919
pan/mdg: implement nir_intrinsic_image_size
...
To implement it in midgard, we just need to read the image_size sysval.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
8edccb7e8d
pan/mdg: implement shader image instructions
...
Implements load store opreations as midgard_op_ld_image_* and
midgard_op_st_image_*.
Implements midgard_op_lea_tex, which takes an image coordinate and
returns it's memory address.
Image atomics are implemented as a combination of midgard_op_lea_tex and
the usual midgard atomic opcodes.
Currently we don't support multisampled shader images.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
a14f825126
pan/mdg: rename st_image opcodes and add float16 versions
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
45095c42ac
pan/mdg: add ld_image opcodes
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
8cfedd36ba
pan/mdg: enable image bitsize lowering pass
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
db725e1d52
pan/mdg: create nir pass to lower image coord bitsize
...
Image coordinates are 16-bit long in midgard, so we must lower them
before emitting image opcodes.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
0efe7a6eb9
panfrost: implement image_size sysval
...
Since there's no hardware support for it, we use a sysval to implement
nir_intrinsic_image_size.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
dc85f65e05
panfrost: emit shader image attribute descriptors
...
Each shader image attribute buffer descriptor needs a continuation,
meaning that each image attribute buffer is double the size of a common
attribute buffer.
For compute and fragment shaders, we allocate a single buffer with
enough space for all the attribute descriptors and attribute buffer
descriptors.
For vertex shaders, we do it separately to acomodate for the way
descriptors are currently allocated there.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
0b9b0ee532
panfrost: implement gallium->set_shader_images
...
Implements gallium images endpoint.
If an AFBC resource is bound to an image, we convert it to tiled, since
images need pixel-level granularity and AFBC doesn't allow for that.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
f63a35baee
panfrost: add resource modifier conversion
...
Adds a helper function to convert a resource to a chosen modifier.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
c7c4fbc823
panfrost: decode 3d attribute continuation
...
Adds 3D attribute buffer continuations to pandecode and a message to
keep track of which buffer continuations we aren't decoding yet.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
2638f72d2d
panfrost: add 3d attribute buffer continuation to XML
...
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Italo Nicola
a36c95cd77
panfrost: fix attribute continuation decoding
...
Because attribute continuations aren't considered whole attributes, we
need to increase the total number of attributes for each continuation
when decoding, otherwise we will end up missing a buffer for every
continuation we have.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066 >
2021-01-27 12:39:41 +00:00
Marcin Ślusarz
2fc5411e5e
intel/perf: export information about units of performance counters
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8580 >
2021-01-27 11:38:06 +00:00
Tony Wasserka
5fdc298e4b
aco/ra: Remove preprocessor guards for print_regs
...
This debug helper isn't used anywhere by default, but compiling it anyway
ensures future refactors don't break it.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719 >
2021-01-27 12:08:47 +01:00
Tony Wasserka
3675aefa84
aco/ra: Fix build with print_regs enabled
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719 >
2021-01-27 12:08:47 +01:00
Tony Wasserka
b241a050da
aco/ra: Fix print_regs using the wrong constant to check for blocked slots
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719 >
2021-01-27 12:08:47 +01:00
Abhishek Kumar
26c9574bdb
intel: change urb max shader geometry for KBL GT1
...
Below Deqp CTS failure is seen on KBL GT1(tested on 0x5906) only ,
GT2 all test passes, changing the max shader geometry to 256
(previous 640) fixes all failure tests.Similar issues on
CML GT1 (Gen9) is fixed
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8550
dEQP-GLES31.functional.geometry_shading.layered.
render_with_default_layer_cubemap
render_with_default_layer_3d
render_with_default_layer_2d_array
Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8731 >
2021-01-27 09:46:44 +00:00
Samuel Pitoiset
741c0b1605
radv: enable TC-compat HTILE for mipmaps on GFX10+
...
Mipmaps+layers should be investigated and mipmaps support added
for previous gens (GFX8-9).
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/8124 >
2021-01-27 09:19:09 +01:00
Samuel Pitoiset
5417c6690e
radv: teach radv_htile_enabled() about the number of HTILE levels
...
This is the main function that enables/disables HTILE for mipmaps.
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/8124 >
2021-01-27 09:19:09 +01:00
Samuel Pitoiset
13f34e65ba
radv: add support for fast clearing levels of the HTILE buffer
...
This can probably be optimized further by checking if the levels
are contiguous in memory.
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/8124 >
2021-01-27 09:19:09 +01:00
Samuel Pitoiset
6576033b20
radv: remove mipmaps related assertions when initializing HTILE
...
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/8124 >
2021-01-27 09:02:17 +01:00
Samuel Pitoiset
d47b13c028
radv: do not decompress/resummarize levels without HTILE
...
It's completely useless to decompress or resummarize levels that
are not compressed using HTILE.
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/8124 >
2021-01-27 09:02:17 +01:00
Samuel Pitoiset
e7d898a268
radv: check if HTILE is enabled per-level instead of the entire image
...
With HTILE mipmaps support, we should check if the base level
currently in use supports compression.
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/8124 >
2021-01-27 09:02:17 +01:00
Samuel Pitoiset
8f1db7401a
radv: use the image view range when fast clearing depth
...
This doesn't change behevior since the driver currently doesn't
support HTILE for mipmaps and also because we can only clear the
whole array layers at once. This improves consistency regarding
the fast clear color path.
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/8124 >
2021-01-27 09:02:17 +01:00
Samuel Pitoiset
8087202a65
ac/surface: store HTILE mip info into the surface
...
GFX10 can only compress the first level in the mip tail.
GFX9+ is not yet supported because mips are interleaved.
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/8124 >
2021-01-27 09:02:17 +01:00
Dave Airlie
2f5ef1e891
CI: add lavapipe to llvmpipe rules.
...
I've noticed that that llvmpipe tests don't all get run,
it's probably good enough to just run them on lavapipe
changes as well
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8732 >
2021-01-27 16:11:43 +10:00
Dave Airlie
34e3e16493
lavapipe: add VK_EXT_conditional_rendering support.
...
This passes all the CTS tests.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182 >
2021-01-27 10:57:42 +10:00
Dave Airlie
9cc3328842
llvmpipe: handle vulkan conditional rendering
...
This implements the new hook to conditionialise rendering
on memory contents
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182 >
2021-01-27 10:57:37 +10:00
Dave Airlie
86328fc7b7
gallium: add a cond rendering hook for vulkan.
...
The vulkan cond rendering hook is quite different than the
traditional gallium one so add a new interface for it.
This just conditionalises rendering on the memory location.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182 >
2021-01-27 10:57:31 +10:00
Dave Airlie
a57361ae02
lavapipe: rewrite attachment clearing for conditional rendering.
...
Attachment clears have to respect cond rendering, so they can't
call clear texture directly, they have to create temporary
surfaces and clear via those.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182 >
2021-01-27 10:57:25 +10:00
Dave Airlie
4be0e92db1
lavapipe: refactor image surface creation
...
There is a need to create arbitrary surfaces for clearing,
so split out the templating from the storing to img->vk_surface
so temporary surfaces can be created for clearing.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182 >
2021-01-27 10:57:06 +10:00
Rhys Perry
0f178290ca
aco: don't affect isPrecise() after applying output modifiers
...
fossil-db (GFX10.3):
Totals from 26679 (19.14% of 139391) affected shaders:
SGPRs: 1757155 -> 1757059 (-0.01%); split: -0.05%, +0.04%
VGPRs: 1175932 -> 1173556 (-0.20%); split: -0.21%, +0.01%
CodeSize: 86203592 -> 85572480 (-0.73%); split: -0.73%, +0.00%
MaxWaves: 315513 -> 315805 (+0.09%); split: +0.10%, -0.00%
Instrs: 16297785 -> 16143745 (-0.95%); split: -0.95%, +0.00%
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/8718 >
2021-01-26 22:22:58 +00:00
Nanley Chery
40d6b92de9
iris: Disable aux as needed in iris_flush_resource
...
Disable compression in iris_flush_resource if the resource lacks a
modifier. When a caller wants to prepare such a resource for sharing
(via eglCreateImage for example), this change enables all reference
holders to access the resource in a common manner - without compression.
This fixes misrendering with 3D-accelerated qemu. A piglit test which
reproduces qemu's behavior, ext_image_dma_buf_import-export-tex, is also
enabled to pass.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2678
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663 >
2021-01-26 22:15:31 +00:00
Nanley Chery
b26f510978
gallium: Flush GL API resources in eglCreateImage
...
Some drivers need to be able to remove compression from resources before
they are handed to consumers that wouldn't understand or expect it.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663 >
2021-01-26 22:15:31 +00:00
Nanley Chery
0a8cc88202
gallium: Map _DRI_IMAGE_FORMAT_NONE to NULL
...
Many entries in the dri2_format_table have _DRI_IMAGE_FORMAT_NONE as the
dri_format. Make the result of dri2_get_mapping_by_format a tad more
well-defined by returning NULL when this format is passed into it.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663 >
2021-01-26 22:15:31 +00:00
Mike Blumenkrantz
6c9aca951c
st/drawpixels: use GL_CLAMP_TO_EDGE instead of GL_CLAMP for samplers
...
no border colors here either
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Drive-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8714 >
2021-01-26 21:54:21 +00:00
Mike Blumenkrantz
66bb427762
st/bitmap: use GL_CLAMP_TO_EDGE for bitmap samplers
...
we aren't using border colors here, so this should be fine (and more compatible)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Drive-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8714 >
2021-01-26 21:54:21 +00:00
Daniel Schürmann
b06609e903
aco: fix nir_intrinsic_ballot with wave32
...
Found by inspection.
Fixes: 21db083504 ('aco/wave32: Allow setting the subgroup ballot size to 64-bit.')
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8703 >
2021-01-26 21:06:48 +00:00
Caio Marcelo de Oliveira Filho
c02b682204
ci: Add nouveau chipset 162 to shader-db runs
...
Suggested-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585 >
2021-01-26 20:20:47 +00:00
Caio Marcelo de Oliveira Filho
9f3d5e99ea
compiler: Use util/bitset.h for system_values_read
...
It is currently a bitset on top of a uint64_t but there are already
more than 64 values. Change to use BITSET to cover all the
SYSTEM_VALUE_MAX bits.
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585 >
2021-01-26 20:20:47 +00:00
Caio Marcelo de Oliveira Filho
ecd0ae09f9
nir/linking: Remove system_value handling from helper
...
All uses are passing variables of either nir_var_shader_in or
nir_var_shader_out modes. Note that currently there are more than 64
system values, so the uint64_t wouldn't be enough anyway.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585 >
2021-01-26 20:20:46 +00:00
Eric Anholt
4fdd8b09bd
ci/freedreno: Ban vs-clip-vertex-enables which flakes in CI.
...
It's reliably failing on its own, but has shown up as the top flake in CI.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8722 >
2021-01-26 19:17:27 +00:00
Eric Anholt
ce1bb26b06
ci/freedreno: Detect cheza HFI errors and restart the run.
...
These are intermittent (~1/day), seem to be around GPU faults (so
hopefully will go away once we clean up piglit's fault errors), and are
probably also related to our vintage firmware. Until we can get new
hardware in the farm, just restart the flaked job.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8722 >
2021-01-26 19:17:27 +00:00
Samuel Pitoiset
4c3ad4d065
nir/algebraic: mark more optimization with fsat(NaN) as inexact
...
These optimizations are duplicated from the main optimization table
to the late one... And I missed some in the original fix.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3368
Fixes: bc123c396a ("nir/algebraic: mark some optimizations with fsat(NaN) as inexact")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8716 >
2021-01-26 17:06:23 +00:00
Timur Kristóf
3c03fa5801
radv: Only enable sparse features on Polaris and newer.
...
On Fiji, the CTS image can cause a hang when these are enabled.
Let's enable them for Polaris and newer only, for now.
Gitlab: #4136
Fixes: 9f43b44bf0
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8646 >
2021-01-26 16:56:35 +00:00
Samuel Pitoiset
f01ea0aef8
radv: remove unused EMPTY constant in radv_descript_set.c
...
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/8711 >
2021-01-26 17:31:07 +01:00
Samuel Pitoiset
fbeca9df87
radv: remove stub() macros
...
They are unused since sparse texture is implemented.
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/8711 >
2021-01-26 17:31:05 +01:00
Samuel Pitoiset
64ed873405
radv: remove radv_util.h
...
util_bitcount() is already defined in src/util/bitscan.h.
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/8711 >
2021-01-26 17:31:03 +01:00
Gert Wollny
4099cdc97f
compiler/nir: Add support for lowering stores with nir_lower_instruction
...
The function is very convenient for lowering any type of instruction
that can be easily filtered, but so far instructions that didn't return
a value were siletly ignored.
Fix this by
- not requiring a return value in the instruction
- add a new special return value from the lowering implementation
function to indicated that an instruction that doesn't have a
return value must be removed, and
- don't try to collect and replace uses in this case.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8177 >
2021-01-26 15:27:17 +00:00
David McFarland
e3f56601e0
radv: fix divide by zero with no tesselation params
...
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7878 >
2021-01-26 15:14:33 +00:00
Daniel Schürmann
9a49760e82
aco: fix VCC hint on boolean subgroup operations
...
Found by inspection.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8712 >
2021-01-26 14:59:30 +00:00
Rhys Perry
b729cd58d7
nir/algebraic: eliminate exact a*0.0 if float execution mode allow it
...
fossil-db (GFX10):
Totals from 611 (0.44% of 139391) affected shaders:
SGPRs: 40528 -> 40288 (-0.59%)
VGPRs: 16136 -> 16152 (+0.10%); split: -0.15%, +0.25%
CodeSize: 970192 -> 951036 (-1.97%)
MaxWaves: 10561 -> 10557 (-0.04%); split: +0.08%, -0.11%
Instrs: 174874 -> 172879 (-1.14%); split: -1.18%, +0.04%
fossil-db (GFX10.3):
Totals from 611 (0.44% of 139391) affected shaders:
SGPRs: 40680 -> 40488 (-0.47%)
VGPRs: 18368 -> 18276 (-0.50%); split: -0.57%, +0.07%
CodeSize: 1050712 -> 1033624 (-1.63%); split: -1.64%, +0.02%
MaxWaves: 8658 -> 8674 (+0.18%)
Instrs: 205364 -> 201220 (-2.02%)
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/5523 >
2021-01-26 11:36:13 +00:00
Rhys Perry
614ab26afd
nir/algebraic: optimize out exact a+0.0 if it's used only as a float
...
fossil-db (GFX10):
Totals from 133 (0.10% of 139391) affected shaders:
SGPRs: 7864 -> 7856 (-0.10%); split: -0.20%, +0.10%
VGPRs: 4884 -> 4836 (-0.98%)
CodeSize: 288932 -> 287084 (-0.64%)
MaxWaves: 1973 -> 1979 (+0.30%)
Instrs: 53899 -> 53550 (-0.65%)
fossil-db (GFX10.3):
Totals from 133 (0.10% of 139391) affected shaders:
SGPRs: 7832 -> 7835 (+0.04%); split: -0.06%, +0.10%
VGPRs: 5144 -> 5088 (-1.09%)
CodeSize: 318912 -> 316696 (-0.69%)
MaxWaves: 1735 -> 1746 (+0.63%)
Instrs: 65367 -> 64853 (-0.79%)
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/5523 >
2021-01-26 11:36:13 +00:00
Rhys Perry
2f0d480c73
aco: optimize out a*1.0 if it's used as a float
...
fossil-db (GFX10):
Totals from 370 (0.27% of 139391) affected shaders:
CodeSize: 641436 -> 634156 (-1.13%); split: -1.14%, +0.00%
Instrs: 117668 -> 115739 (-1.64%); split: -1.64%, +0.00%
fossil-db (GFX10.3):
Totals from 370 (0.27% of 139391) affected shaders:
SGPRs: 26888 -> 26912 (+0.09%)
VGPRs: 13964 -> 13916 (-0.34%)
CodeSize: 692008 -> 679008 (-1.88%)
MaxWaves: 4779 -> 4783 (+0.08%)
Instrs: 134265 -> 132026 (-1.67%); split: -1.67%, +0.00%
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/5523 >
2021-01-26 11:36:13 +00:00
Rhys Perry
54a09545ec
aco: optimize a*0.0
...
fossil-db (GFX10):
Totals from 1943 (1.39% of 139391) affected shaders:
SGPRs: 99952 -> 99544 (-0.41%); split: -0.44%, +0.03%
VGPRs: 60880 -> 60272 (-1.00%); split: -1.02%, +0.02%
CodeSize: 5138488 -> 5107500 (-0.60%); split: -0.61%, +0.01%
MaxWaves: 32193 -> 32380 (+0.58%)
Instrs: 983178 -> 975684 (-0.76%); split: -0.77%, +0.01%
fossil-db (GFX10.3):
Totals from 1943 (1.39% of 139391) affected shaders:
SGPRs: 99832 -> 99648 (-0.18%); split: -0.25%, +0.06%
VGPRs: 64708 -> 63944 (-1.18%); split: -1.27%, +0.09%
CodeSize: 5196732 -> 5157632 (-0.75%); split: -0.76%, +0.00%
MaxWaves: 27478 -> 27486 (+0.03%); split: +0.06%, -0.03%
Instrs: 1007222 -> 998737 (-0.84%); split: -0.84%, +0.00%
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/5523 >
2021-01-26 11:36:13 +00:00
Rhys Perry
2849f0b5aa
nir/algebraic: optimize out exact a*1.0 if it's used only as a float
...
fossil-db (GFX10):
Totals from 10180 (7.30% of 139391) affected shaders:
SGPRs: 549392 -> 549448 (+0.01%); split: -0.00%, +0.01%
VGPRs: 243228 -> 243008 (-0.09%); split: -0.11%, +0.02%
CodeSize: 12939080 -> 12603996 (-2.59%); split: -2.59%, +0.00%
MaxWaves: 186948 -> 186976 (+0.01%)
Instrs: 2497266 -> 2414648 (-3.31%)
fossil-db (GFX10.3):
Totals from 10180 (7.30% of 139391) affected shaders:
SGPRs: 549672 -> 549280 (-0.07%); split: -0.23%, +0.16%
VGPRs: 289296 -> 283672 (-1.94%); split: -2.83%, +0.88%
CodeSize: 13920180 -> 13255560 (-4.77%); split: -4.77%, +0.00%
MaxWaves: 151789 -> 153165 (+0.91%)
Instrs: 2756978 -> 2671517 (-3.10%); split: -3.10%, +0.00%
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/5523 >
2021-01-26 11:36:13 +00:00
Rhys Perry
0c3d8e8e2e
aco: disable a*1.0 optimization if the instruction is precise
...
fossil-db (GFX10):
Totals from 10370 (7.44% of 139391) affected shaders:
SGPRs: 564072 -> 564016 (-0.01%); split: -0.01%, +0.00%
VGPRs: 248312 -> 248532 (+0.09%); split: -0.02%, +0.11%
CodeSize: 12866732 -> 13208904 (+2.66%); split: -0.00%, +2.66%
MaxWaves: 190198 -> 190170 (-0.01%)
Instrs: 2460818 -> 2545351 (+3.44%)
fossil-db (GFX10.3):
Totals from 10370 (7.44% of 139391) affected shaders:
SGPRs: 563904 -> 564272 (+0.07%); split: -0.16%, +0.22%
VGPRs: 289344 -> 295016 (+1.96%); split: -0.88%, +2.84%
CodeSize: 13519204 -> 14197020 (+5.01%); split: -0.00%, +5.01%
MaxWaves: 155946 -> 154566 (-0.88%)
Instrs: 2719177 -> 2806919 (+3.23%); split: -0.00%, +3.23%
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/5523 >
2021-01-26 11:36:13 +00:00
Andres Gomez
8da467f4fe
ci: make piglit runner less noisy and show a better failure message
...
v2:
- Do not silence piglit run (Michel).
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net > [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8632 >
2021-01-26 10:05:31 +00:00
Juan A. Suarez Romero
be33083141
ci/vc4: Add piglit job
...
This adds a couple of jobs to execute piglit testsuite in VC4
(quick_shader and quick_gl profiles).
It is defined as a manual test as it takes time to execute them.
v2:
- Add more excluded tests (Eric)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Acked-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8702 >
2021-01-26 09:45:29 +00:00
Juan A. Suarez Romero
a825919dc6
ci/vc4: rename stage to Broadcom
...
It fits better with what other drivers has done.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Acked-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8702 >
2021-01-26 09:45:29 +00:00
Juan A. Suarez Romero
ea88e1c820
ci/vc4: allow custom timeout values for activity
...
The script that monitors activity in the serial assumes that something
was wrong if it does not detect activity in 60 seconds, rebooting the
device and re-trying the test again.
While this timeout is enough for most cases, in some cases it is not
enough. For instance, when executing piglit testsuite it takes quite a
few time to generate the results after the test is done.
This allow to setup a custom timeout (`BM_POE_TIMEOUT`) in the proper
jobs.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Acked-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8702 >
2021-01-26 09:45:29 +00:00
Samuel Pitoiset
23461897fe
radv: add support for emitting PS_DONE/CS_DONE on GFX6-8
...
On GFX6, EOS events are always emitted with EVENT_WRITE_EOS.
On GFX7+, EOS events are emitted with EVENT_WRITE_EOS on the
graphics queue, and with RELEASE_MEM on the compute queue.
Fixes: 9c65f1f111 ("radv: synchronize Cmd{Set,Write}Event() using PS_DONE/CS_DONE events")
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/8710 >
2021-01-26 09:26:58 +00:00
James Park
cbcb9e7e1b
radv: Fix struct initialization for MSVC
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:15 +00:00
James Park
28c4960ca5
radv: Use typed outarray API
...
MSVC cannot perform GCC __typeof__ for C code. (C++ has decltype.)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:15 +00:00
James Park
6992f5419a
radv: Disable calibrated timestamps on Windows
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:15 +00:00
James Park
2e81ed2a47
radv: Pointer arithmetic on char/uint8_t, not void
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:15 +00:00
James Park
879b5f41f4
radv: Modify radv_descriptor_set for MSVC legality
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:15 +00:00
James Park
c0b4b8fc74
radv: Stub sections that don't have _WIN32 support
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:15 +00:00
James Park
146e326275
radv: Remove unnecessary headers
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:14 +00:00
James Park
b7db6ceb9a
radv: Use linker pragma to simulate weak functions
...
MSVC has an undocumented feature that can act as GCC weak functions.
Also fix warnings about returning a value from void functions.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7793 >
2021-01-26 09:16:14 +00:00
Caio Marcelo de Oliveira Filho
10b3eecd36
spirv: Don't remove variables used by resource indexing intrinsics
...
In Vulkan, for some variable modes, the generated NIR will have derefs
pointing to resource index intrinsics instead of the variable. This
was letting nir_remove_dead_variables pass remove those variables,
which would lose information relevant for later passes after
spirv2nir.
Add a set to keep track of such variables and prevent them to be
removed when producing the NIR output.
Issue reported by Rhys.
Fixes: c4c9c780b1 ("spirv: Remove more dead variables")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8706 >
2021-01-26 05:58:34 +00:00
Caio Marcelo de Oliveira Filho
cb7352ae95
nir: Add a data pointer to the callback in nir_remove_dead_variables
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8706 >
2021-01-26 05:58:34 +00:00
Vinson Lee
f1cffe2394
clover: Add constructor for global_argument.
...
Fix defects reported by Coverity Scan.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize buf.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize svm.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8623 >
2021-01-26 05:30:39 +00:00
Sagar Ghuge
001722b3a3
anv: Skip CCS ambiguate which preceed fast-clears
...
We can skip CCS ambiguate if followed by a fast clear within render
pass.
v2: (Jason)
- Check array layer as well since we only fast clear first layer and
first LOD.
- Don't drop fast clear check while doing resolve operation.
Fixes: d5849bc840 "anv: Skip HiZ and CCS ambiguates which preceed fast-clears"
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6988 >
2021-01-26 00:08:59 +00:00
Francisco Jerez
e2c5ef6cd6
intel/gen12: Fix memory corruption issues in fused Gen12 parts.
...
According to the BSpec page for MEDIA_VFE_STATE, on Gen12 platforms
"if a fused configuration has fewer threads than the native POR
configuration, the scratch space allocation is based on the number of
threads in the base native POR configuration". However we currently
use the subslice count from devinfo->num_subslices[0], which only
includes the subslices currently enabled by the platform fusing. This
leads to scratch space underallocation and occasional hangs.
The problem is likely to affect most Gen12 GPUs with less than 96 EUs.
GFXBench5 Aztec Ruins is able to reproduce the issue fairly reliably.
Fixes: 9e5ce30da7 "intel: fix the gen 12 compute shader scratch IDs"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8636 >
2021-01-26 00:01:27 +00:00
Icecream95
1d967132f3
panfrost: Use normal malloc/free instead of ralloc for surfaces
...
Fixes a double-free in some Qt5 WebEngine apps (e.g. ghostwriter).
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8678 >
2021-01-25 23:48:11 +00:00
Rob Clark
46e9800408
freedreno/a6xx: Fix 3dmark misrendering with unwritten MRTs
...
Fixes an issue with 3dmark caused by a shader that only writes mrt0 in a
renderpass that has two color buffers bound, resulting in mrt1 getting
random/undefined values.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8685 >
2021-01-25 23:19:23 +00:00
Eric Anholt
aa1ddb6fe3
freedreno: Skip some batch dependency tracking if !ctx->dirty.
...
drawoverhead test 1 perf 4.37618% +/- 0.933261% (n=57)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8602 >
2021-01-25 23:00:12 +00:00
Eric Anholt
49b83509fe
freedreno: Move framebuffer state checks under a ctx->dirty flag.
...
Anything changing this should have flagged FD_DIRTY_FRAMEBUFFER.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8602 >
2021-01-25 23:00:12 +00:00
Eric Anholt
6e29757a57
freedreno: Move blend gmem checks to a blend dirty state check.
...
We don't need to do this every draw call. We do now consider the blend
enable field of a non-present color buffer, because it's not worth
filtering that case out.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8602 >
2021-01-25 23:00:12 +00:00
Eric Anholt
e4e46f2c4c
freedreno/a6xx: Skip the body of emit_state if we're clean.
...
drawoverhead test 1 (no state change) perf +5.43864% +/- 1.28466% (n=10).
Part of #4106 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8602 >
2021-01-25 23:00:12 +00:00
Mike Blumenkrantz
0376064783
zink: guarantee surface lifetimes for shader images
...
these may be unset from the ctx before the draw command has completed,
so we need (more) references to prevent that
Fixes: 3f9a6d333b ("zink: export shader image caps using features")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8627 >
2021-01-25 22:53:08 +00:00
Sagar Ghuge
dab229ef69
anv: Invalidate the correct AUX-TT entry
...
While invalidating the AUX-TT entries, we have to consider the surface
offset as well otherwise, we will end up invalidating another surface's
CCS portion.
For eg. when we have HiZ+CCS and STC_CCS enabled, both will use the CCS
portion allocated at the end of BO. While invalidating the CCS portion
of stencil buffer, we will end up invalidating the CCS portion that
belongs to the depth main surface and vice-versa, if the surface offset
is not considered.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4123
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Acked-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8677 >
2021-01-25 22:37:39 +00:00
Lionel Landwerlin
998f38bd99
anv: fix invalid programming of BLEND_STATE
...
We can't enable Logic Op & Color Buffer Blend. The Vulkan spec seems
to say Logic Op discards blending.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable@lists.freedesktop.org
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3767
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8691 >
2021-01-25 22:03:58 +00:00
Rhys Perry
f8072c133d
nir/opt_uniform_atomics: fix elect detection
...
fossil-db (GFX10.3):
Totals from 30 (0.02% of 139391) affected shaders:
SGPRs: 1736 -> 1712 (-1.38%)
CodeSize: 262116 -> 254728 (-2.82%)
Instrs: 50341 -> 48857 (-2.95%)
Cycles: 486384 -> 477556 (-1.82%)
VMEM: 4821 -> 4589 (-4.81%)
Copies: 5013 -> 4890 (-2.45%)
Branches: 2108 -> 1983 (-5.93%)
PreSGPRs: 1444 -> 1418 (-1.80%)
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/8654 >
2021-01-25 21:04:52 +00:00
Rhys Perry
eb70c52abe
nir/opt_uniform_atomics: recognize more complicated invocation comparisons
...
For example, gl_LocalInvocationID.x + gl_LocalInvocationID.y * 8.
fossil-db (GFX10.3):
Totals from 8 (0.01% of 139391) affected shaders:
CodeSize: 15224 -> 14800 (-2.79%)
Instrs: 2880 -> 2798 (-2.85%)
Cycles: 44556 -> 44204 (-0.79%)
VMEM: 407 -> 473 (+16.22%); split: +17.69%, -1.47%
Copies: 491 -> 483 (-1.63%)
Branches: 200 -> 192 (-4.00%)
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/8654 >
2021-01-25 21:04:52 +00:00
Bas Nieuwenhuizen
12ce72fcfc
radv: Use stricter HW resolve swizzle compat check.
...
D and linear are both DISPLAY micro tiling according to ac_surface
but don't work together. This fixes an issue with GFX9+.
This fixes the SkQP WritePixelsNonTexture_Gpu test.
Fixes: 69ea473eeb ("amd/addrlib: update to the latest version")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8665 >
2021-01-25 20:53:16 +00:00
Adam Jackson
abed28866b
docs: Mark some ES3 zink features complete
...
These are already enabled:
- GL_ARB_draw_indirect
- GL_ARB_framebuffer_no_attachments
- GL_ARB_shader_atomic_counters
- GL_ARB_shader_image_load_store
- GL_ARB_shader_image_size
- GL_ARB_stencil_texturing
- GL_ARB_texture_multisample
- GS5 Enhanced textureGather
- GS5 Packing/bitfield/conversion functions
- GL_KHR_robustness
- GL_KHR_texture_compression_astc_ldr
- GL_OES_sample_variables
- GL_OES_shader_multisample_interpolation
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8701 >
2021-01-25 20:49:30 +00:00
Adam Jackson
eb33bfc717
docs: Mark some non-core zink extensions complete
...
These are already exposed:
- GL_ARB_gpu_shader_int64
- GL_KHR_texture_compression_astc_sliced_3d
- GL_OES_texture_float
- GL_OES_texture_float_linear
- GL_OES_texture_half_float
- GL_OES_texture_half_float_linear
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8701 >
2021-01-25 20:49:30 +00:00
Christian Gmeiner
81ab9fe2d0
etnaviv: handle NULL views in set_sampler_views
...
Passing NULL for the views parameter should be the same as passing an
array of NULL, according to the documentation. So let's respect that
detail.
This fixes a crash when using GALLIUM_HUD. The wrong handling of views
parameter was causing problems starting with
2813688f8d ("gallium/hud: don't use cso_context to restore VBs, constbuf 0 and sampler views").
Cc: <mesa-stable@lists.freedesktop.org >
Fixes: c9e8b49b88 ("etnaviv: gallium driver for Vivante GPUs")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8670 >
2021-01-25 20:42:22 +00:00
Eric Anholt
f180bf3e03
ci: Add a fractional deqp run of softpipe with asan enabled.
...
This should help us avoid landing memory leaks (and some buffer overflows)
throughout the GL stack. I put the asan lib in x86_test-base because
we'll want asan for lavapipe, too.
This requires keeping debug symbols for the asan drivers in the artifacts,
as otherwise you can't do much with the backtraces it produces.
Closes : #3726
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Eric Anholt
b183b6ddd7
util/bitset: Avoid dereferencing the bitset for size == 0.
...
If we don't have any bits in our set, don't go reading the pointer. Fixes
invalid accesses caught by ASan in liveness and nir_to_tgsi when
impl->ssa_alloc == 0.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Eric Anholt
efff70e73f
gallium: Fix leak of shader images on context destruction.
...
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Eric Anholt
f259fcae83
panfrost: Stub out set_shader_images().
...
If PAN_MESA_DEBUG=deqp is set to enable testing, then we advertise shader
images to get GLES3.1, even though we don't have any of the shader image
funcs hooked up. This caused breakage when cso started unbinding shader
images at context destruction.
Just stub out the function for now, you'll still segfault when creating an
image.
Cc: mesa-stable (for the next commit)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Eric Anholt
9445c3d59f
swr: Don't report support for shader images.
...
gallivm has images support, but this driver doesn't.
Cc: mesa-stable (for the upcoming shader image leak fix)
Acked-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Eric Anholt
fb25ef153a
nir_to_tgsi: Fix buffer overflow in atomic image compswap.
...
Caught by the new asan CI job.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Eric Anholt
58e43594fc
r300,i915g: Report no shader buffers or images on non-TCL HW.
...
We don't have the driver hooks to set the state, or to update draw's copy
of the state at draw time.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Fixes: d6fd7acf9b ("gallium: Fix leak of bound SSBOs at CSO context
destruction.")
Closes : #3990
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Mike Blumenkrantz
c3719f3b9b
zink: flag gfx pipeline dirty using newer mechanism
...
this wasn't updated during rebases
Fixes: 334759d850 ("zink: implement passthrough tcs shader injection")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8696 >
2021-01-25 18:40:06 +00:00
Ryan Neph
6fb66d18be
Revert "virgl: fix BGRA emulation artifacts during window resize"
...
This reverts commit accc222217 .
The change in accc2222 caused a regression in gameplay for a few valve
games such as Portal 2 where textures were rendered darker than
expected.
Reverting to restore normal gameplay at the smaller cost of
re-introducing the issue described in !8119 .
Fixes: accc2222 ("virgl: fix BGRA emulation artifacts during window resize")
Signed-off-by: Ryan Neph <ryanneph@google.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8664 >
2021-01-25 17:58:16 +00:00
Erik Faye-Lund
9052819ebb
zink: request texcoord replace lowering
...
We don't actually support point-sprites by texcoord replacement, so let's
remove that cap. This allows gallium to automatically lower this to the
PNTC varying instead, which we do support.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6473 >
2021-01-25 17:32:33 +00:00
Erik Faye-Lund
3b705ea511
gallium/st: lower point-sprites if not supported
...
Not all drivers supports the texcoord replacement needed for
point-sprites, but all drivers support gl_PointCoord. So let's lower
this so we can support point-sprites for all drivers.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6473 >
2021-01-25 17:32:33 +00:00
Erik Faye-Lund
bc0222d471
compiler/nir: add texcoord replace lowering pass
...
This lowering pass allows us to replace point-sprites to gl_PointCoord,
which better match what modern hardware does.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6473 >
2021-01-25 17:32:33 +00:00
Erik Faye-Lund
92ff89f6f5
mesa/main: remove leftover bumpmap code
...
This variable is only ever written as NULL, so we can omit it entirely.
Fixes: 4000c0112a ("Remove the ATI_envmap_bumpmap extension")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6473 >
2021-01-25 17:32:33 +00:00
Samuel Pitoiset
9c65f1f111
radv: synchronize Cmd{Set,Write}Event() using PS_DONE/CS_DONE events
...
This is probably rarely used but it can be easily implemented now.
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/8650 >
2021-01-25 17:22:08 +00:00
Samuel Pitoiset
bb8f87088c
radv,aco: fix shifting input VGPRs for the LS VGPR init bug on GFX9
...
We were incorrectly shifting the input VGPRs for the instance ID
for chips affected by the LS VGPR init bug (ie. Vega10 and Raven).
When there is no HS threads, the hardware loads the LS VGPR
starting from VGPR 0, so they should be shifted by two.
This fixes some sort of vertex explosion with Squad, Visage, Barn
Finders and probably more titles that use tessellation. Note that
only Vega10 and Raven were affected by this bug.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4129
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3311
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Tested-by: Diego Viola <diego.viola@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8694 >
2021-01-25 17:10:44 +00:00
Erik Faye-Lund
6b233b9536
docs/zink: correct vk version for GL 4.2
...
I've gotten clarification from Khronos about this here:
https://github.com/KhronosGroup/Vulkan-Docs/issues/1437
So as it stands, we currently require Vulkan 1.2 for GL 4.2, not Vulkan
1.1. Let's update the docs to reflect this.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Fixes: fb65285629 ("docs/zink: add GL 4.2 requirements")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8692 >
2021-01-25 17:07:16 +00:00
Erik Faye-Lund
b7c3187420
docs/features: mark off two more extensions for zink
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8688 >
2021-01-25 16:59:36 +00:00
Mike Blumenkrantz
b59d98ae5f
zink: enable PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE
...
this was already handled internally
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8688 >
2021-01-25 16:59:36 +00:00
Mike Blumenkrantz
b7fe85e949
zink: set lower_mul_2x32_64 when 64bit int support is available
...
started hitting umul_2x32_64 recently on ANV
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8674 >
2021-01-25 16:50:15 +00:00
Rhys Perry
f03c20ffae
aco: fix WQM for texture instructions with args before the coordinates
...
Previously, we might not have required all coordinates to be in WQM if
there were other args before them. We should probably also require that
the offset is in WQM.
fossil-db (GFX10.3):
Totals from 10053 (7.21% of 139391) affected shaders:
SGPRs: 911032 -> 911048 (+0.00%); split: -0.00%, +0.00%
VGPRs: 689856 -> 688412 (-0.21%); split: -0.26%, +0.05%
CodeSize: 84151460 -> 84140396 (-0.01%); split: -0.02%, +0.01%
MaxWaves: 77526 -> 77527 (+0.00%)
Instrs: 15972106 -> 15971521 (-0.00%); split: -0.01%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4153
Fixes: 4015b3651a ("aco: only require texture coordinates to be in WQM if NSA is used")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8693 >
2021-01-25 16:31:39 +00:00
Mike Blumenkrantz
b415211ce9
zink: add a VkExternalMemoryImageCreateInfo for PIPE_BIND_SHARED images
...
required by spec
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8273 >
2021-01-25 16:14:30 +00:00
Samuel Pitoiset
7f1ad0538f
radv: enable sparseImageInt64Atomics/sparseImageFloat32Atomics
...
This should be supported. Note that CTS doesn't have tests for
sparseImageFloat32Atomics.
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/8643 >
2021-01-25 16:00:50 +00:00
Connor Abbott
cf5df15622
ntt: Assume that nir_tex_instr::dest_type is sized
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:22:07 +01:00
Connor Abbott
ae7a9d0585
ir3: Assume that nir_tex_instr::dest_type is sized
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:22:07 +01:00
Connor Abbott
5c92b3c460
panfrost: Assume that nir_tex_instr::dest_type is sized
...
Get rid of some now-redundant code, and cleanup the is-float check in
the bifrost compiler.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:59 +01:00
Connor Abbott
6ca1ab3bb4
nir/lower_tex: Assume that nir_tex_instr::dest_type is sized
...
This reverts the code back to the form it was before, but with an
explicitly sized float32 instead of float, now that all producers are
switched over.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:59 +01:00
Connor Abbott
708c47e663
nir: Validate nir_tex_instr::dest_type bitsize
...
In theory, we could also verify this against the sampler type for
sampler derefs, but there are a number of complications there:
- SPIR-V 1.4 lets you override the signedness of integer samplers
per-instruction. So the base type may not match.
- mediump/RelaxedPrecision samplers may get lowered to f16 in the
instruction or may not. So the bitsize may not match.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
65a35dc7ea
ptn: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
6af5181f13
vtn: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
d5e54c6edb
glsl/nir: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
60bb3fec54
st/atifs: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
8133649918
ttn: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
4b623afc3f
gallium/nir: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
ff0b7e0da9
st/mesa: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:53 +01:00
Connor Abbott
b2da598ff9
nir: Use sized types for nir_tex_instr::dest_type
...
Revieweeviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:48 +01:00
Connor Abbott
3ed9e75868
d3d12/blit: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:48 +01:00
Connor Abbott
f0cb161e78
panfrost/blit: Use sized types for nir_tex_instr::dest_type
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:43 +01:00
Connor Abbott
c81389ace0
dxil: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
5c41a416c1
anv: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
fe45fefe57
intel/blorp: Use sized types for nir_tex_instr::dest_type
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
2a470ab0d0
v3dv/meta: Use sized types for nir_tex_instr::dest_type
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
219b84fd5f
radv/meta: Use sized types for nir_tex_instr::dest_type
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
68969cbcb7
brw/vec4: Don't convert tex dest type to glsl_type
...
We were using nir_tex_instr::dest_type to a glsl_type, then passing it
to emit_texture(), only to just check the number of components. Just
pass the number of components directly. This lets us delete
brw_glsl_base_type_for_nir_type, which was asserting with
nir_texop_all_samples_equal because it didn't handle bool32.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
3d803893da
nir/lower_bool: Rewrite dest_type for boolean destinations
...
This happens with nir_texop_samples_identical, and we need to keep
things consistent and (soon) keep the validator happy when expanding
booleans once we switch that to having a dest_type of bool1.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
3d6fe93382
ntt: Handle sized tex destination types
...
I believe this code doesn't handle 16-bit destination types so we only
need to handle float32, etc.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
23beffadea
freedreno/ir3: Handle sized tex destination types
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:42 +01:00
Connor Abbott
acd6616eab
nir/lower_tex: Handle sized tex destination types
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989 >
2021-01-25 11:21:26 +01:00
Lionel Landwerlin
65f7b93435
intel: silence unused var warnings in release builds
...
v2: Use ASSERTED
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4162
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8681 >
2021-01-25 09:04:32 +00:00
Dave Airlie
c196ffaca6
vk-device-select: add device group support
...
This just sorts CPU device groups last in case an app tries to
use the first device group.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8551 >
2021-01-25 07:08:14 +10:00
Erico Nunes
250b511f8e
lima/ppir: fix creation of mov node for non-ssa tex dest
...
In ppir when a texture node has only a single successor, it is used
directly to output the texture lookup value, in order to save the
insertion of a mov.
However, a sequence like this can happen:
r0 = (float)tex r8 (coord), 0 (texture), 0 (sampler)
r1 = mov r0.z
In this case, even if the mov is a single successor, the assumption
that only the elements needed by the successor node cannot be made.
The target register can also be read or written elsewhere and so the
simplification cannot be made. Add an exception to cover this case.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8517 >
2021-01-24 13:35:49 +00:00
Mike Blumenkrantz
b6f8f3a3ba
zink: fix streamout for clipdistance
...
the assert added here during review broke this since clipdistance is 8 components
Fixes: 9eec52c67e ("zink: tweak xfb slot mapping in ntv")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8673 >
2021-01-24 02:21:04 +00:00
Rob Clark
f0b0095fec
ci/freedreno/a6xx: Skip vs-output-array-vec2-index-wr-before-gs
...
This one test seems to be destroying the world, and causing massive
flakeyness, and is generally more a recovery/GMU stress test than
anything.
See #4159
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659 >
2021-01-23 10:22:31 -08:00
Rob Clark
03c28278a7
freedreno: Add perf_warn() for missed UBWC opportunities
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659 >
2021-01-23 09:57:48 -08:00
Rob Clark
55f4f6882f
freedreno/a6xx: Add helper to check if UBWC is supported
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659 >
2021-01-23 09:57:48 -08:00
Rob Clark
38b073ebfe
freedreno: Add fmt/args macros for pipe_resource
...
Deduplicate some long debug prints before adding more.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659 >
2021-01-23 09:57:48 -08:00
Rob Clark
a065682f30
freedreno: Add perf_warn() trace helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8659 >
2021-01-23 09:57:48 -08:00
Keith Packard
d548d781ee
glx: Provide glvnd wrapper for glXSwapIntervalEXT
...
When using glvnd, this function needs to be exposed through
getDispatchAddress or libglvnd will not find it.
Signed-off-by: Keith Packard <keithp@keithp.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Fixes: 60ebeb4608 "glx: Implement GLX_EXT_swap_control for DRI2 and DRI3"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8621 >
2021-01-22 22:34:23 -08:00
Juan A. Suarez Romero
8588fb65d6
vc4/ci: Replace expect script by python script
...
Replace the expect-based script to turn on/off the Raspberry Pi devices
using a python-based script.
v2:
- Fix small nitpicks (Juan)
- Limit line length (Andres)
v3:
- Bump image tags (Eric, Andres)
v4:
- Bump image tags (Eric)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Acked-by: Andres Gomez <agomez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8362 >
2021-01-23 05:35:24 +00:00
Mike Blumenkrantz
64fd191d8a
spirv: handle NoContraction in GLSL450 alu ops
...
we were dropping this when it was set, leading to incorrect algebraic
optimizations that broke various types of tests, e.g., running
spec@arb_gpu_shader5@execution@precise@fs-fract-of-nan in zink
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6116 >
2021-01-23 01:39:09 +00:00
Mike Blumenkrantz
3c3764f7df
zink: don't force a renderpass start when setting framebuffer state
...
this breaks compute and isn't strictly necessary since we'll be starting
a renderpass during draw anyway; we just need to flush here to update the
state
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8662 >
2021-01-23 01:11:24 +00:00
Mike Blumenkrantz
2bc24c7e46
zink: add function for waiting on a specific batch's fence
...
previously we only had zink_fence_wait(), which just waits on the
current batch to finish, but it may be the case that we don't want to
wait on all batches up to that point, so we can optimize a bit by only
waiting as long as we have to
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8662 >
2021-01-23 01:11:24 +00:00
Mike Blumenkrantz
53d9beb9b8
gallium/u_inlines: add helper for simplifying pipe_context::resource_copy_region
...
this hook has too many params, and I only need like half of them
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8624 >
2021-01-22 23:47:03 +00:00
Mike Blumenkrantz
cacb3e1826
zink: enable PIPE_CAP_SAMPLER_VIEW_TARGET
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8629 >
2021-01-22 22:37:46 +00:00
Chia-I Wu
d37124b065
virgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE
...
An untyped resource is a blob resource that contains only raw bytes
without type information (e.g., width, height, format, etc.). virgl
supports only typed resources, and when it encounters untyped resources,
it fails silently in the host.
This cap enables virgl to assign type information to untyped resources.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-By: Isaac Bosompem <mrisaacb@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584 >
2021-01-22 21:25:49 +00:00
Chia-I Wu
41366ba494
virgl: update headers
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-By: Isaac Bosompem <mrisaacb@google.com >
Acked-By: Gurchetan Singh <gurchetansingh@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584 >
2021-01-22 21:25:48 +00:00
Erik Faye-Lund
fb65285629
docs/zink: add GL 4.2 requirements
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
d0e7a7d58d
docs/zink: add GL 4.1 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
c3d7de47cd
docs/zink: add GL 4.0 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
4374e8e99f
docs/zink: fix phrasing of GL 3.3 requirements
...
These requirements aren't all about VkPhysicalDeviceFeatures, so let's
make the text reflect that.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
02c43eb975
docs/zink: document the independentBlend requirement for GL3
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
fb5d7d60e7
docs/zink: add two missing required features
...
If these features aren't supported, we'll start doing illegal stuff, so
let's document it.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
a640588a41
docs/zink: add missing colon
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Vinson Lee
9565c1d83c
nv50/ir: Initialize RegAlloc member func in constructor.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member func is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8568 >
2021-01-22 21:14:51 +00:00
Erik Faye-Lund
92ec7b577c
zink: clone shader before lowering clip_halfz
...
If we don't clone the shader before lowering clip_halfz, we risk ending
up performing the same lowering multiple times, each time we compile a
new variant.
This fixes rendering in Neverball.
Fixes: 15f478fe84 ("zink: only run nir_lower_clip_halfz for last vertex processing stage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4147
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8652 >
2021-01-22 20:04:17 +00:00
Mike Blumenkrantz
5282210c0b
zink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED
...
we actually need more features here than just the one which was checked to
enabled this
Fixes: 2f6f4b613c3 ("zink: export shader image caps using features")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8656 >
2021-01-22 19:54:58 +00:00
Michel Dänzer
d31f2200b3
ci: Enable process isolation for softpipe & freedreno piglit jobs
...
Disabling process isolation causes a random set of tests to be
spuriously skipped. The set of skipped tests can change when piglit is
rebuilt (even from the same Git commit), which can make docker image
rebuilds painful. (Not to mention the reduced testing coverage due to
the skipped tests)
One downside of this change is that the arm64_a630_piglit_shader job
now takes almost 10 minutes.
v2:
* Change arm64_a530_piglit_shader job as well, but make it run manually
on branches of forked repositories only, since it takes almost 20
minutes now. (Eric Anholt)
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8611 >
2021-01-22 19:35:06 +00:00
Jason Ekstrand
cca257d596
anv: Advertise shaderInt64 on Gen11+
...
On Gen11, they took away our hardware int64 support. We have lowering
for all of it in NIR except for subgroup ops. Now that all the subgroup
ops are implemented, we can enable the feature.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
8c2543d037
intel/fs: Implement umin/umax shuffle
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
a6500236e3
intel/fs: Refactor our shuffle emit code
...
This adds an emit_scan_step helper which gives us a place to do
something a bit more interesting than emitting a single op.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
44571c6a68
intel/fs: Properly lower 64-bit MUL on 64-bit-incapable platforms
...
There are two problems this commit solves: First, is that the 64x64 MUL
lowering generates a Q MOV which, because of how late it runs in the
compile pipeline, it never gets removed. Second, it generates 32x32
MULs and we have to run it a second time to lower those.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
c80db6611a
intel/fs: Support 64-bit CLUSTER_BROADCAST on Gen11+
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
b90921ec0c
intel/fs: Support 64-bit SHUFFLE on Gen11+
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
cdedc82329
intel/fs: Support 64-bit SEL_EXEC on Gen11+
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
58bcb5401d
intel/fs: QUAD_SWIZZLE requires packed data
...
We could probably support some strides if we tried hard enough but the
whole point of this opcode is to accelerate things with crazy Align16 or
crazy regions. It's ok if we have to emit an extra MOV to get a packed
source.
Fixes: 8b4a5e641b "intel/fs: Add support for subgroup quad operations"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
69a3559efd
intel/reg,fs: Handle immediates properly in subscript()
...
Just returning the original type isn't what we want in basically any
case. Mask and shift the immediate as needed.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
e797daba53
intel/compiler: Move brw_reg_type_for_bit_size to brw_reg_type.h
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
4c8cbe9b13
intel/compiler: Return 1 for immediates in regs_read
...
Previously, we were returning 2 whenever the source was a Q type. As
far as I can tell, the only reason why this hasn't blown up before is
that it was only ever used for VGRFs until the SWSB pass landed which
uses it for everything. This wasn't a problem because Q types generally
aren't a thing on TGL. However, they are for a small handful of
instructions.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
178820212b
nir/lower_int64: Lower 64-bit vote_ieq
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
731adf1e17
nir/lower_int64: Add lowering for 64-bit iadd shuffle/reduce
...
Lowering iadd is a bit trickier because we have to deal with potential
overflow but it's still not bad to do in NIR.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
bf7a114246
nir/lower_int64: Add lowering for some 64-bit subgroup ops
...
These are all pretty trivial because we can just split the op into one
subgroup op per half of the value. There's some question as to whether
these belong in lower_int64 or lower_subgroups but, on Intel, they key
decider of whether or not we need the lowering is based on whether or
not we have hardware int64 support.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
da331f814f
nir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
70b4524de5
nir/lower_int64: Add a level of wrapper functions
...
We're about to start lowering a few intrinsics so we need support more
than just ALU.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Samuel Pitoiset
093b3f6e1f
radv: only decompress the depth/stencil aspect that needs to be resolved
...
For depth/stencil images, the driver was decompressing both aspects
while it should be enough to only decompress the one that's going
to be resolved.
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/8561 >
2021-01-22 18:16:19 +00:00
Ben Niu
36a4aeb91f
util: When building 'ARM64EC', don't use x64 intrinsics which need to be emulated
...
ARM64EC is a new build target for Windows ARM64 devices for x64 support.
These binaries can be loaded in x64 processes, but don't need to be emulated. For
code that's heavily used, avoiding the emulation can be a huge perf win.
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8619 >
2021-01-22 17:56:08 +00:00
Jesse Natalie
86b4f6ad43
main: Undefine MemoryBarrier for Windows
...
In winnt.h, MemoryBarrier can be defined in one of 4 ways, depending
on which architecture is being targeted.
- For x86, it's an inline function.
- For x64, it's an object-like macro, which means that the MemoryBarrier
function in the table actually ends up being called __faststorefence.
- For arm and arm64, it's a function-like macro, and the preprocessor fails
because the function table entry doesn't call it.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8485 >
2021-01-22 09:32:00 -08:00
Jason Ekstrand
0e1447eb1b
anv: Early-exit from cmd_buffer_flush_state
...
If we don't have any dynamic state, pipeline, or descriptor changes,
we can do a very quick early-exit instead of checking for a bunch of
stuff bit-by-bit.
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Jason Ekstrand
18fc1dfea3
anv: Only flush descriptors used by the pipeline
...
Previously, if we had a pipeline transition from something which used,
say, tessellation to something which didn't and we ended up with
tessellation descriptors dirty, we could end up re-emitting far more
than necessary. With this commit, we mask off unused stages so we only
update when necessary.
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Jason Ekstrand
72c7a68c2b
anv: Take the set of stages to flush in flush_descriptor_sets
...
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Jason Ekstrand
16a81cabb5
anv: Exit early from cmd_buffer_apply_pipe_flushes
...
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Samuel Pitoiset
7683ff1420
radv: use a workgroup size of 8x8 for FMASK color expand
...
Probably better for access patterns.
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/8642 >
2021-01-22 17:05:17 +00:00
Samuel Pitoiset
b4f551d41b
radv: use the range aspect mask in FMASK color expand
...
Instead of harcoding it.
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/8642 >
2021-01-22 17:05:17 +00:00
Samuel Pitoiset
4d30de140e
radv: add multi-layer support to FMASK color expand
...
For better performance for layered MSAA images.
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/8642 >
2021-01-22 17:05:17 +00:00
Marek Olšák
67c2921193
radeonsi: iterate from draw 1 for total/min_direct_count computation
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
01e3d28829
radeonsi: enable accidentally disabled fast launch with non-indexed tri strips
...
Only *indexed* triangle strips hang.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
ea670ac150
radeonsi: skip some code for ALLOW_PRIM_DISCARD_CS if tess or GS is enabled
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
dd9801a918
radeonsi: rename SI_SGPR_RW_BUFFERS to SI_SGPR_INTERNAL_BINDINGS
...
They are just internal buffers and images.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
59a478b843
radeonsi: move if (sctx->vertex_buffers_dirty) into the upload function
...
This looks unnecessary, but the next commit will build upon it and add
more stuff into the function.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
5013828863
radeonsi: don't set vertex buffer dirty flags when they don't do anything
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
26d785fbbd
radeonsi: move y_inverted out of si_viewports
...
for better packing
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
c1957e58a6
radeonsi: inline si_blend_color and si_clip_state structures
...
better packing
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
ca2062a394
radeonsi: simplify determining whether render condition is enabled at draw time
...
Read one bool instead of reading one bool and one pointer.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
1a2dde8f86
radeonsi: add internal blitter_running flag
...
to skip the indirection in si_decompress_textures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
5fabeb49d8
radeonsi: don't use rasterizer_discard to validate draws, only check ps_shader
...
Let's just say that PS can never be NULL here.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
cd42ed34b0
radeonsi: optimize translating index_size to index_type
...
gcc generated a lookup table for the switch. This replaces it with
arithmetics.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
28e419f001
radeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
488cd3b93f
radeonsi: clear dirty_states if si_pm4_bind_state is unbinding or no-op
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
a0978fffb8
radeonsi: add new possibly faster command submission helpers
...
This decreases the release libgallium_dri.so size without debug symbols
by 16384 bytes. The CPU time spent in si_emit_draw_packets decreased
from 4.5% to 4.1% in viewperf13/catia/plane01.
The previous code did:
cs->current.buf[cs->current.cdw++] = ...;
cs->current.buf[cs->current.cdw++] = ...;
cs->current.buf[cs->current.cdw++] = ...;
cs->current.buf[cs->current.cdw++] = ...;
The new code does:
unsigned num = cs->current.cdw;
uint32_t *buf = cs->current.buf;
buf[num++] = ...;
buf[num++] = ...;
buf[num++] = ...;
buf[num++] = ...;
cs->current.cdw = num;
The code is the same (radeon_emit is redefined as a macro) except that
all set and emit functions must be surrounded by radeon_begin(cs) and
radeon_end().
radeon_packets_added() returns whether there has been any new packets added
since radeon_begin.
radeon_end_update_context_roll(sctx) sets sctx->context_roll = true
if there has been any new packets added since radeon_begin.
For now, the "cs" parameter is intentionally unused in radeon_emit and
radeon_emit_array.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:29 +00:00
Samuel Pitoiset
3ef89b245e
radv: fix separate depth/stencil layout in render pass
...
We used to select the stencil layout even if we should have selected
the depth/stencil one.
Fixes: e4c8491bdf ("radv: implement VK_KHR_separate_depth_stencil_layouts")
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/8552 >
2021-01-22 15:54:18 +00:00
Erik Faye-Lund
45bebc7a9c
zink: respect fragment-shader depth-layout
...
This is required by GLSL 1.30 and later, so we should also respect the
setting.
Fixes: 6785d8c460 ("zink: expose GLSL 1.30")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8644 >
2021-01-22 15:46:49 +00:00
Erik Faye-Lund
855370bb62
zink: make all xfb caps depend on extension
...
Without this, we'll expose GL_ARB_transform_feedback2 and
GL_ARB_transform_feedback3 even without VK_EXT_transform_feedback,
because these caps are directly wired up without checking the pervious
extensions.
Fixes: e8ad52f7b0 ("zink: enable xfb extension in screen creation")
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/8640 >
2021-01-22 15:39:20 +00:00
Erik Faye-Lund
8c7d971666
zink: require vulkan memory model for tesselation
...
We enable the KHR_vulkan_memory_model extension whenever we use
tesselation, so right now this is a defacto requirement. So let's make
this requirement explicit.
Fixes: f815b87e18 ("zink: export tess shader pipe caps")
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/8640 >
2021-01-22 15:39:20 +00:00
Erik Faye-Lund
f95c174927
zink: check for extension instead of function
...
This shouldn't change any behavior, it just seems a bit more to the
point to check for the extension that decides if these are NULL or not
than to check both of them.
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/8640 >
2021-01-22 15:39:20 +00:00
Erik Faye-Lund
c9340744a3
zink: respect feature-cap for multi-draw indirect
...
Even in the presence of VK_KHR_draw_indirect_count, we still technically
need to respect the feature-cap when using a Vk 1.0 core-function.
Fixes: cef876910a ("zink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps")
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/8640 >
2021-01-22 15:39:20 +00:00
Erik Faye-Lund
6f6941e2dd
zink: respect feature-cap for sample-shading
...
Vulkan has a cap to enable this, we should check that one rather than
always claiming support.
Fixes: 0c70268ff7 ("zink: mark ARB_sample_shading as supported")
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/8640 >
2021-01-22 15:39:20 +00:00
Erik Faye-Lund
612169859a
zink: respect feature-cap for independent blending
...
Vulkan has a cap to enable this, we should check that one rather than
always claiming support.
Fixes: 8d46e35d16 ("zink: introduce opengl over vulkan")
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/8640 >
2021-01-22 15:39:20 +00:00
Erik Faye-Lund
831d205513
zink: respect feature-cap for robust buffer access
...
Vulkan has a cap to enable this, we should check that one rather than
always claiming support.
Fixes: 61720098fa ("zink: set PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR")
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/8640 >
2021-01-22 15:39:20 +00:00
Erik Faye-Lund
b35e11ef95
zink: always expose linear float textures
...
This is not an optional feature in Vulkan, so we can rely on this being
supported. This has the nice benefit of enabling OpenGL ES 3.0 support
on ANV.
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/8640 >
2021-01-22 15:39:20 +00:00
Boyuan Zhang
27209e63ea
frontend/va/image: add pipe flush for vlVaPutImage
...
To fix synchronization issue between multimedia queue and gfx queue.
Adding flush call will let multimedia queue to wait for the content of gfx
command buffer to be executed, for the case where there is dependency
between these two queues.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8567 >
2021-01-22 15:03:38 +00:00
Samuel Pitoiset
f6755eee0c
radv: enable SQTT support on GFX10.3
...
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/8616 >
2021-01-22 14:25:16 +00:00
Samuel Pitoiset
aedcaff356
ac,radv: add SQTT support on GFX10.3
...
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/8616 >
2021-01-22 14:25:16 +00:00
Samuel Pitoiset
cd53f24fbf
ac/rgp: add support for GFX10.3
...
According to AMDVLK, GFX10.3 uses SQTT version 2.4.
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/8616 >
2021-01-22 14:25:16 +00:00
Samuel Pitoiset
5b5cd18853
radv: inhibit clock gating when tracing with SQTT
...
Cc: <mesa-stable@lists.freedesktop.org >
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/8616 >
2021-01-22 14:25:16 +00:00
Samuel Pitoiset
c40ea24ee0
radv: fix overflow when computing the SQTT buffer size
...
With RADV_THREAD_TRACE_BUFFER_SIZE=1073741824, the computed size
will overflow and be 4096 instead of 4294967296.
Cc: <mesa-stable@lists.freedesktop.org >
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/8616 >
2021-01-22 14:25:16 +00:00
Rhys Perry
e115b01948
aco: return references in instruction cast methods
...
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/8595 >
2021-01-22 14:12:33 +00:00
Rhys Perry
1d245cd18b
aco: use format-check methods
...
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/8595 >
2021-01-22 14:12:32 +00:00
Rhys Perry
70dbcfa1c9
aco: use instruction cast methods
...
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/8595 >
2021-01-22 14:12:32 +00:00
Rhys Perry
fb12302b8e
aco: add instruction cast and format-check methods
...
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/8595 >
2021-01-22 14:12:32 +00:00
Rhys Perry
441ead5fb3
aco: remove Format::{VOP3A,VOP3B}
...
These are really the same as Format::VOP3.
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/8595 >
2021-01-22 14:12:32 +00:00
Víctor Manuel Jáquez Leal
925d701014
frontends/va/context: don't set max_references with num_render_targets
...
For HEVC and VP9 template's max_references are tied to the number of
surfaces associated with context. Later, the decoder is created if
max_references is different to zero.
But vaCreateContext() doesn't really need an array of VASurfaceIDs (see
https://lists.01.org/pipermail/intel-vaapi-media/2017-July/000052.html and
https://github.com/intel/libva/issues/251 ).
This patch removes the validation of the max_references at decoder
creation and also remove the assignation of num_render_targets to
max_references.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com >
Reviewed-by: Leo Liu <leo.liu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7949 >
2021-01-22 14:59:53 +01:00
Rhys Perry
824eba2148
aco: don't consider a phi trivial if same's register doesn't match the def
...
For example:
s2: %688:s[32-33] = p_linear_phi %3:s[10-11], %688:s[32-33]
would have been considered trivial.
This might happen due to parallelcopies when assigning phi registers.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: 69b6069dd2 ("aco: refactor try_remove_trivial_phi() in RA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8645 >
2021-01-22 12:42:47 +00:00
Erik Faye-Lund
9eab6ca20c
docs/features: remove a few redundant zink mentions
...
GL 4.1 and 4.2 is listed as done for Zink anyway, so we don't need to
single out these features as supported any longer.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8639 >
2021-01-22 11:22:22 +00:00
Erik Faye-Lund
ce7eb7e02a
docs/features: add missing features for zink
...
Zink implements more features than currently maked off in features.txt,
so let's fill those bits in!
This is based on the output of glxinfo on ANV.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8639 >
2021-01-22 11:22:22 +00:00
Alejandro Piñeiro
a346e1dea0
v3dv: properly handle two different binding points for cmd_buffers
...
From vkCmdBindPipeline spec:
"pipelineBindPoint is a VkPipelineBindPoint value specifying to
which bind point the pipeline is bound. Binding one does not disturb
the others."
But internally we were only handling one pipeline per command buffer,
so binding a pipeline of one type would override an alredy bound
pipeline of other type.
Note that for push constants, in the same way that we were keeping one
client array and one bo for the values, for all stages, independently
of the stageFlags specified by vkCmdPushConstants, we are keeping the
same idea here, so such client array and bo is still tied to the
command buffer, and used by the two pipeline bind points. That makes
far easier tracking the push constants. We could revisit in the future
if we want a more fine grained tracking.
Fixes the following crashes:
dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_diff_range_bind_push_vert_and_comp
dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_same_range_bind_push_vert_and_comp
v2 (from Iago review)
* Move removal of v3dv_resource definition to a different commit.
* Use the new v3dv_cmd_pipeline_state on the cmd buffer meta
sub-struct, call it gfx for consistency
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8613 >
2021-01-22 10:50:32 +00:00
Alejandro Piñeiro
dac20e100b
v3dv: drop v3dv_resource definition
...
In the end it became a v3dv_bo+offset combination, and for that we
already have v3dv_cl_reloc, so it became redundant.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8613 >
2021-01-22 10:50:31 +00:00
Icecream95
f55649d20b
panfrost: Add support for INTEL_blackhole_render
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8607 >
2021-01-22 06:31:02 +00:00
Mike Blumenkrantz
96d7555770
zink: support PIPE_FORMAT_X24S8_UINT
...
enables ARB_texture_view
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8630 >
2021-01-21 22:03:49 -05:00
Mike Blumenkrantz
264a5b1d15
zink: add layout member to barrier setup in draw
...
this lets us track different layouts
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8630 >
2021-01-21 21:40:41 -05:00
Mike Blumenkrantz
09182d9ae8
zink: support VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL usage
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8630 >
2021-01-21 21:40:41 -05:00
Hoe Hao Cheng
fa86272547
zink: expose PIPE_CAP_ANISOTROPIC_FILTER
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Tested-by: Fabio Pedretti <fabio.ped@libero.it >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8617 >
2021-01-22 01:30:50 +00:00
Kenneth Graunke
0f9f625089
iris: Refactor iris_debug_recompile interface to take a shader.
...
This simplifies each call site slightly and will save some interface
churn in the next rework.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8634 >
2021-01-22 00:20:27 +00:00
Kenneth Graunke
4423903089
iris: Drop iris_print_program_cache().
...
I have never used this to debug anything in iris, and it's been years
since I even thought about using i965's similar functionality. I'm
planning to move a bunch of shaders out of the global hash table, at
which point it'll be much less useful. So, just drop it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8634 >
2021-01-22 00:20:27 +00:00
Kenneth Graunke
5e2c799d0e
iris: Drop find_existing_assembly optimization from program cache
...
This tried to de-duplicate identical copies of the same shader
assembly, but in the least efficient way possible: it did a linear
walk through every shader in the entire context memcmp'ing the
final assembly (after going through the effort to compile it).
In the end, all it saved was space and number of BOs, not even
state changes.
This optimization has been mostly replaced by st/mesa's cache
mechanism, which looks for multiple shaders that compile to the
same NIR and go further than this did, and actually reuse the
same pipe shader state. That's even more efficient than this.
This seems to still trigger some times, because the NIR that
st/mesa hashes hasn't quite been finalized and stripped. But
it would be better to improve that, not this.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8634 >
2021-01-22 00:20:27 +00:00
Dylan Baker
7b9c01a5b1
bin/post_version: convert the csv.reader into a concrete list
...
which is necessary to be able to index into it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8477 >
2021-01-21 23:22:36 +00:00
Mike Blumenkrantz
61720098fa
zink: set PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8631 >
2021-01-21 23:14:31 +00:00
Mike Blumenkrantz
bcc8222277
zink: set PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8631 >
2021-01-21 23:14:31 +00:00
Mike Blumenkrantz
0ab9114abd
zink: force per-sample interpolation
...
this gives us new rasterizer states when multisample stuff changes instead
of new fs states, which is what we want since these correlate to pipeline
flags, not shader-specific things
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8631 >
2021-01-21 23:14:31 +00:00
Kenneth Graunke
e2500c02cc
iris: Consider resolves after changing a resource's aux state
...
The intention of IRIS_DIRTY_{RENDER,COMPUTE}_RESOLVES_AND_FLUSHES
is to avoid considering resolves/flushes on back to back draw calls
where nothing of significance has changed with the resources. When
anything changes that could require a resolve, we must flag those.
Those situations are:
1. Texture/image/framebuffer bindings change
(as the set of images we need to look at is now different)
2. Depth writes are enabled/disabled (the resolve code uses this)
3. The aux state for a currently bound resource changes.
We were missing this last case. In particular, one example where
we missed this was:
1. Bind a texture.
2. Clear that texture (likely blits/copies/teximage would work too)
3. Draw and sample from that texture
Clear-then-Bind would work, as binding would flag resolves as dirty.
But Bind-then-Clear doesn't work, as clear can change the aux state
of the bound texture, but wasn't flagging that anything had changed.
Technically, we could consider whether the resource whose aux state
is changing is bound for compute (and only flag COMPUTE_RESOLVES),
or bound for a 3D stage (and only flag RENDER_RESOLVES), and flag
nothing at all if it isn't bound. But we don't track that well,
and it probably isn't worth bothering. So, flag unconditionally
for now.
This does not appear to impact Piglit's drawoverhead scores.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3994
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4019
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8603 >
2021-01-21 22:58:08 +00:00
Mike Blumenkrantz
64f55b82c7
zink: set PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS
...
ARB_copy_image is already supported
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8625 >
2021-01-21 22:29:54 +00:00
Marek Olšák
81f7cb149d
st/mesa: enable state var merging to improve fetch_state performance
...
The requirement is that drivers must implement finalize_nir for
st_finalize_nir to be invoked at link time and before shader variant
generation. Without that, _mesa_optimize_state_parameters won't be called.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:30 +00:00
Marek Olšák
fd6ce2be90
mesa: merge equivalent switch cases in prog_statevars.c
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:30 +00:00
Marek Olšák
23729a7839
mesa: sort and tightly pack STATE_* enums to generate better switch code
...
The enums are sorted by their occurence in fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:30 +00:00
Marek Olšák
72a1828868
mesa: don't handle STATE_* enums in fetch_state that don't do anything
...
_mesa_program_state_flags() already reports invalid state flags. fetch_state is
always called after that.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
bddb4f9e1e
mesa: compute gl_program_parameter_list::UniformBytes accurately
...
The previous code didn't do it correctly.
(e.g. _mesa_recompute_parameter_bounds didn't do anything)
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
fb73058ad2
mesa: add upper bound to limit program state var iterations
...
State parameters are sometimes not perfectly sorted.
This optimizes the number of iterations we have to do for fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
0f7877d96a
mesa: sort state vars with constant indexing for ARB programs
...
This enables merging of state variables such as local parameters
for faster constant uploads. For Trine 2, this mainly sorts local
parameters which are in a random order.
Originally, the next pass added state variables (the code after this code).
If we add them before that, _mesa_add_state_reference will be a no-op
later and will return the ones we added.
So add all state parameters (without indirect indexing). After they are
added, sort them within the parameter list. Then fix their offsets to
correspond to their location after sorting.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
f485331c5b
mesa: merge local and env program parameters for faster uploads
...
This reduces CPU overhead for applications using ARB programs.
We can simply memcpy all local and env parameters into a constant buffer
if there are no holes.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
293526a273
mesa: don't allocate local parameters in fetch_state
...
It's better to return what the user expects: the initial value.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
5336e41ac0
mesa: optimize get_local_param_pointer and program_local_parameters4fv
...
The idea is to:
- eliminate the if statement that selects MaxLocalParams according to
the shader type by moving it into the new on-demand initialization block
- move allocation of local parameters into the on-demand initialization
block
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
bb3802b26f
mesa: rename STATE_LIGHT_ATTRIBS -> STATE_LIGHT_ARRAY for consistency
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
2a80595ba5
mesa: skip memmove in optimize_state_parameters if it's no-op
...
This doesn't change the behavior. Check if there is at least 1 element
that follows removed parameters.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
0c77190b31
glsl: split gl_CurrentAttribFragMESA into elements
...
This reduces the constant buffer size by eliminating unused elements
because it's no longer a uniform array that the compiler can't split.
This looks silly, but there is no other way because all elements must be
globally declared, which means they can't be generated by a loop.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
e3a7acf958
glsl: remove unused internal builtin gl_CurrentAttribVertMESA
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
7ad84a02bd
mesa: eliminate the switch statement for STATE_TEXGEN
...
The memory layout of texgen planes must be adjusted to allow
the elimination of switch statements in fetch_state.
v2: change the static asserts to compile on MSVC
Reviewed-by: Eric Anholt <eric@anholt.net > (v1)
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
0eccba1ac0
mesa: flatten STATE_MATERIAL and STATE_LIGHTPROD tokens
...
Flattening continue to get optimal code in fetch_state.
This merges the "face" field with the "attrib" field using the combined
MAT_ATTRIB_* enums. The outcome is that the inner switch statements can
be flatten because we can use MAT_ATTRIB_* to index into the attrib array
directly.
With LightSource attributes that don't have two sides, more math is
involved to get the correct index but it works out nicely too.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
3d9b5d8087
mesa: combine STATE_ENV, STATE_LOCAL enums with STATE_xxx_PROGRAM
...
flattening continues to get optimal code in fetch_state
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Marek Olšák
b4f3497786
mesa: remove STATE_INTERNAL
...
Let's flatten the tokens to generate optimal code for fetch_state.
There was only one name conflict: STATE_NORMAL_SCALE was used both as
internal and non-internal.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8183 >
2021-01-21 21:59:29 +00:00
Mike Blumenkrantz
0c1ed47eee
docs/features: mark off GL 4.2 for zink
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8620 >
2021-01-21 21:19:12 +00:00
Mike Blumenkrantz
099ce1aacc
zink: GLSL 420
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8620 >
2021-01-21 21:19:12 +00:00
Vinson Lee
f14836574a
nv50/ir: Initialize CodeEmitter members in constructor.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member code is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member codeSize is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member codeSizeLimit is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member relocInfo is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8569 >
2021-01-21 13:09:22 -08:00
Ilia Mirkin
245a696741
nvc0/ir: add fixup to deal with interpolateAtSample with non-MSAA
...
The spec calls to always use sample 0 in this case, whereas we can do
undefined things for invalid sample id's in the MSAA case.
Fixes
dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.non_multisample_buffer.sample_n_*
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8574 >
2021-01-21 15:55:34 -05:00
Andres Gomez
0773cd33c2
ci: correct the trace image URLs in the piglit summary
...
Fixes: 09429fa85b ("ci: add piglit replay jobs and remove tracie ones")
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8531 >
2021-01-21 20:33:23 +00:00
Andres Gomez
27f8c46648
ci: recover tracie dashboard URLs for failing traces
...
Tracie was including a direct link to the diff page in the resulting
JUnit XML file and the migration to piglit's replayer didn't, causing
a regression.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4027
Fixes: 09429fa85b ("ci: add piglit replay jobs and remove tracie ones")
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8531 >
2021-01-21 20:33:23 +00:00
Mike Blumenkrantz
3f9a6d333b
zink: export shader image caps using features
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
0daa61553d
zink: check if multisample support exists for shader image formats
...
avoid issues later by checking this now while we're here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
b9b812edb8
zink: handle shader image descriptor updates during draw
...
this is ugly and will be cleaned up later, but the idea is to have identical
handling between samplers and images such that for each type, an array of resources
is processed and it's just setting up variables which fall through to the actual
descriptor struct processing
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
9ba38ab6fa
zink: add a pipe_context::set_shader_images hook
...
this is sort of a weird mechanism since shader images have no allocated
struct and just hang out on the context
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
e1f798ca50
zink: break out bufferview creation into separate function
...
we'll reuse this for shader images
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
c4d00b9ca4
zink: handle image descriptors during zink_shader creation
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
10fb7a8c0f
zink: enable image caps in ntv when a shader has images
...
since we don't have the device info we have to emit some caps on the
fly here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
245d9fa21b
zink: enable early frag test execution in ntv when necessary
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
9cd2aff1a3
zink: add handling for all basic image ops in ntv
...
now that atomic handling is standardized, there's only a few actual ops left
to have proper image support
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
a4f06b3528
zink: expand ntv array derefs to track image derefs
...
this is sort of what we should be moving towards for io as well at some point,
the gist of the change here being that when images are deref'd, we need
to be able to do a lookup on the deref store later on in order to get the
image back
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
77b6b3eb0b
zink: add nir_var_uniform case to get_storage_class()
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
2ade1f3a6e
zink: handle nir_intrinsic_memory_barrier in ntv
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
768c9fa5c2
zink: handle more atomic ops in ntv
...
this standardizes and simplifies atomic op dispatch since none of them have
any special handling
it also removes unnecessary (but harmless) memory semantics from a previous commit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
a2855e2180
zink: handle image variable types in ntv
...
this just does spirv variable setup
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
fce791722b
zink: add new 'sampler_types' variable to ntv_context struct
...
image_types will be used for images in the next commit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:45 +00:00
Mike Blumenkrantz
a9f2637267
zink: add shader image support to zink_binding()
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
934625d53d
zink: add a pipe_context::memory_barrier hook
...
I'm not claiming this is 100% correct, but it works
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
06273abd20
zink: add 'has_draw' flag to batch struct
...
this tells us if a batch has a draw command pending
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
05629bb470
zink: verify format caps and add storage image usage when possible in creation
...
this is a huge perf hog that will be improved on later, but it's necessary for now
in order to correctly determine whether we can use resources as shader images
since gallium gives us no info about usage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
493fae5016
zink: add ntv function for emitting variable access decorations
...
these are used for images
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
882ab6afb7
zink: add spirv builder functions for image ops
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
3d2ffb394a
zink: add spirv_builder function for hexops
...
these are functions with 6 operands
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
139ae442c6
zink: rewrite image/sampler glsl -> vk type functions for robustness
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
177a42333f
zink: add ntv util function for getting image type
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Mike Blumenkrantz
263d3ae188
zink: rename zink_context::*image_views -> sampler_views
...
this is wrongly named and conflicts with things that are actually
image_views (assuming we're using gallium terminology in order to match
the rest of the ecosystem)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8504 >
2021-01-21 19:48:44 +00:00
Rhys Perry
9f389af35f
radv: sink load_ssbo
...
fossil-db (GFX10.3):
Totals from 11485 (8.24% of 139391) affected shaders:
SGPRs: 1032456 -> 1033696 (+0.12%); split: -0.69%, +0.81%
VGPRs: 815332 -> 807448 (-0.97%); split: -1.04%, +0.07%
SpillSGPRs: 18014 -> 13497 (-25.07%); split: -28.28%, +3.20%
SpillVGPRs: 1821 -> 1749 (-3.95%)
CodeSize: 101194172 -> 101235028 (+0.04%); split: -0.06%, +0.10%
Scratch: 198656 -> 178176 (-10.31%)
MaxWaves: 86703 -> 87219 (+0.60%); split: +0.67%, -0.07%
Instrs: 19224250 -> 19238562 (+0.07%); split: -0.05%, +0.13%
Cycles: 1486045388 -> 1487481292 (+0.10%); split: -0.03%, +0.13%
VMEM: 2040484 -> 2127647 (+4.27%); split: +6.64%, -2.37%
SMEM: 724060 -> 674966 (-6.78%); split: +1.22%, -8.00%
VClause: 312375 -> 314735 (+0.76%); split: -0.26%, +1.02%
SClause: 702274 -> 711991 (+1.38%); split: -0.77%, +2.15%
Copies: 1413440 -> 1422782 (+0.66%); split: -0.45%, +1.11%
Branches: 658696 -> 658838 (+0.02%); split: -0.12%, +0.14%
PreSGPRs: 884666 -> 879736 (-0.56%); split: -1.30%, +0.74%
PreVGPRs: 777374 -> 769947 (-0.96%)
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/6490 >
2021-01-21 18:07:03 +00:00
Rhys Perry
a6d92eaf4f
nir/sink,nir/move: sink/move reorderable load_ssbo
...
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/6490 >
2021-01-21 18:07:03 +00:00
Rhys Perry
af4c6605a8
radv: use nir_opt_access
...
fossil-db (GFX10.3):
Totals from 3231 (2.32% of 139391) affected shaders:
SGPRs: 168654 -> 167454 (-0.71%); split: -0.72%, +0.00%
VGPRs: 152352 -> 152416 (+0.04%)
CodeSize: 13872836 -> 13806376 (-0.48%); split: -0.50%, +0.02%
MaxWaves: 36640 -> 36634 (-0.02%)
Instrs: 2639959 -> 2626852 (-0.50%); split: -0.52%, +0.03%
Cycles: 77706000 -> 77496792 (-0.27%); split: -0.28%, +0.01%
VMEM: 809496 -> 790847 (-2.30%); split: +2.06%, -4.36%
SMEM: 267843 -> 253187 (-5.47%); split: +0.76%, -6.23%
VClause: 61353 -> 60426 (-1.51%); split: -1.86%, +0.35%
SClause: 95409 -> 92355 (-3.20%); split: -3.24%, +0.04%
Copies: 194951 -> 196702 (+0.90%); split: -0.53%, +1.43%
Branches: 84320 -> 84331 (+0.01%); split: -0.00%, +0.02%
PreSGPRs: 110162 -> 110203 (+0.04%); split: -0.04%, +0.07%
PreVGPRs: 127021 -> 127037 (+0.01%)
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/6490 >
2021-01-21 18:07:03 +00:00
Erik Faye-Lund
c3dbc4df19
docs: turn non-code into comment
...
If we want syntax-highlighting to actually work here, we should make
sure the code actually parses.
This fixes a warning during docs build.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8243 >
2021-01-21 17:42:01 +00:00
Erik Faye-Lund
c09c8fa34f
docs: fix broken link
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8243 >
2021-01-21 17:42:01 +00:00
Erik Faye-Lund
04c22a69f3
docs: fix sphinx-warnings due to lacking escaping
...
There's a few more cases that needs proper quoting for Sphinx. Asterisks
and ticks at the start of words, as well as underscores at the end of
symbols, even when they have trailing escaped characters.
We should really find a way to robustly escape these things when
generating them.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8243 >
2021-01-21 17:42:01 +00:00
Alejandro Piñeiro
319153365b
v3dv/descriptor: assert CrateDescriptorPool receives valid count values
...
Although I assume that this should be caught by the validation layers,
recently while triaging the following tests:
dEQP-VK.ycbcr.query.*r8g8b8a8_unorm*
We found that they were setting a descriptorCount of zero, because it
was not handling correctly the differences between Vulkan 1.0 and
Vulkan 1.1.
So let's just assert, just in case it happens again, as that would
make the bugfixing far easier.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8614 >
2021-01-21 17:06:51 +00:00
Arcady Goldmints-Orlov
c57ef25342
v3dv: Fix uninitialized variable warnings
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8570 >
2021-01-21 10:11:50 -05:00
Iago Toral Quiroga
cec2ed7c80
v3dv: fix disabling Early Z for the whole frame
...
The documentation states that if we disable Early Z for the whole
frame in the RCL Tile Rendering Mode packet, then we should not
emit any draw calls with it enabled (which we can do by enabling
it in the CFG_BITS packet).
Since we emit our RCL after recording our draw calls in the BCL
and we were not considering there if any condition for global disable
would be met, it was possible that we end up with an incorrect
configuration when we decide for a global disable in the RCL, which
can cause rendering artifacts. This can be easily observed by simply
forcing the RCL bit to disable early Z in applications that are known
to enable it in CFG_BITS (such as the UE Shooter demo for example).
With this change we keep track of this scenario when we record
draw calls in the BCL and if decide that we need to disable EZ for
the entire job, we make sure we never enable it for any draw calls
in the frame.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589 >
2021-01-21 14:12:00 +01:00
Iago Toral Quiroga
9c97cc37b0
v3dv: enable early Z/S clears
...
This is an optimization that should make Z/S clears faster. To enable
this we can't have any Z/S loads or stores in the job. Also, it seems
that enabling early Z/S clearing is independent of whether early Z/S
testing is enabled.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589 >
2021-01-21 14:12:00 +01:00
Iago Toral Quiroga
f989d4ce1c
v3dv: do not emit full tile buffers clears to handle Z/S clears
...
There was a misunderstanding regarding the scope of some hardware bugs
that led us to think that:
1. The Clear Tile Buffer Z/S bit was broken
2. The Clear Tile Buffer RTs bit would also clear Z/S.
1) is not really true, what happened was that some other bugs for which
we need workarounds anyway would have that effect. 2) was only true
for V3D 4.1, so it doesn't affect v3dv.
This change makes proper use of the Z/S bit instead of falling back to
clearing all tile buffers every time we have a Z/S clear. This also
allows us to do color clears on the tile store (which is faster) rather
than falling back to the clear all RTs bit every time we have a Z/S clear.
v2: rewrite the original comment about the hardwarebug description to
include recent discussions with Broadcom instead of keeping it as
is and amending it with an update note.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589 >
2021-01-21 14:12:00 +01:00
Iago Toral Quiroga
3c19a518c9
v3dv: refactor checks for subpass attachment stores
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589 >
2021-01-21 14:12:00 +01:00
Iago Toral Quiroga
f0ec3d9f6d
v3dv: refactor checks for subpass attachment loading
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589 >
2021-01-21 14:12:00 +01:00
Iago Toral Quiroga
7c5d753634
v3dv: refactor checks for subpass attachment clears
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8589 >
2021-01-21 14:12:00 +01:00
Rhys Perry
dc19fe0e9f
radv,aco: use deref_buffer_array_length
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3993
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8163 >
2021-01-21 11:53:12 +00:00
Rhys Perry
e200ce0996
nir/lower_io: fix array_length lowering if buffer is smaller than offset
...
Matches SPIR-V -> NIR implementation of OpArrayLength.
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/8163 >
2021-01-21 11:53:12 +00:00
Daniel Schürmann
e10779a9f0
radv: don't vectorize shift operations
...
Currently, these cannot be vectorized as in NIR
shift operands are 32bit while for 16bit-vectorization
they need to be 16bit.
No fossildb changes.
Fixes: fcd2ef23e5 ('radv: vectorize 16bit instructions')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8612 >
2021-01-21 11:44:00 +00:00
Erik Faye-Lund
d74b012260
zink: fix vertex-stride wrangling
...
Because Gallium and Vulkan disagree on what kind of state strides is, we
need to wrangle this state a bit, and up until now, we've been simply
fixing this up while binding the vertex-buffers.
But this isn't robust, because the vertex element state might be bound
after the vertex-buffer state was bound. We also need to take
binding-map into account, which we're currently missing as well.
Instead, w need to deal with this at a place where we know what's being
used for both of these. So let's do this during draw instead.
Ideally, we'd also do some dirty-tracking to know if this is needed or
not, but I believe Mike has some patches in this areas lined up, so it
might be easier to wait for those.
Fixes: 8d46e35d16 ("zink: introduce opengl over vulkan")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3661
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4125
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8588 >
2021-01-21 11:14:25 +00:00
Daniel Schürmann
7dcb9a0d8c
aco/optimizer: convert extract_vector with index 0 into parallelcopies if possible
...
Totals from 273 (0.20% of 139391) affected shaders (Navi10):
VGPRs: 11600 -> 11792 (+1.66%)
CodeSize: 1389304 -> 1383152 (-0.44%); split: -0.53%, +0.08%
MaxWaves: 3848 -> 3752 (-2.49%)
Instrs: 240228 -> 239478 (-0.31%); split: -0.37%, +0.06%
Cycles: 20637708 -> 20580024 (-0.28%); split: -0.46%, +0.18%
VMEM: 39164 -> 38831 (-0.85%); split: +0.06%, -0.91%
SMEM: 21743 -> 22204 (+2.12%)
VClause: 4787 -> 4783 (-0.08%)
Copies: 39057 -> 38308 (-1.92%); split: -2.28%, +0.37%
Branches: 6556 -> 6557 (+0.02%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
ebbf5fe716
aco/optimizer: expand subdword vectors with SGPRs on all generations
...
No fossildb changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
96fafcca63
aco: propagate temporaries into PSEUDO instructions if it can take it
...
This patch relaxes copy-propagation for PSEUDO instructions with
subdword Operands / Definitions:
general:
- only propagate VGPR temps if the Definition is VGPR (or on p_as_uniform)
parallelcopy/create_vector/phis:
- size has to be the same
extract_vector/split_vector:
- propagate SGPR temps on GFX9+ or if the Definitions are not subdword
- split_vector: size must not increase
Totals from 282 (0.20% of 140985) affected shaders (Polaris10):
VGPRs: 14520 -> 14408 (-0.77%)
CodeSize: 2693956 -> 2694316 (+0.01%); split: -0.20%, +0.21%
Instrs: 512874 -> 512864 (-0.00%); split: -0.16%, +0.16%
Cycles: 26338860 -> 26320652 (-0.07%); split: -0.36%, +0.29%
VMEM: 49460 -> 49634 (+0.35%); split: +0.47%, -0.12%
SMEM: 10035 -> 10036 (+0.01%)
VClause: 7675 -> 7674 (-0.01%)
Copies: 66012 -> 65943 (-0.10%); split: -1.31%, +1.20%
Branches: 17265 -> 17281 (+0.09%); split: -0.10%, +0.19%
PreVGPRs: 12211 -> 12124 (-0.71%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
21a7bea342
aco/validate: relax subdword restrictions
...
This affects constants/SGPRs on GFX6-8 and
the operand regClass of SDWA instructions.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
77c9629046
aco/validate: ensure that Operand and Definition size matches for parallelcopies
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
8fb66187ec
aco/validate: validate that p_create_vector operands are aligned unless they are subdword operands
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
c0cec3a29b
aco: generalize subdword constant copy lowering
...
This will allow to propagate and emit sub-register constants
on all hardware generations.
Also fixes GFX8 constant emission to not use SDWA.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
856fd4750d
aco/optimizer: don't propagate subdword temps of different size
...
It could happen that due to inconsistent copy-propagation
v1 = p_parallelcopy v2b
instructions were left after optimization on GFX8.
Cc: 20.3
Cc: 21.0
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Daniel Schürmann
cd870d1b6a
aco/optimizer: don't copy-prop logical phis
...
This is dangerous w.r.t. LCSSA-phis.
Totals from 746 (0.54% of 139391) affected shaders (Navi10):
CodeSize: 8592160 -> 8568156 (-0.28%); split: -0.30%, +0.02%
MaxWaves: 5172 -> 5171 (-0.02%); split: +0.02%, -0.04%
Instrs: 1653949 -> 1648489 (-0.33%); split: -0.36%, +0.03%
Cycles: 49474892 -> 49329224 (-0.29%); split: -0.33%, +0.03%
VMEM: 137574 -> 137421 (-0.11%); split: +0.18%, -0.29%
SMEM: 42391 -> 42439 (+0.11%); split: +0.12%, -0.01%
VClause: 26946 -> 26943 (-0.01%)
Copies: 130902 -> 126176 (-3.61%); split: -4.05%, +0.43%
Branches: 54891 -> 54556 (-0.61%); split: -0.64%, +0.03%
PreVGPRs: 53941 -> 53939 (-0.00%)
This has a slight effect on RA due to affinity changes.
Cc: 20.3
Cc: 21.0
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260 >
2021-01-21 11:05:36 +00:00
Samuel Pitoiset
085e2ce3d4
radv: fix a sync issue with geometry shader primitives query on GFX10+
...
When NGG is used, the hw can't know the number of geometry shader
primitives. To fix that, the NGG geometry shader accumulates itself
the number of primitives by using an atomic operation directly to GDS.
Then, begin/query copy the start/stop values from GDS to the
query pool buffer using a PS_DONE event. This was actually wrong
because PS_DONE is completely asynchronous to everything and executed
when the preceding draws finish pixel shaders.
Fix this by using a COPY_DATA packet which is synced with CP. This
fixes random failures on Sienna Cichlid with
dEQP-VK.query_pool.statistics_query.*.geometry_shader_primitives.*.
Cc: <mesa-stable@lists.freedesktop.org >
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/8590 >
2021-01-21 08:15:43 +01:00
Tapani Pälli
4f97b42f3e
mesa: add GL_SR8_EXT, GL_SRG8_EXT for color/srgb format queries
...
This makes glGetInternalformati64v queries work correctly.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4120
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8575 >
2021-01-21 02:45:06 +00:00
Vinson Lee
0da527028b
nv50/ir: Add InsertConstraintsPass constructor.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor for this
class does not initialize targ.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8541 >
2021-01-21 00:50:59 +00:00
Icecream95
0d0536c1a7
pan/decode: Free mapped memory objects on BO unreference
...
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8583 >
2021-01-21 00:32:28 +00:00
Marek Olšák
451fae8258
mesa: simplify terminating display list loops
...
Remove the done variable and return directly from switches.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
64da877742
mesa: simplify handling OPCODE_CONTINUE for display lists
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
8e825dac42
mesa: optimize glCallLists by using loops inside a switch
...
This changes glCallLists from using a switch inside a loop to using loops
inside a switch.
Also fix the comments that didn't tell WHY something was important.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
5edc9b1369
mesa: remove redundant glRect functions for display lists
...
vbo_save implements this better by putting the vertices into a VBO.
The SET functions removed here were overriding it to use the slower
version that uploads the vertices on every call.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
e31d8fa0ad
mesa: remove _mesa_initialize_exec_dispatch from draw.c by autogenerating it
...
The glapi scripts are fully capable of generating this correctly for all
GL APIs if we don't set exec="dynamic".
exec="dynamic" should only be used for glBegin, glEnd, and all functions
that are legal inside Begin/End.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
33ad9e77c5
glthread: add display list support to fix state tracking with display lists
...
The existing display list code is reused to call display lists from the app
thread. The util_queue_fence_wait call waits for the last call that modifies
display lists (such as glEndList and glDeleteLists), which ensures that
accessing display lists from a non-mesa thread is thread safe because
the wait guarantees that display lists are immutable during the asynchronous
display list execution.
Display lists are executed just like normal display lists except that they
call glthread functions instead of the default GL dispatch. Many calls in
display lists are skipped because glthread only tracks a few states.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
14b47614b4
mesa: add _mesa_get_list helper
...
glthread will use it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
fd678bef40
glthread: remove if (COMPAT) conditions from functions that are GL-compat-only
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
df38b99e85
glthread: rename inside_dlist to ListMode for future use
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
d8ad570b3e
glthread: implement glGetIntegerv for states that glthread tracks
...
for viewperf
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
6febe2b880
glthread: track all matrix stack depths
...
This just tracks matrix stack depths in MatrixStackDepth and everything
else here is needed to make it correct.
Matrix stack depths will be returned by glGetIntegerv without synchronizing.
Display lists will be handled by a separate commit.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
0b4be5baaa
glthread: add specialized versions of unmarshal_Draw funcs without user buffers
...
This decreases CPU time spent in the unmarshal_DrawElements function
from 0.44% to 0.26% if no user buffers are present.
Instead of converting all calls to either unmarshal_DrawArraysInstanced-
BaseInstance or unmarshal_DrawElementsInstancedBaseVertexBaseInstance,
which both also conditionally bind uploaded user buffers if needed and
call one of:
- DrawArraysInstancedBaseInstance
- DrawElementsInstancedBaseVertexBaseInstance
- DrawRangeElementsBaseVertex,
add 3 unmarshal draw variants that are specialized version of the above that
never bind uploaded user buffers. This removes all conditionals from
the unmarshal functions for the common case when there are no user buffers.
Unused function enums are used for the various draw variants. For example,
CMD_DrawArrays is used to dispatch DrawArraysInstacedBaseInstance without
user buffers, while CMD_DrawArraysInstacedBaseInstance is used to dispatch
the same with user buffers. glthread isn't flexible enough to do it cleanly.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:35 +00:00
Marek Olšák
8f53b54a3b
glthread: don't sync with NV_half_float vertex attrib functions
...
Set the pointer sizes, so that glthread knows how much data needs to be
copied.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:34 +00:00
Marek Olšák
36740aa1f1
glthread: remove marshal="draw" because it doesn't do much
...
It only checked whether the pointer was indices or indirect, but we can
just determine the same thing manually for each draw call.
Simplify it as follows:
- if a call contains a pointer without count and it's either indirect or
indices, set marshal="async". The marshal_sync attribute still determines
when it syncs.
- if a call doesn't contain any pointer without count, remove the marshal
attribute
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8297 >
2021-01-21 00:12:34 +00:00
Icecream95
a4e8ad9b27
panfrost: Fix the tile size assertion
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7086 >
2021-01-20 23:43:39 +00:00
Icecream95
2e97d7c835
panfrost: Transaction elimination support
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7086 >
2021-01-20 23:43:39 +00:00
Icecream95
7707ccf286
panfrost: Add a debug flag to disable checksumming
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7086 >
2021-01-20 23:43:39 +00:00
Icecream95
fc69c423fd
panfrost: Only checksum resources when it makes sense to
...
To simplify tracking the checksum validity, only checksum 2D
resources.
The GPU cannot do checksumming when there is too much data to be
written out, so limit the number of bytes per pixel to an architecture
specific value.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7086 >
2021-01-20 23:43:39 +00:00
Icecream95
a1bf4be844
panfrost: Add a function to determine if a resource is 2D
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7086 >
2021-01-20 23:43:39 +00:00
Rob Clark
77398a9e41
radeonsi: Use util_writes_stencil() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8598 >
2021-01-20 23:15:47 +00:00
Rob Clark
04f8aa7c1e
r300: Use util_writes_depth_stencil() helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8598 >
2021-01-20 23:15:47 +00:00
Rob Clark
c01aac141a
freedreno/a6xx: Don't early-z if there are stencil writes
...
Fixes a similar stencil related misrendering in a couple "RV AppStudios"
titles.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8598 >
2021-01-20 23:15:47 +00:00
Rob Clark
7277342b5e
gallium/util: Add helpers to determine if z/s is written
...
For drivers that must control various 'early-z'-like state, it is easy
enough to get this wrong. So add helpers so we don't have to duplicate
the logic in each driver.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8598 >
2021-01-20 23:15:47 +00:00
Marek Olšák
bc0508ad38
radeonsi: allow instance_count == 0 on chips that handle it correctly
...
Let's remove this overhead.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
76d6351dab
radeonsi: don't validate inlinable uniforms at draw time
...
Let's trust the state tracker that it sets inlinable uniforms only
when shaders can use them.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
185a2472a4
radeonsi: move variables closer to their use in most draw state functions
...
for lower register pressure, though I haven't measured this.
si_draw_vbo will be handled in a future commit.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
ae5df516f1
radeonsi: clear dirty_atoms and dirty_states only if we entered the emit loop
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
2206840f6c
radeonsi: enable the GS tri strip adj workaround with primitive_restart
...
If a primitive restart index occurs after an even number of triangles,
the workaround works.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
888a45a362
radeonsi: evaluate si_get_vs in si_draw_vbo at compile time
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
c5d3341b6e
radeonsi: inline the last use of si_get_vs_state
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
5f7715083b
radeonsi: evaluate sh_base in si_emit_vs_state at compile time
...
This computes the value at compile time because si_get_user_data_base is
always inlined.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
e8ccb6f0f3
radeonsi: add si_get_user_data_base selecting user data registers
...
This will be used in templated si_draw_vbo in place of sh_base.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
88a02d80de
radeonsi: don't set context_roll for non-gfx9 in templated functions
...
It's not needed by other chips.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
581a96bc44
radeonsi: don't pass pipe_draw_info into si_emit_draw_registers
...
Only two fields are used. It's probably better this way.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Marek Olšák
ac2b4aa08f
radeonsi: unify uploaders on APUs too
...
const_uploader and stream_uploader point to the same uploader.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600 >
2021-01-20 21:53:13 +00:00
Matt Turner
facd34431b
docs/freedreno: Fix a few typos
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8599 >
2021-01-20 21:44:48 +00:00
Jesse Natalie
13b21156e4
nir: Work around MSVC x86 internal compiler error
...
Fixes: 1fd8b466 ("nir,spirv: add sparse image loads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4108
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8581 >
2021-01-20 20:42:48 +00:00
Lionel Landwerlin
28207669d0
anv: Fix stencil layout in render passes
...
We incorrectly utilize the stencil layouts structures even if we
should stick to the depth_stencil ones if the layout includes stencil.
v2: Don't forget stencil only layout (Nanley)
Simplify callers of new helper functions (Nanley)
v3: Store VK_IMAGE_LAYOUT_UNDEFINED when no stencil is available (Nanley)
Use a switch statement (Nanley)
v4: Consider all layouts but depth only to be potential stencil layouts (Lionel)
v5: Refactor helper in vk_image_layout_depth_only() and discard
VkAttachmentDescriptionStencilLayoutKHR in
VkAttachmentDescription2KHR if format is not depth/stencil.
v5: s/LAYOUT_COLOR_ATTACHMENT_OPTIMAL/LAYOUT_DEPTH_ATTACHMENT_OPTIMAL/ (Nanley)
v6: Fix overly harsh assert()
Fixes: c1c346f166 ("anv: implement VK_KHR_separate_depth_stencil_layouts")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4084
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8475 >
2021-01-20 20:36:34 +00:00
Eric Anholt
f79f382c81
nir_to_tgsi: Store directly to TGSI outputs when possible.
...
Saves emitting a MOV at the end of the program to store the output.
softpipe glmark2 -b buffer +9.73451% +/- 3.17924% (n=6)
softpipe glmark2 -b build +5.57621% +/- 1.35074% (n=9)
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8023 >
2021-01-20 19:48:59 +00:00
Eric Anholt
f6e35e5fd0
ci/freedreno: Fix xfail setup for sampler3d_float_vertex.
...
I mised the ",Fail" status, so it just wasn't interpreted. I should make
the runner throw an error instead.
Fixes: 22bf4831b8 ("ci/freedreno: Fix up the xfail/flake handling of a3xx texture functions.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8596 >
2021-01-20 19:02:48 +00:00
Rhys Perry
914c61d6c0
radv,aco: don't use MUBUF for multi-channel loads on GFX8 with robustness2
...
Fixes several dEQP-VK.robustness.robustness2.* tests on GFX8. Generations
other than GFX8 don't fail the tests because bounds-checking is done using
the index (making it per-vertex).
fossil-db (Polaris):
Totals from 1387 (0.99% of 140385) affected shaders:
(no statistics affected)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: 03a0d39366 ("aco: use MUBUF in some situations instead of splitting vertex fetches")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7834 >
2021-01-20 17:57:56 +00:00
Samuel Pitoiset
4eec0fb55c
radv: remove redundant check in depth_view_can_fast_clear()
...
We check below if HTILE is in compressed state, so checking if
the image has HTILE is useless because radv_layout_is_htile_compressed()
will return FALSE if no HTILE.
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/8579 >
2021-01-20 17:18:39 +00:00
Samuel Pitoiset
27d4a15528
radv: remove unnecessary radv_image::tc_compatible_htile
...
Use the surface flags directly instead.
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/8579 >
2021-01-20 17:18:39 +00:00
Samuel Pitoiset
c30f010e8f
radv: remove redundant check in radv_process_depth_stencil()
...
This is already checked in radv_handle_depth_image_transition().
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/8579 >
2021-01-20 17:18:39 +00:00
Rohan Garg
d245d7b6b8
virgl: Cache depth and stencil buffers
...
Expand the list of bind flags to cache depth and stencil
buffers.
Extensive testing shows the following performance improvements:
Game | % difference in FPS
Plague Inc | 7
Portal 2 | 21
Overcooked 2 | 1.2
Hollow Knight | -1.1
Civilization V | 3.8
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8560 >
2021-01-20 17:09:25 +00:00
Rhys Perry
af9977a3d5
aco: add affinity for non-sequential MIMG operands
...
fossil-db (GFX10.3):
Totals from 42008 (30.14% of 139391) affected shaders:
VGPRs: 2139116 -> 2147696 (+0.40%); split: -0.06%, +0.46%
CodeSize: 199109120 -> 198637852 (-0.24%); split: -0.24%, +0.01%
Instrs: 37713901 -> 37714574 (+0.00%); split: -0.02%, +0.03%
Cycles: 1621911328 -> 1621634168 (-0.02%); split: -0.02%, +0.01%
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/8523 >
2021-01-20 16:46:54 +00:00
Rhys Perry
4015b3651a
aco: only require texture coordinates to be in WQM if NSA is used
...
From comment in emit_mimg():
We don't need the bias, sample index, compare value or offset to be
computed in WQM but if the p_create_vector copies the coordinates, then it
needs to be in WQM.
fossil-db (GFX10.3):
Totals from 1778 (1.28% of 139391) affected shaders:
SGPRs: 105080 -> 105072 (-0.01%); split: -0.02%, +0.01%
VGPRs: 96800 -> 96776 (-0.02%); split: -0.07%, +0.05%
CodeSize: 10001120 -> 10001384 (+0.00%); split: -0.04%, +0.04%
MaxWaves: 18164 -> 18163 (-0.01%)
Instrs: 1883750 -> 1883598 (-0.01%); split: -0.06%, +0.05%
Cycles: 34800176 -> 34767840 (-0.09%); split: -0.10%, +0.01%
We don't have a p_create_vector if we use NSA.
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/8523 >
2021-01-20 16:46:54 +00:00
Rhys Perry
c353895c92
aco: use non-sequential addressing
...
fossil-db (GFX10.3):
Totals from 70493 (50.57% of 139391) affected shaders:
SGPRs: 4232624 -> 4231808 (-0.02%); split: -0.09%, +0.07%
VGPRs: 2831772 -> 2764740 (-2.37%); split: -2.53%, +0.17%
CodeSize: 225584412 -> 225048740 (-0.24%); split: -0.44%, +0.21%
MaxWaves: 875319 -> 878837 (+0.40%); split: +0.44%, -0.04%
Instrs: 43157803 -> 42496421 (-1.53%); split: -1.54%, +0.01%
Cycles: 1656380132 -> 1641532056 (-0.90%); split: -0.94%, +0.04%
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/8523 >
2021-01-20 16:46:54 +00:00
Rhys Perry
faf3e9a27f
aco: move VADDR to the end of the operand list
...
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/8523 >
2021-01-20 16:46:54 +00:00
Rhys Perry
cd29210fce
aco: add emit_mimg() helper
...
Some fossil-db noise from slightly different order of instructions.
fossil-db (GFX10.3):
Totals from 73 (0.05% of 139391) affected shaders:
SGPRs: 3424 -> 3440 (+0.47%)
CodeSize: 199076 -> 199064 (-0.01%); split: -0.01%, +0.00%
Instrs: 37303 -> 37300 (-0.01%); split: -0.01%, +0.00%
Cycles: 786328 -> 786316 (-0.00%); split: -0.00%, +0.00%
VMEM: 19448 -> 19454 (+0.03%); split: +0.04%, -0.01%
SMEM: 5241 -> 5305 (+1.22%); split: +1.70%, -0.48%
SClause: 1282 -> 1281 (-0.08%)
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/8523 >
2021-01-20 16:46:54 +00:00
Rhys Perry
9890dabb1b
aco: have emit_wqm() take Builder instead of isel_context
...
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/8523 >
2021-01-20 16:46:54 +00:00
Rhys Perry
489aa8c7cb
aco: fix num_waves on GFX10+
...
There are half the SIMDs per CU and physical_vgprs should be 512 instead
of 256.
fossil-db (GFX10.3):
Totals from 3622 (2.60% of 139391) affected shaders:
VGPRs: 298192 -> 289732 (-2.84%); split: -3.43%, +0.59%
CodeSize: 29443432 -> 29458388 (+0.05%); split: -0.00%, +0.06%
MaxWaves: 21703 -> 23395 (+7.80%); split: +7.84%, -0.05%
Instrs: 5677920 -> 5681438 (+0.06%); split: -0.01%, +0.07%
Cycles: 280715524 -> 280895676 (+0.06%); split: -0.00%, +0.07%
VMEM: 981142 -> 981894 (+0.08%); split: +0.18%, -0.10%
SMEM: 243315 -> 243454 (+0.06%); split: +0.07%, -0.02%
VClause: 88991 -> 89767 (+0.87%); split: -0.02%, +0.89%
SClause: 200660 -> 200659 (-0.00%); split: -0.00%, +0.00%
Copies: 430729 -> 434160 (+0.80%); split: -0.07%, +0.86%
Branches: 158004 -> 158021 (+0.01%); split: -0.01%, +0.02%
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/8523 >
2021-01-20 16:46:54 +00:00
Rhys Perry
12ea0143de
radv: fix max_waves estimation on GFX10.3
...
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/8523 >
2021-01-20 16:46:54 +00:00
Mike Blumenkrantz
924d1ba9eb
zink: enable WSI-faking for RADV too
...
temporary until we get real WSI support
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8284 >
2021-01-20 16:31:47 +00:00
Mike Blumenkrantz
356a381600
zink: add VK_KHR_driver_properties
...
yet another extension that breaks naming conventions for structs/enums,
even if it does so in a very sensible way
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8284 >
2021-01-20 16:31:47 +00:00
Andrii Simiklit
e87b59f687
st/mesa: fix pbo upload/download for arrays of textures with only 1 layer
...
Having only one layer we can put 0 as third texture coordinate
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4115
Fixes: 36097fc7 ("st/pbo: fix pbo uploads without PIPE_CAP_TGSI_VS_LAYER_VIEWPORT and skip gs")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8576 >
2021-01-20 16:02:30 +00:00
Samuel Pitoiset
13f7224dbf
ci: exclude one CTS test that timeout most of the time for RADV CI
...
dEQP is too slow.
Cc: <mesa-stable@lists.freedesktop.org >
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/8587 >
2021-01-20 13:27:10 +00:00
Danylo Piliaiev
fa74389485
turnip: don't emit tess consts if they are not used
...
If tess consts aren't used they don't get included in constlen,
and we risk overrunning consts of the next stage.
Fixes:
dEQP-VK.tessellation.invariance.outer_edge_index_independence.quads_fractional_even_spacing_ccw
dEQP-VK.tessellation.invariance.outer_triangle_set.quads_fractional_odd_spacing
dEQP-VK.tessellation.invariance.primitive_set.isolines_fractional_odd_spacing_ccw
dEQP-VK.tessellation.invariance.primitive_set.quads_fractional_odd_spacing_cw
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4117
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8578 >
2021-01-20 13:10:10 +00:00
Alejandro Piñeiro
212b1516df
v3d/compiler: enable lower_add_sat NIR option
...
We are enabling this option for the Vulkan driver, so it makes sense
to enable it for the OpenGL one.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8582 >
2021-01-20 12:41:52 +00:00
Alejandro Piñeiro
e333692e9d
v3dv/pipeline: enable lower_add_sat NIR option
...
We don't support them by hw, so we would need to get them
lowered. This fix some crashes while using renderdoc with UE4 shooter
demo traces.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8582 >
2021-01-20 12:41:52 +00:00
Gert Wollny
3b27243b01
r600: Enable sb also for NIR
...
Currently, r600/nir doens't have a proper scheduler or optimizer backend,
to be able to make use of this code path without performance regressions,
we enable the sb optimizer also for NIR.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
e20a83eb86
r600/sb: fall back to un-optimized byte code when ra_init fails
...
Some emulated fp64 piglit create code that seems to make the register
allocation with sb worse than the original shader created from NIR, so
fall back to using the un-optimized shader.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
c1785c55f7
r600/sb: fix boundary assert for mem-instruction decoding
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
14fe19e797
r600/sfn: Keep array registers alive for the whole shader
...
This is needed when using sb as a post-optimizer.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
9fa48c0207
r600/sfn: update shader array info
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
7717c1090a
r600/nir: pass array info to r600_shader for sb
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
ff382c6634
r600/sb: Add support for INTERP_X and INTERP_Z ops
...
v2: Fix parsing the 2-slot instructions
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
f57ae1e69c
r600: Add flags to INTERP_X and INTERP_Z two-slot ops
...
v2: use the gap in the enum bit field to add the 2-slot bit
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
198c3acacf
r600/sfn: fix use of b32all/and
...
Fixes: f79b7fcf7c
r600/sfn: use 32 bit bools
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Gert Wollny
4f88668f4a
r600/nir: clone shader before first query to shader key
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563 >
2021-01-20 12:12:07 +00:00
Juan A. Suarez Romero
6d587f754c
v3d: use a compatible supported format for TFU-based blit
...
When trying to blit using the TFU, as we are doing an exact copy with no
conversions, we can choose a supported format that is compatible with the
underlying format's texel size.
This allows to use the TFU to blit formats that are not supported, like
r8ui or r16ui.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8495 >
2021-01-20 08:58:55 +00:00
Kenneth Graunke
07473321a2
Revert "mesa: allow half float textures based on ARB_half_float_pixel"
...
This reverts commit aca67a555c , which
regressed the following Piglit test on i915 (and presumably r200):
piglit/spec/!opengl 1.1/sized-texture-format-channels
Specifically, it begins testing glTexImage2D with format GL_RGBA,
type GL_FLOAT, and internalFormat GL_RGB16F, which leads to the
following error:
Mesa 21.0.0-devel implementation error: unexpected format GL_RGB16F in _mesa_choose_tex_format()
Please report at https://gitlab.freedesktop.org/mesa/mesa/-/issues
sized-texture-format-channels: ../../src/mesa/main/teximage.c:2836: _mesa_choose_texture_format: Assertion `f != MESA_FORMAT_NONE' failed.
i915 and r200 unconditionally support ARB_half_float_pixel, but neither
support RGB16F as an internal format. According to Ian's rationale
in the commit message for 1edca151a0
(which enabled that extension for all drivers):
"This extension only adds data types that can be passed to, for
example, glTexImage2D. It does not add internal formats. Since
you can already pass GL_FLOAT to glTexImage2D this shouldn't pose
any additional issues with those drivers. Note that r200 and i915
already supported this extension, and they don't support
floating-point textures either."
So, commit aca67a55c011 enabled half-float internal formats on hardware
that cannot support them. We should revert the change.
v2: Don't reintroduce the _mesa_is_gles3() condition, as that shouldn't
be necessary (feedback from Erik Faye-Lund).
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8458 >
2021-01-20 01:24:43 +00:00
Kenneth Graunke
9fb5d7acbb
tnl: Reset nr_bos to 0 between map/unmap cycles.
...
_tnl_draw_prims loops over the prims, and for each one, maps the VBOs,
draws, and unmaps them. But it failed to reset nr_bos = 0 between each
loop iteration, which meant that when processing prim[n], the BO list
had all BOs for prior primitives too. Assuming each primitive used the
same VBOs, that means the same VBO would appear in the list multiple
times, and it would try to unmap the same BO multiple times. This
triggered asserts on the second unmap, as it had already been unmapped.
Fixes Piglit's oes_draw_elements_base_vertex-multidrawelements on i915.
Fixes: e99e7aa4c1 ("mesa: switch Draw(Range)Elements(BaseVertex) calls to DrawGallium")
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8522 >
2021-01-20 00:29:04 +00:00
Kenneth Graunke
376c8f750b
tnl: Respect start when converting indices to GLuint
...
Prior to commit e99e7aa4c1 (mesa: switch
Draw(Range)Elements(BaseVertex) calls to DrawGallium), the indices
parameter of glDrawElements (an offset into the VBO) was handled by
setting ib->ptr. With that commit, it instead began binding the
index buffer with offset 0, and adding the offset to draw->start,
which eventually becomes prim->start.
t_draw.c's bind_indices() was trying to convert the relevant section of
the index buffer to GLuints, but was failing to account for start, so
it nabbed the wrong portion of the index buffer.
Fixes: e99e7aa4c1 ("mesa: switch Draw(Range)Elements(BaseVertex) calls to DrawGallium")
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8522 >
2021-01-20 00:29:04 +00:00
Kenneth Graunke
bd6120f562
tnl: Try not to botch index buffer munging when start > 0.
...
Commit 4c751ad67a (vbo/dlist: use a shared
index buffer) caused multiple draws to use the same index buffer, and
began setting the primitive's `start` field to the offset needed to
access the right portion of the index buffer.
Unfortunately, t_rebase_prims completely botches handling this case.
Say for example we had start = 40, min_index = 6, max_index = 11.
The actual indexes in the buffer are ib[40..45]. t_rebase_prims,
however, would allocate an index buffer containing only 6 elements,
and populate them with <ib[0..5] - min_index>. For one, this reads
the wrong source data, leading to garbage index values. For another,
it stores the new index buffer in the wrong spot, so drawing will try
and read elements [40..45] of an array of length 6, and crash.
This patch makes t_rebase_prims allocate a larger index buffer, with
the blank space at the beginning, and try to copy the correct section
of index buffer data over. This only works if `start` is the same for
all primitives, however, so if we detect different ones, we recurse
to rebase and call draw() separately for each different start value.
Fixes: 4c751ad67a ("vbo/dlist: use a shared index buffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4082
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8522 >
2021-01-20 00:29:04 +00:00
Kenneth Graunke
14ae5069da
vbo: Only mark merged line strips as lines when actually converting them
...
We only convert line strips to lines in certain cases, but were flagging
node->merged.prim as GL_LINES even if we simply copied a GL_LINE_STRIP
prim[0] over without modifying it.
Fixes Piglit's lineloop test (which triggers loop -> strip conversion
earlier in this path, then was incorrectly triggering strip -> list
mode modification with no changes to the underlying data).
Fixes: 310991415e ("vbo/dlist: implement primitive merging")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8522 >
2021-01-20 00:29:04 +00:00
Kenneth Graunke
44bdd5225c
vbo: Don't set node->min_index = max_index = indices_offset when merging
...
I'm can't see why this is necessary. There are already new fields
(node->merged.{min,max}_index) for the new values in the merged case.
But in vbo_save_draw.c, in the !draw_using_merged_prim case, we would
try and use the original node...with the now destroyed min/max index.
Fixes some assert failures when running with swtnl and forcing the
non-merged path (though it takes the merged path by default).
Fixes: 4c751ad67a ("vbo/dlist: use a shared index buffer")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8522 >
2021-01-20 00:29:04 +00:00
Vinson Lee
dd72019d03
r600/sfn: Remove StoreMerger unused member b.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8540 >
2021-01-19 15:06:25 -08:00
Eric Anholt
3884307b69
ci/piglit: Upgrade to a newer piglit in our containers.
...
Pulls in test fixes for rasterpos on softpipe and for
simple-barrier-atomics on freedreno. Note that many xfail-vs-xskips end
up changing, because apparently the
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8499 >
2021-01-19 22:06:55 +00:00
Caio Marcelo de Oliveira Filho
77aa86a521
intel/fs: Separate SLM size calculation from encoding
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8486 >
2021-01-19 21:49:04 +00:00
Eric Anholt
9c38cbbb96
mesa/main: Replace the uint format packing code with util/format's.
...
Cuts another 60kb of generated code from Mesa drivers.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8532 >
2021-01-19 20:02:51 +00:00
Eric Anholt
23bb92c4f6
mesa/main: Replace float pack function with util_format_pack_rgba().
...
Less main-specific code when we're pulling in util/ formats anyway. Drops
about 20kb from Mesa drivers.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8532 >
2021-01-19 20:02:51 +00:00
Eric Anholt
f1403d66d4
swrast: Use util_format_write_4/4ub for the scattered pixel writes.
...
This was the only code using the "get a pack-a-pixel function pointer"
generated code, switch it over to using util/format's.
This does mean some more format desc lookups in the loop, but this code is
only accessible from classic driver swrast fallbacks at this point, where
GPU read perf completely dominates the profile anyway.
basically no change to driver size.
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8532 >
2021-01-19 20:02:51 +00:00
Samuel Pitoiset
4c99d6ff54
radv: flush L2 for images affected by the pipe misaligned issue on GFX10+
...
In some rare cases, L2 needs to be flushed if an image is affected
by the pipe misaligned issue. This is roughly based on AMDVLK.
I confirmed that disabling TC-compat HTILE, and respectively DCC,
for the relevant images also fixes the regressions below.
This fixes some regressions introduced with L2 coherency for
dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_* and for
dEQP-VK.renderpass2.suballocation.multisample_resolve.*.
Fixes: 4a783a3c78 ("radv: Use L2 coherency on GFX9+.")
Co-Authored-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
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/8557 >
2021-01-19 19:51:44 +00:00
Samuel Pitoiset
8882abe47e
radv: restore invalidating the vector cache for internal meta operations
...
The driver used to invalidate the vector cache for meta operations
but this has been removed and I think it should be restored to fix
a bunch of regressions on GFX8.
This probably needs to be cleaned up but this is a hotfix.
This fixes a bunch of regressions and flakes on GFX8 like
dEQP-VK.pipeline.multisample.sample_locations_ext.draw.color.samples_4.*.
Fixes: 8f8d72af55 ("radv: Use access helpers for flushing with meta operations.")
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/8573 >
2021-01-19 19:15:39 +00:00
Samuel Pitoiset
c28401ab43
radv: enable TC-compat HTILE for D16S8 on GFX9+
...
I don't know why this wasn't enabled but I think it should be.
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/8562 >
2021-01-19 18:16:35 +00:00
Samuel Pitoiset
cc5b6a0e89
radv: enable TC-compat HTILE with D32S8 and MSAA on GFX9+
...
Only GFX8 has some depth/stencil resolve failures.
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/8562 >
2021-01-19 18:16:35 +00:00
Samuel Pitoiset
60ead6e04b
radv: add a comment explaining the micro tile mode resolve
...
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/8558 >
2021-01-19 18:52:43 +01:00
cheyang
3e13c1f8df
frontend/dri: fix doesn't support RGBA ordering still expose RGBA in config
...
Signed-off-by: cheyang <cheyang@bytedance.com >
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8553 >
2021-01-19 17:10:47 +00:00
Rhys Perry
4c1953a9b8
aco: add test for incorrect convert_to_SDWA() check
...
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/8577 >
2021-01-19 15:38:56 +00:00
Rhys Perry
fcda9b6737
aco: fix convert_to_SDWA() check in add_subdword_definition()
...
v_or_b32 with a v2b definition should use SDWA if is_partial=true.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: 56345b8c61 ("aco: allow reading/writing upper halves/bytes when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8577 >
2021-01-19 15:38:51 +00:00
Mike Blumenkrantz
5ebfb9cd60
zink: process ubos with location values set as long as they're actually ubos
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8514 >
2021-01-19 14:14:59 +00:00
Mike Blumenkrantz
9eec52c67e
zink: tweak xfb slot mapping in ntv
...
ARB_enhanced_layouts allows specifying overlapping variable locations
for xfb outputs, so we need to explode the arrays here to a full 128
components so we can do per-component mapping
sometimes this fails though, as in the case where xfb is just selecting
a single component from a vec but still considering the whole slot, and
so for those cases we just decrement our array index until we get to the
base, which will be within 3 components
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8515 >
2021-01-19 14:06:31 +00:00
Abhishek Kumar
276e3927b5
intel: change urb max shader geometry for CML GT1
...
Below deqp cts failure is seen on CML GT1 only , GT2 all test
passes, changing the max shader geometry to 256 (previous 640)
fixes all failure tests.Similar issue on BDW GT1
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3173
dEQP-GLES31.functional.geometry_shading.layered.
render_with_default_layer_cubemap
render_with_default_layer_3d
render_with_default_layer_2d_array
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4102
Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8550 >
2021-01-19 13:37:35 +00:00
Iago Toral Quiroga
14651edbab
v3dv: use PIPE_TIMEOUT_INFINITE
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8554 >
2021-01-19 11:54:22 +01:00
Iago Toral Quiroga
e122c9f3c8
v3dv: don't wait for idle on occlusion query pool resets
...
Instead, wait for the specific queries being reset to
not be in use by the GPU.
This takes query pool resets in the UE4 Shooter demo from
50-60ms down to 0.5-2ms.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8554 >
2021-01-19 11:54:22 +01:00
Iago Toral Quiroga
15cf2ab642
v3dv: disable early Z writes if Z writes are disabled
...
I saw this while inspecting CL dumps from the UE Shooter demo,
where they disable Z writes for occlusion queries. The hardware
is probably doing this internally, but it doesn't hurt
to do this explicitly and make CL traces consistent with intended
behavior.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8571 >
2021-01-19 10:08:27 +00:00
Pierre-Eric Pelloux-Prayer
41d22eb68e
radeonsi: inhibit clockgating when using SQTT
...
Ported from PAL.
Fixes: 07c1504d1b ("radeonsi: implement SQTT support")
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/8480 >
2021-01-19 09:52:08 +01:00
Iago Toral Quiroga
a46547671b
v3dv: only update uniforms for dirty descriptors if stage has descriptors
...
If we have dirty descriptor set state we have to update our uniform
data to reference the new resources such as addresses for textures
or UBOs. This is known to have a high CPU cost, so we want to limit
this as much as we can.
It is a common rendering pattern in applications to render many objects
using the same pipeline, but modifying the descriptor sets bound to update
textures, UBOs, etc. In this scenario, we would be incurring in unnecessary
uniform stream updates for stages that don't access descriptor sets at all.
This change makes it so we track which shader stages in a pipeline
use descriptor set state and skips updating uniform streams for them
when dirty descriptor set state is the only reason requiring us to
generate new uniform streams for a draw call.
v2: reuse shader stage information from the pipeline set layouts
to track shader stages that use descriptor state.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8555 >
2021-01-19 08:07:57 +00:00
Samuel Pitoiset
c3ac6f7cd7
radv: flush L2 metadata as part of CB/DB flush instead of CS_DONE on GFX9
...
This restores the previous logic because L2 coherency was fully
implemented. It appears that flushing L2 metadata with a CS_DONE
event hangs.
This fixes GPU hangs with Monster Hunter World.
Fixes: 4a783a3c ("radv: Use L2 coherency on GFX9+.")
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/8566 >
2021-01-19 07:47:34 +01:00
Vinson Lee
3e6b37a954
nv50/ir: Initialize DataArray members in constructor.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member array is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member arrayIdx is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member baseAddr is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member arrayLen is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member baseSym is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member vecDim is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member eltSize is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member file is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member regOnly is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7764 >
2021-01-18 18:12:22 -08:00
Bas Nieuwenhuizen
c4ea4e026b
radv: Add a trivial implementation of VK_KHR_deferred_host_operation
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8545 >
2021-01-19 01:25:38 +01:00
Marek Olšák
290dcb26ae
mesa: fix alpha channel of ETC2_SRGB8 decompression for !bgra
...
If software decompression is used for ETC2, the alpha channel
for sRGB8 textures would be set only if BGRA is true.
Fixes: e5604ef78b "st/mesa/i965: Allow decompressing ETC2 to GL_RGBA"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8529 >
2021-01-18 17:18:20 -05:00
Icecream95
5eb39dd95f
pan/bi: Iterate from zero when setting RA interference
...
It is now valid for a node to have an index of zero.
Fixes: 39aa8c4a5a ("pan/bi: Switch to new IR")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Alyssa Rosenzweig
a63960b7f3
pan/bi: Fix printing of node 0
...
Fixes: 1893a3805e ("pan/bi: Generate instruction printer")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Alyssa Rosenzweig
3a16ab84e2
pan/bi: Fix RA of node 0
...
Fixes: 39aa8c4a5a ("pan/bi: Switch to new IR")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Alyssa Rosenzweig
92461a1133
pan/bi: Fix 64-bit SSBO addresses
...
Fixes: 9c7efc4510 ("pan/bi: Add intrinsic emits for builder")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
a8c91f15f0
pan/mdg: Fix spilling when scratch memory is used
...
Add the tls_size from NIR before spilling so that it doesn't alias
with spill slots.
Fixes: 152bc5d15e ("pan/mdg: Support loads and stores to scratch memory")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
6f0eff548c
pan/bi: Implement packing ops between 32-bit vec1 and 16-bit vec2
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
c9c637a707
pan/bi: Implement ihadd/irhadd operations
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
591ccbcf47
pan/bi: Implement saturated add/sub operations
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
7258b4b48d
panfrost: Set TLS for compute jobs
...
Fixes CL programs using scratch storage, such as the Piglit test
i32-stack-array.cl.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
3f7e7495fc
pan/bi: Lower umul_high
...
Also lower uadd_carry, which the mul_high lowering generates.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
2e372d0c3b
pan/bi: Add w0 to the 'h01' swizzle bucket
...
A number of instructions, such as LOAD.i8, use this swizzle in the XML.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
2ec0897b11
pan/mdg: Allow 64-bit src_bitsize for comparison operations
...
Fixes Piglit test attributes.cl.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
b5d6e5049f
pan/mdg: Don't reorder loads/stores past each other
...
Fixes Piglit test local-memory.cl.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
24fcc032ef
pan/mdg: Limit int64 vectorization
...
Previously, nir_opt_vectorize was sometimes vectorizing 64-bit
load_const instructions to vec4.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
f0109e9ac0
panfrost: Assert on sysval overflow
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
24867386ee
panfrost: Add a sysval for local_work_dim
...
Fixes Piglit test get-work-dim.cl.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
f5a35918db
panfrost: Add a sysval for local_group_size
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
76fa57d195
pan/bi: Use pan_nir_lower_64bit_intrin
...
The intrinsics covered by the pass are implemented by reading 32-bit
registers, so there is no reason to keep them 64-bit.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
7c2308769b
panfrost: Use the correct NIR options for OpenCL on Bifrost
...
This is needed so that 64-bit operations are lowered properly.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
c82ab9b94a
pan/bi: Improve unknown intrinsic error
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
56f753f8e2
panfrost: Set bifrost_props for compute shaders
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
c71d4d931e
pan/bi: Implement load_kernel_input
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
f33694552d
pan/bi: Implement load/store intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
58cf95a637
pan/bi: Improve interoperability of the command-line disassembler
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
7c6aa5f49d
pan/bi: Set compute lowering options
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
d267183829
pan/bi: Add some compute intrinsic loads
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
2a7c33bd9d
pan/bi: Handle 64-bit pack and unpack operations
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Icecream95
f5c9a10f33
pan/bi: Lower 64-bit integers
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Alyssa Rosenzweig
f4d2b35ac8
pan/bi: Pipe scratch_size in from NIR
...
Needs to be added to whatever we spill ourselves.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358 >
2021-01-18 20:49:45 +00:00
Ilia Mirkin
087ef91c85
nvc0: index_bias is now only set for indexed draws
...
Fixes: cbdc00ac3a ("nouveau: fix handling draw info")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8539 >
2021-01-18 17:51:58 +00:00
Ilia Mirkin
111c0733ea
cso: set index_bounds_valid = true for arrays draws
...
The min/max indices are valid. Set the bit to true to indicate that.
Fixes glClear (+ clear_with_quads) on nouveau.
Fixes: 72ff53098c (gallium: add pipe_draw_info::index_bounds_valid)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reported-by: Simon Ser <contact@emersion.fr >
Tested-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8546 >
2021-01-18 17:33:52 +00:00
Erik Faye-Lund
333730405d
zink: handle NULL views in zink_set_sampler_views
...
Passing NULL for the views parameter should be the same as passing an
array of NULL, according to the documentation. So let's respect that
detail.
This fixes a crash when using GALLIUM_HUD.
Fixes: 8d46e35d16 ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8564 >
2021-01-18 17:06:12 +00:00
Samuel Iglesias Gonsálvez
b50b28cd33
turnip: disable UBWC on Z24_S8 MSAA images on A630
...
Fixes GPU hangs in dEQP-VK.renderpass2.depth_stencil_resolve.* tests
on A630.
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8381 >
2021-01-18 17:32:21 +01:00
Jason Ekstrand
63a431b81c
anv: Add a trivial implementation of VK_KHR_deferred_host_operation
...
This isn't actually capable of deferring anything; it just trivially
returns success.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7735 >
2021-01-18 10:09:51 -06:00
Bas Nieuwenhuizen
af1aef10f9
radv: Do not use a pipe offset for aliased sparse images.
...
Otherwise the offset might not match between the images that are
aliased.
Fixes: e553ea51e8 ("radv: Create sparse images.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4072
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8535 >
2021-01-18 11:12:45 +00:00
Michel Dänzer
23f2e77710
wsi/x11: Use get_screen_resources_current in wsi_x11_detect_xwayland
...
get_screen_resources may trigger an active probe of display connections
in the X server, which may take significant time and/or result in log
file spam.
Fixes: b5268d532a "wsi/x11: Detect Xwayland"
Reported-by: Sylvain Bertrand <sylvain.bertrand@legeek.net >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8492 >
2021-01-18 10:03:32 +00:00
Marek Olšák
b06f3c52bf
radeonsi: trim the size of si_vgt_param_key and si_vgt_stages_key
...
These are the minimum sizes we can use.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
f1e34f125d
radeonsi: don't use si_get_vs_state in most places
...
It's incorrect because si_get_vs_state returns gs_copy_shader for legacy
GS. It was harmless, but let's use si_get_vs, which is simpler.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
4088b6f293
radeonsi: rearrange condition for streamout workaround on gfx7 and gfx8
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
eb22bd2072
radeonsi: get out of si_emit_vs_state early for blit vertex shaders
...
They don't use current_vs_state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
73709143d2
radeonsi: remove MRT-draw-calls, spill-draw-calls, spill-compute-calls
...
due to limited usefulness and overhead in si_draw_vbo.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
f2a5148701
radeonsi: make sctx->vertex_elements always non-NULL
...
Bind a state with 0 vertex elements there.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
961aa67adf
radeonsi: add a specialized function for CP DMA L2 prefetch
...
This radically simplifies the code to decrease CPU overhead in si_draw_vbo.
The generic CP DMA copy function is too complicated.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
0eca4660a5
radeonsi: make cik_emit_prefetch_L2 templated and move it to si_state_draw.cpp
...
This is a great candidate for a template. There are a lot of conditions
that are already templated in si_draw_vbo.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
c43d00dc91
radeonsi: fix si_num_prims_for_vertices for PIPE_PRIM_POLYGON
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
6682c1603c
radeonsi: don't compute average vertex count in si_draw_vbo
...
It's probably not needed and we also have draw merging on gfx10,
so we should be able to use total_driver_count in theory.
(I may be wrong, but I don't know if having avg_direct_count really
improves anything)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
295106c3e7
radeonsi: don't pass pipe_draw_info into si_emit_derived_tess_state
...
Only one field is used.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
6f74105a34
radeonsi: translate pipe_prim_type only when it changes
...
just sink it into the branch
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
d0d4c4ba1d
radeonsi: don't pass pipe_draw_info into si_emit_ia_multi_vgt_param
...
Only one field is used.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
53f9bb860b
radeonsi: don't pass pipe_draw_info into si_emit_vs_state
...
only one field is used
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
4056e953fe
radeonsi: move emit_cache_flush functions into si_gfx_cs.c
...
This is a better place for them. They are not inlined anyway.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
1ceec51b12
radeonsi: don't clear unaligned bits when unbinding vertex buffers
...
It's initialized to 0, so &= is a no-op.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Marek Olšák
df456312c2
radeonsi: constant buffer cleanups
...
si_set_clip_state unreferenced a NULL pointer = no-op.
si_set_tess_state can just pass the user buffer to si_set_rw_buffer directly.
Then si_upload_const_buffer can be static.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548 >
2021-01-18 01:17:19 +00:00
Mauro Rossi
b53d404aa7
android: freedreno/ir3: Switch over to new encoder/decoder
...
Fixes the following building error:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: isa_assemble
>>> referenced by ir3_shader.c:151 (external/mesa/src/freedreno/ir3/ir3_shader.c:151)
...
ld.lld: error: undefined symbol: isa_decode
>>> referenced by ir3_shader.c:668 (external/mesa/src/freedreno/ir3/ir3_shader.c:668)
Fixes: 5cae4779c ("freedreno/ir3: Switch over to new encoder/decoder")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8538 >
2021-01-17 21:57:05 +01:00
Mauro Rossi
7c0298e2fe
android: freedreno/hw/isa: Add description of ir3 ISA
...
Necessary to build libir3decode and libir3encode for Android
Fixes: 6d94f575d ("freedreno/hw/isa: Add description of ir3 ISA")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Acked-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8538 >
2021-01-17 21:57:05 +01:00
Hoe Hao Cheng
a183ee2ed7
zink: remove excessive checks for loader version
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521 >
2021-01-17 15:24:03 +00:00
Hoe Hao Cheng
c85902d60d
zink/codegen: find promotion version using vulkan registry
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521 >
2021-01-17 15:24:03 +00:00
Hoe Hao Cheng
833b6ab443
zink/codegen: adding/fixing comments and copyright notice
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521 >
2021-01-17 15:24:03 +00:00
Hoe Hao Cheng
a454c562d6
zink/codegen: codegen-ize load_instance_extensions()
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521 >
2021-01-17 15:24:03 +00:00
Hoe Hao Cheng
c0259e5c6e
zink/codegen: enable instance extension unconditionally if promoted
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521 >
2021-01-17 15:24:03 +00:00
Hoe Hao Cheng
463d7dc9c3
zink/codegen: make 'struct' optional in Version
...
while we are at it, fix a typo too
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521 >
2021-01-17 15:24:03 +00:00
Hoe Hao Cheng
d0125fc487
zink/codegen: add some new attributes to Extension
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8521 >
2021-01-17 15:24:03 +00:00
Vinson Lee
32797beaf5
nouveau: Fix typos.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8490 >
2021-01-16 17:09:54 -08:00
Erico Nunes
7c885ad6c0
lima: introduce fs and vs shader cache
...
Some opengl features require shader recompilation to be implemented in
the mali400 and can only be detected at draw time. In some applications,
this could lead to recompiling shaders on every frame which could kill
performance. Introduce a shader cache to prevent this issue.
lima didn't have vertex shader recompilation yet but it is needed to
implement followup features, so include it here too.
Code heavily borrowed from the vc4 shader cache implementation.
One notable difference between the vc4 reference implementation and lima
is that lima still compiles the base shader at state creation time
without deferring it to the next draw (so that it stays compatible with
behaviour expected by unmodified shader-db, for example).
Signed-off-by: Erico Nunes <nunes.erico@gmail.com >
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de >
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8357 >
2021-01-16 22:20:35 +00:00
Alexander Kapshuk
88fc4e26b6
frontends/va/image: Eliminate repetitive code on error paths
...
Removes repetitive code in exit on error paths in the derive image function.
Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com >
Reviewed-by: Thong Thai <thong.thai@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8481 >
2021-01-16 19:23:13 +00:00
Joel Linn
5939a64b15
freedreno/a2xx: add RB perfcounter 1-3
...
Xenos driver reads four perf counters in total.
v2: fix register names
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7666 >
2021-01-16 19:10:22 +00:00
Joel Linn
040ffee71f
freedreno/a2xx: fix/add RBBM perfcounter
...
Xenos driver read two perf counters and their order is also different.
v2: fix typo in register address
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7666 >
2021-01-16 19:10:22 +00:00
Ilia Mirkin
a0f4affcf6
glsl: only expose int64 atomics when extension is enabled
...
This limits the exposure of these functions to when the extension is
available. Prevents crashes otherwise, as the rest of the infrastructure
doesn't necessarily expect these functions when the extension is not
available.
Fixes: 40c1f9883e ("mesa,glsl: add support for GL_NV_shader_atomic_int64")
Signed-off-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/8533 >
2021-01-16 18:21:03 +00:00
Ilia Mirkin
6638b58ccf
nv50/ir: clear dnz flag when converting mul/mad to simpler ops
...
Fixes some assertion failures in the GM107 emitter with the game
'tansei', noticed while debugging gitlab issue 4101.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8534 >
2021-01-16 18:04:22 +00:00
Rob Clark
07a1a341bf
freedreno/a6xx: Add r2d support for GMEM resolves
...
For cases where we need to do an MSAA resolve that BLIT events cannot
handle, fall back to CP_BLIT (r2d)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4085
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8509 >
2021-01-16 17:28:02 +00:00
Bas Nieuwenhuizen
c28469bae1
ac/surface: Fix GFX9 sparse mip info.
...
Used the wrong offset & pitch for gfx9.
Fixes: 50bafb85ec ("ac/surf: Add sparse texture info to radeon_surf.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4072
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8526 >
2021-01-16 14:09:18 +00:00
Ilia Mirkin
55c42b7885
st/mesa: fix broken moves for u2i64 and related ops
...
These ops just put out mov's directly, which screws up the assignment
logic -- it just tries to only process the "last" mov. Don't try to do
the more optimized thing for 64-bit types, where this is just much
trickier.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8463 >
2021-01-16 08:03:14 +00:00
Mike Blumenkrantz
011fea1a90
zink: reduce blendfactor when alpha_to_one is set
...
if alpha is 1, some of these blendfactors can be reduced to simpler ones
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8513 >
2021-01-16 06:48:22 +00:00
Dave Airlie
7b48d5d36e
lavapipe: fix missing piece of VK_KHR_get_physical_device_properties2
...
I missed two parts of the APIs for this, so add them, should fix
crashes in gstreamer vulkan when it tries to load lvp.
Cc: <mesa-stable@lists.freedesktop.org >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3989
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8511 >
2021-01-16 03:23:40 +00:00
Jeremy Huddleston Sequoia
68a785e63f
Fall back on clock_gettime when timespec_get() is unavailable
...
Fixes: e3a8013de8 "util/u_queue: add util_queue_fence_wait_timeout"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4088
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8482 >
2021-01-16 00:14:46 +00:00
Alyssa Rosenzweig
81becaa685
pan/bi: Fix assertion
...
Fixes: bef3fedc81 ("pan/bi: Lower 8bit fragment outputs to 16bit")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reported-by: Coverity
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8489 >
2021-01-15 21:50:32 +00:00
Dave Airlie
ca834d0b2d
device-select-layer: update for vulkan 1.2
...
The vulkan loader doesn't load layers for apps that require a newer
version of vulkan, so this layer didn't get loaded for vulkan 1.2 apps.
I would like to just stick 1.09 in there but it might be worth
validating it works at new version of vulkan I suppose and the major
doesn't revise that often
Fixes: 9bc5b2d169 ("vulkan: add initial device selection layer. (v6)")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8508 >
2021-01-15 20:37:05 +00:00
Jeremy Huddleston Sequoia
766538f83c
darwin: Use the system libunwind
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4094
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8507 >
2021-01-15 20:00:20 +00:00
Jeremy Huddleston Sequoia
08ac7b52e7
util: Fix pointer to integer conversion error when using libunwind
...
../src/util/u_debug_stack.c:97:20: error: incompatible pointer to integer conversion assigning to 'unw_word_t' (aka 'unsigned long') from 'void *' [-Werror,-Wint-conversion]
pip.unwind_info = NULL;
^ ~~~~
1 error generated.
Fixes: 70c272004f "gallium/util: libunwind support"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4094
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8507 >
2021-01-15 20:00:20 +00:00
Jeremy Huddleston Sequoia
00944f80e2
darwin: Use the system libexpat
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4093
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8506 >
2021-01-15 19:37:32 +00:00
Eric Anholt
8e2e637480
util/format: Simplify the generated unpack code.
...
We were declaring the temps, then in the same order declaring
assignments to those temps. The code is more legible (and shorter)
with the assignments moved in place.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
92e8e94ee9
mesa: Move the rest of format_unpack.py out of code generation.
...
There's nothing conditional any more in the template, so just move it
to plain .c code at last.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
85f237634c
mesa: Use a bunch of util functions for Z/S unpacking.
...
Drops another 2k of text.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
322fa3d9dc
util: Give a reasonable answer when unpacking z32unorm from floats.
...
We weren't clamping the float Z value, just multiplying it by a big
float and casting that to int. This makes util/format's z unpacking
match Mesa's.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
6e6228f7f0
mesa: Reuse util_format's unpack functions for pure integer formats.
...
Drops 5k of compiled text from all GL drivers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
696b552435
mesa: Reuse util_format's unpack_8unorm.
...
Drops ~8k of compiled text from all GL drivers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
b938b488f6
util: Fix rounding of unpack_unorm8 from small unorm formats.
...
The code was doing the bit-shift trick, but not accounting for the
rounding necessary which the Mesa unpack code was previously doing.
Using the helpers prevents a regression in
KHR-GL46.copy_image.smoke_test on iris as we consolidate the
pack/unpack code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
0565270380
util: Fix UBSan failure on _mesa_unorm_to_unorm.
...
It complains about shifting 1<<31 being undefined, so make it a 1u.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
8d9826f014
util: Move most of src/mesa/main/format_utils.h to util/format/
...
This is a set of very nice, complete helpers for moving around bits in
various formats, and we want to retain its behavior when deduplicating
Mesa's format pack/unpack and gallium's.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
c5033f7c5e
mesa: Make _mesa_unpack_rgba_block() use the u_format pack/unpack.
...
This moves it to non-generated code, since there wasn't any codegen
anyway.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
13ae72aaae
mesa: Replace the float[4] unpack code with util/format's.
...
The gallium drivers lose 10-15k of binary by not having this duplicated
unpack code, but classic i965 gains 215k of binary by pulling in
u_format's pack/unpack code. The cost to classic will go down as we drop
more of the duplicated code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
83f97cd0be
mesa: Drop incorrect statement about Z unpack behavior.
...
We pass z32f pixels through without clamping, as one would expect.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
d938c28c31
mesa: Add some little unit tests showing format unpack behavior.
...
I'm about to refactor pack/unpack code, and it would be nice to
document what it does as I change it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
e5e75b714d
util/format: Fix pack/unpack of A1R5G5B5_UINT.
...
Avoids regressing KHR-GL33.packed_pixels.pbo_rectangle.* when
transitioning from mesa/main pack/unpack codegen to util/format's.
Fixes: b28eb044cd ("gallium: Add equivalents of packed MESA_FORMAT_*UINT formats.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Rob Clark
bfe5ac89b2
freedreno/isa: Fix branch/jump offset encoding
...
When cross compiling with clang, `1ul` would end up 32b instead of 64b,
resulting in 32b fields (like branch/jump offsets) being encoded as
zero. Which results in infinite loops.
Fixes: e7630ec278 ("freedreno/hw: Add isaspec mechanism for documenting/defining an ISA")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8528 >
2021-01-15 17:36:30 +00:00
Mike Blumenkrantz
c27347b2e1
zink: enable PIPE_CAP_CLEAR_TEXTURE
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz
622f8f6ed5
zink: add a pipe_context::clear_texture hook
...
there's a lot going on here, but the gist of it is:
* if we're not in a renderpass, use the no_rp clear helpers
* if we're in a renderpass, use our lord and savior u_blitter with a temporary
surface that we create just for the blit
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz
e100746a73
zink: break out some of the u_blitter setup into util function
...
we'll be using this for more than just zink_blit, so we can reuse some code
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz
526db0fe82
zink: break out color/zs no_rp clear into separate functions
...
make more code more reusable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz
5bd0d7c62f
zink: break out scissor region testing for clear functions
...
it'll be handy to be able to reuse this
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz
a131d06f17
zink: handle clears with scissor regions
...
this just sets the info struct members as needed
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz
196794264f
zink: start to refactor clearing
...
we currently only handle clears inside renderpasses, but it's also possible
to perform clears outside of renderpasses, so we can break this logic up a bit
to open the door to handling the non-rp case
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz
cf40a087f3
zink: move zink_clear to zink_clear.c
...
we're going to have a bunch of clear code, so having it all in a concise
place that's consistent with other gallium drivers is helpful
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512 >
2021-01-15 16:38:04 +00:00
Lionel Landwerlin
9a54aa131e
intel/perf: move gt_frequency to results
...
We want to unify things a bit between GL & Vulkan. So store those
values in the results rather than just in the GL query code.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525 >
2021-01-15 13:26:23 +02:00
Lionel Landwerlin
b7032d6776
intel/perf: link queries back to the gen_perf_config object
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525 >
2021-01-15 13:26:23 +02:00
Lionel Landwerlin
e79f112e4f
intel/perf: add definition for generic perf counters
...
Those are not part of the OA report but will be used in upcoming
counters.
v2: Rename counter defines (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525 >
2021-01-15 13:26:23 +02:00
Lionel Landwerlin
bd7df91372
intel/perf: restructure i915 perf version checks
...
Trying to make things more readable.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525 >
2021-01-15 13:26:23 +02:00
Lionel Landwerlin
d8154c4006
intel/mi_builder: fix self modifying batches
...
So far we only write a maximum of 4 dwords further into the batch and
it seems just going over the CS prefetch was enough.
Turns out writing more dwords can delay the writes and we start
prefetching stuff that hasn't landed in memory yet.
This fixes the issue by stalling the CS to ensure the writes have
landed before we go over the prefetch.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 796fccce63 ("intel/mi-builder: add framework for self modifying batches")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525 >
2021-01-15 13:26:23 +02:00
Lionel Landwerlin
359312ae01
intel/mi_builder: optimize 64bit immediate register loads & memory stores
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525 >
2021-01-15 13:26:23 +02:00
Lionel Landwerlin
dbeca67a1d
anv: don't disable KHR_performance_query in debug mode
...
This is useful to verify that queries are built properly and avoiding
to deal with i915-perf (typically under simulation).
v2: Remove likely() (Marcin)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525 >
2021-01-15 13:26:22 +02:00
Juan A. Suarez Romero
08b16cfe0b
v3d: fix dest offset in TFU setup
...
It is using the source level instead of the destiny level (base_level)
to compute the dest offset.
This fixes `framebuffer-blit-levels draw rgba -auto -fbo` piglit test.
Fixes: 976ea90bdc ("v3d: Add support for using the TFU to do some blits.")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8491 >
2021-01-15 10:31:14 +00:00
Danylo Piliaiev
5e2cee57c5
freedreno/ir3/parser: add cat7 support
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8420 >
2021-01-15 10:08:38 +00:00
Marek Olšák
f8fe2ca600
st/mesa: optimize binding and unbinding shader images
...
- use local variable num_images
- only unbind the number of shader images that we have bound
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:37:50 -05:00
Marek Olšák
8436d9c594
st/mesa: unbind sampler views, images, and vertex buffers after meta ops
...
v2: use a null array to unbind sampler views
Reviewed-by: Eric Anholt <eric@anholt.net > (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:36:45 -05:00
Marek Olšák
211ec4226b
cso_context: remove ability to restore VBs, const bufs, sampler views, images
...
This is meant to decrease CPU overhead and reduce the use of cso_context when
better solutions are possible.
These functions are removed. Gallium frontends should just use pipe_context:
- cso_set_sampler_views
- cso_set_shader_images
- cso_set_constant_buffer*
Additionally, vertex buffers are passed through cso_context but they are not
saved there. The only remaining role of cso_context with regard to vertex
buffers is to decide whether to go through u_vbuf or skip it. u_vbuf also
can't save and restore vertex buffers anymore.
This is how the states are restored for meta ops:
- in st/mesa, set st->dirty |= flags to re-bind whatever state has been
touched
- outside of st/mesa, there is new interface st_context_iface::invalidate_-
_state that external modules can use to essentially set st->dirty through
it (like HUD)
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
fab62bb518
st/mesa: replace st->pipe with pipe in a few places
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
4c52aba41e
st/mesa: don't use cso_context to set const bufs, sampler views and images
...
These cso_context functions will be removed and they are no longer needed
by st/mesa. They also cause CPU overhead because they save states.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
d107eef04f
st/mesa: don't use cso_context to restore VBs, etc. for PBO glTexSubImage
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
7c7a6e05f4
st/mesa: don't use cso_context to restore VBs, etc. for PBO glReadPixels
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
78c0dc2f56
st/mesa: don't use cso_context to restore VBs, sampler views for glDrawTex*OES
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
82a388dc2d
st/mesa: don't use cso_context to restore VBs, sampler views for glDrawPixels
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
f2141d3a9d
st/mesa: don't use cso_context to restore VBs for glClear
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
cde98f3e0e
st/mesa: don't use cso_context to restore VBs, sampler views for glBitmap
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
98e8dc1db8
gallium/pp: don't use cso_context to restore VBs, constbuf 0 and sampler views
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
2813688f8d
gallium/hud: don't use cso_context to restore VBs, constbuf 0 and sampler views
...
These cso_context capabilities will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
a93ca3be01
gallium/api: add state invalidate interface as alternative to cso_save/restore
...
Some cso_context save/restore capabilities will be removed to decrease
CPU overhead. This is the alternative solution that e.g. the HUD will use.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
7afa7cb4b4
gallium/tests: stop using cso_set_sampler_views
...
It will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
2a0195f4b9
st/xa: stop using cso_set_sampler_views
...
It will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Marek Olšák
fc78ecd379
st/nine: stop using cso_set_sampler_views
...
It will be removed.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180 >
2021-01-15 04:01:12 -05:00
Samuel Pitoiset
95c5675180
ci: mark some sparse CTS as expected failures on RAVEN
...
Same as Vega10.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8518 >
2021-01-15 07:28:02 +00:00
Mauro Rossi
4bc9f7d53f
android: r600/sfn: add sfn_nir_lower_64bit.cpp to Makefile.sources
...
Fixes the following building errors:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: r600::r600_nir_split_64bit_io(nir_shader*)
>>> referenced by sfn_nir.cpp:981 (external/mesa/src/gallium/drivers/r600/sfn/sfn_nir.cpp:981)
...
ld.lld: error: undefined symbol: r600::r600_nir_64_to_vec2(nir_shader*)
>>> referenced by sfn_nir.cpp:1010 (external/mesa/src/gallium/drivers/r600/sfn/sfn_nir.cpp:1010)
...
ld.lld: error: undefined symbol: r600::r600_merge_vec2_stores(nir_shader*)
>>> referenced by sfn_nir.cpp:1015 (external/mesa/src/gallium/drivers/r600/sfn/sfn_nir.cpp:1015)
Fixes: 165fb5117b ("r600/sfn: add lowering passes to get 64 bit ops lowered to 32 bit vec2")
Cc: 21.0 <mesa-stable>
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8505 >
2021-01-15 07:21:05 +00:00
Samuel Pitoiset
c6849f9687
radv: do not invalidate the L2 metadata cache on compute queues
...
The flush VA space was only allocated for command buffers on the
graphics queue. Also, the ZPASS_DONE event should never be emitted
on compute queues because it hangs.
Invalidating the L2 metadata cache is only required for coherency
between the RBs and L2, so only on the graphics queue.
The L2 cache is invalidated at beginning of any IBs and that should
also invalidate the L2 metadata cache for compute anyways.
Fixes: 4a783a3c ("radv: Use L2 coherency on GFX9+.")
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/8494 >
2021-01-15 07:36:11 +01:00
Eric Anholt
953067ef5a
ci/freedreno: Remove some long-unseen a6xx known flakes.
...
We haven't seen any of these since June.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510 >
2021-01-15 03:30:40 +00:00
Eric Anholt
eab2bb4691
ci/freedreno: Drop skip list stuff from a5xx flakes.
...
I clearly copied the wrong file when setting this up.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510 >
2021-01-15 03:30:40 +00:00
Eric Anholt
13be54ee08
ci/freedreno: Drop some long-unseen a5xx flakes.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510 >
2021-01-15 03:30:40 +00:00
Eric Anholt
4ba6f4a053
ci/freedreno: Remove a bunch of stale flakes from a3xx.
...
I haven't seen these in the CI channel in many months.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510 >
2021-01-15 03:30:40 +00:00
Eric Anholt
22bf4831b8
ci/freedreno: Fix up the xfail/flake handling of a3xx texture functions.
...
There's only one that's been unstable for the last couple months, and it's
almost always a fail, so just mark that one's state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510 >
2021-01-15 03:30:40 +00:00
Eric Anholt
783f726ea2
ci/freedreno: Mark some a5xx separate_shader tests as xfails.
...
These almost always fail for us, so we get flake complaints on basically
every job.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510 >
2021-01-15 03:30:40 +00:00
Eric Anholt
fea6446b30
gallium/ntt: Avoid referencing undefined channels of system values.
...
Fixes failure to compile the shader on the host with gl_NumWorkGroups (for
example) on virgl.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488 >
2021-01-14 15:59:22 -08:00
Eric Anholt
37363ef663
gallium/ntt: Add support for store_per_vertex_output.
...
Needed by virgl and r600 to use NTT.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488 >
2021-01-14 15:59:19 -08:00
Eric Anholt
97d5bc7de3
gallium/ntt: Don't vectorize IBFE/UBFE/BFI.
...
Since our source language only allows scalar offset/bits arguments,
virglrenderer only handled scalar values too. Just refuse to vectorize
these to prevent breakage.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488 >
2021-01-14 15:59:17 -08:00
Eric Anholt
942ee6a547
mesa/st: Dump nir-to-tgsi output when ST_DEBUG=tgsi or nir is set.
...
Suggested by Gert Wollny, and oh how I've wanted this.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488 >
2021-01-14 15:59:10 -08:00
Eric Anholt
45048f4829
mesa/st: Lower shader images before handing off to NIR-to-TGSI.
...
Otherwise you'll just throw unknown intrinsic errors on drivers ignorant
of this NIR option.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488 >
2021-01-14 15:59:08 -08:00
Eric Anholt
500dfc05da
mesa/st: Make a single helper for the NIR-to-TGSI transfer.
...
The common path means that we get NIR IR dumping on builtin shaders, too.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488 >
2021-01-14 15:59:04 -08:00
Rob Clark
f70c50b643
frontend/dri: Expose RGB[AX]_SRGB as well
...
platform_android prefers RGB[AX] over BGR[AX] to avoid buggyness with
older android versions. But we need to include the corresponding SRGB
formats as well.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2888
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8452 >
2021-01-14 23:04:53 +00:00
Mike Blumenkrantz
3d88e65e88
zink: decouple renderpass from framebuffer state
...
a framebuffer is based on the surfaces attached to it
a renderpass is based on the operations being performed
a zink_framebuffer object doesn't necessarily need to be changed
if the renderpass changes, as this might just indicate that a clear operation
is being used instead of a load, so we can cache the corresponding vk objects
into the zink_framebuffer based on the renderpass ops being used to (eventually)
reduce fb object thrashing by doing more incremental updates
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz
49bb791991
zink: use 'fb' variable name for zink_framebuffer objects in zink_framebuffer.c
...
let's be a bit consistent and intuitive
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz
301de75b25
zink: rename param in zink_create_framebuffer
...
this is consistent with other state naming
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz
b4da9f42e5
zink: ralloc zink_framebuffer structs
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz
c6741f52bd
zink: remove renderpass refcounting
...
this is useless because we never destroy renderpasses during the lifetime
of a process and don't want to do so
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz
b2e5dadd22
zink: add batch flag for checking renderpass state
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz
448c85acfc
zink: rework framebuffer state
...
we don't want to actually be tracking any null surfaces, so instead use
the vk object for this purpose
also store the fb state onto the fb object so we have this info available
at all times
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227 >
2021-01-14 22:11:42 +00:00
Danylo Piliaiev
39a2da738d
ir3: add debug option to override shader assembly
...
IR3_SHADER_DEBUG=vs,tcs,tes... now also prints shader's sha1.
When there is a file named %sha1%.asm in IR3_SHADER_OVERRIDE_PATH
directory - ir3 assembly from file would be parsed, assembled, and
will override the shader with corresponding sha1 hash.
Parsing failure is considered unrecoverable error.
Upon successful override shader's assembly is printed with:
"Native code (overridden) for unnamed ..."
This debug option allows easier testing of small changes in
assembly without modifying the compiler or using computerator.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8388 >
2021-01-14 21:51:16 +00:00
Mike Blumenkrantz
64f939020d
zink: only emit streamout targets during draw if we have them
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8503 >
2021-01-14 20:37:24 +00:00
Marek Olšák
39c415d5fd
mesa: always set valid index bounds for non-indexed draws for classic drivers
...
This should fix crashing piglit tests on the i915 classic driver.
Fixes: 2358da81d2 - mesa: switch (Multi)DrawArrays to DrawGallium
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8453 >
2021-01-14 15:10:02 -05:00
Jordan Justen
fc1bd69bbd
iris: Fix android build due to missing link to libmesa_iris_gen125
...
Reported-by: Yugang Fan
Fixes: cd3251d6ba ("intel/iris: Build gen 12.5")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8426 >
2021-01-14 11:51:29 -08:00
Danylo Piliaiev
cea4d85093
turnip: make GS use correct varyings size from previous stage
...
Fixes:
dEQP-VK.tessellation.invariance.primitive_set.triangles_fractional_even_spacing_ccw
dEQP-VK.tessellation.invariance.outer_edge_division.triangles_fractional_even_spacing
dEQP-VK.tessellation.invariance.outer_edge_symmetry.triangles_fractional_odd_spacing_cw
dEQP-VK.tessellation.invariance.outer_edge_symmetry.quads_fractional_odd_spacing_ccw
dEQP-VK.tessellation.invariance.outer_edge_symmetry.isolines_equal_spacing_cw
dEQP-VK.tessellation.invariance.outer_edge_index_independence.triangles_equal_spacing_ccw
dEQP-VK.tessellation.invariance.outer_edge_index_independence.triangles_fractional_even_spacing_cw
dEQP-VK.tessellation.invariance.inner_triangle_set.triangles_equal_spacing
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8497 >
2021-01-14 19:06:07 +00:00
Yevhenii Kolesnikov
0c08a66ce5
iris: only set point sprite overrides if actually using points
...
Fixes black screen in some FNA games.
Cc: <mesa-stable@lists.freedesktop.org >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3431
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7218 >
2021-01-14 18:36:15 +00:00
Mike Blumenkrantz
322a3d4fb0
zink: partially enable SSBO pipe cap
...
this enables atomic counters
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
2bfa998960
zink: add more usage bits for buffer types
...
these things can be anything they want to be when they grow up
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
e79d905f5a
zink: flag ssbo buffer resources as having pending writes on batch
...
ssbos are the only descriptor type we support (so far) that allows writes
during the draw, so we have to ensure that we set the right flag on the batch
reference to handle sync if the buffer is later read from
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
d0d1888af0
zink: split UBOs and samplers into 'read' batch references during draw
...
we have the technology, so now we can just flag these resources as being
read from instead of also being written to, freeing them up for concurrent reads
without requiring fencing
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
fa321e0cc4
zink: start supporting atomic shader ops
...
this handles atomic_add, which is what atomic counters use
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
400c7743f6
zink: modify ubo loading in ntv to work for ssbos
...
if ssbo variables are declared using the same structure as ubos, then
the mechanics here are identical, and we can just add a couple extra lines
to handle the atomic ops and different array usage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
3dd5500f7b
zink: emit ssbo variables in ntv
...
we're structuring these the same as ubos so we can reuse the same load
function later
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
6e22f52ba1
zink: hook up ssbo shader bindings
...
this is just the struct zink_shader binding point stuff, but nothing is
using it yet
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
f5ab1a1f00
zink: add set_shader_buffers pipe_context method
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
2fa1cf99b9
zink: add util function for emitting ntv atomic ops
...
these all need specific memory params, but otherwise they're the same
as normal ops, so we can just make a helper function here to add in the memory
params
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
621fb6a72a
zink: add spirv builder function for runtime array type
...
we'll need this for ssbos
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8330 >
2021-01-14 18:13:28 +00:00
Mike Blumenkrantz
652e51e1f3
nir/lower_uniforms_to_ubo: set explicit_binding on uniform_0
...
this variable is always bound to buffer index 0, so the binding info
here is actually useful
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7935 >
2021-01-14 17:29:09 +00:00
Mike Blumenkrantz
a5bd2b95ef
zink: optimize renderpass hash table
...
only the existing render targets need to be used for table entries
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8487 >
2021-01-14 17:20:03 +00:00
Mike Blumenkrantz
184bbef33d
util/set: split off create() into an init() function
...
this brings parity with the matching hash_table api
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Mike Blumenkrantz
491e7decad
util/set: add the found param to search_or_add
...
this brings parity with the internal api
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Mike Blumenkrantz
5f3f128088
util/set: optimize rehash for empty table and no-func clears
...
if the table is filled with deleted entries, we don't need to rzalloc+free an identical
block of memory for the table, we can just memset the existing one
the same applies to table clears without a function passed in that the table
doesn't need to be iterated and can just be memset
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Mike Blumenkrantz
41042f7fa2
util/hash_table: optimize rehash for empty table and no-func clears
...
if the table is filled with deleted entries, we don't need to rzalloc+free an identical
block of memory for the table, we can just memset the existing one
the same applies to table clears without a function passed in that the table
doesn't need to be iterated and can just be memset
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Pierre-Eric Pelloux-Prayer
17f8e56c96
radeonsi: invalidate compute sgprs in si_rebind_buffer
...
If we don't tag compute sgpr as dirty they will point to the
ol buffer location.
This fixes arb_compute_shader-dlist with mcbp enabled.
Fixes: 85a6bcca61 ("radeonsi: pass at most 3 images and/or shader buffers via user SGPRs for compute")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8433 >
2021-01-14 10:33:10 +01:00
Pierre-Eric Pelloux-Prayer
c4b7a0d61d
ac: add ifdef __cplusplus guard to header
...
ac_shadowed_regs.h can be included from si_state_draw.cpp so this commit
adds the needed guards.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8433 >
2021-01-14 10:33:10 +01:00
Michel Dänzer
b83d0b2f5d
ci: Use meson test directly instead of ninja test
...
The former allows specifying how many processes to spawn for tests. The
latter seems to spawn (up to) as many test processes as there are CPU
cores.
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8451 >
2021-01-14 08:22:30 +00:00
Michel Dänzer
5eb9c6203c
ci: Remove .gitlab-ci/meson-build.bat
...
Unused since 07885cbcdb "CI: Add native Windows VS2019 build"
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8451 >
2021-01-14 08:22:30 +00:00
Lionel Landwerlin
d4b4d69d4d
anv: add transfer usage for color/depth/stencil attachments
...
We sometimes use anv_layout_to_aux_state() to compute the aux state of
an image during the resolve operations at the end of a render
(sub)pass.
If we're dealing with a multisampled image that is created without a
transfer usage, our internal code might trigger a resolve using the
transfer layout (see genX_cmd_buffer.c:cmd_buffer_end_subpass), for
which the image doesn't the usage bit. The current code tries to AND
the 2 usages which won't have any bit in common, thus skipping all
checks below.
v2: Add the transfer usages depending on attachment usage (Lionel)
v3: Limit to samples > 1 (Jason) && DEPTH_STENCIL_ATTACHMENT_BIT (Lionel)
v4: Add transfer usage at image creation (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 54b525caf0 ("anv: Rework anv_layout_to_aux_state")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4037
Reviewed-by: Reviewed-by: Tapani Pälli <tapani.palli@intel.com > (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8307 >
2021-01-14 09:51:31 +02:00
Danylo Piliaiev
ad098553ee
turnip/ir3: handle image load/stores produced by AtomicLoad/Store
...
SpvOpAtomicLoad and SpvOpAtomicStore are translated into
nir_intrinsic_image_deref_store/load instead of some separate
atomic intrinsics, however they don't have src or dest type
specified. Turnip doesn't support shaderImageFloat32Atomics
so type is just integer.
Fixes:
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.image.guard_local.image.frag
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.buffer.guard_local.image.comp
dEQP-VK.memory_model.write_after_read.core11.u32.coherent.fence_fence.atomicwrite.device.payload_local.buffer.guard_local.image.comp
dEQP-VK.memory_model.write_after_read.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.image.guard_local.image.comp
dEQP-VK.memory_model.write_after_read.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_nonlocal.workgroup.guard_local.image.comp
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8476 >
2021-01-14 05:43:56 +00:00
Witold Baryluk
9c54928f77
lavapipe: Defer lavapipe warning to CreateDevice
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4055
Fixes: b38879f8c5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8377 >
2021-01-14 01:41:22 +00:00
Vinson Lee
aa3dfcd803
panfrost: Fix typos.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8400 >
2021-01-14 01:17:55 +00:00
Eric Anholt
179e549995
gallium/tgsi: garbage collect unused TGSI_UTIL_SIGN_MODE.
...
Noticed while git grepping for abs/neg stuff.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8369 >
2021-01-13 22:52:10 +00:00
Eric Anholt
f44212067e
gallium/tgsi: Rewrite the docs on source modifiers.
...
Clarify what the rules are, and warn about the exceptions.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8369 >
2021-01-13 22:52:10 +00:00
Eric Anholt
1fc79592b7
gallium/tgsi: Remove support for f64 src modifiers.
...
The tgsi.rst was not very clear but didn't indicate that they were
supported, and llvmpipe only supported double abs and not negate.
glsl_to_tgsi never generated them, and neither did the new nir_to_tgsi, so
just garbage collect it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8369 >
2021-01-13 22:52:10 +00:00
Eric Anholt
9a2cbe02ed
gallium/tgsi: Assert that we don't see integer abs modifiers.
...
tgsi.rst says it's not supported, and llvmpipe, r600, and virgl don't
support it. Make sure nobody else introduces them like I did while
testing only on softpipe.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8369 >
2021-01-13 22:52:10 +00:00
Eric Anholt
1ff2c01741
gallium/ntt: Stop lowering integer source mods.
...
While tgsi_exec.c (softpipe) implemented 32b integer src mods, the
tgsi.rst documentation says only 32b negate is supported and not abs.
llvmpipe implemented 32 and 64 negate but not abs, virgl implemented
negate incorrectly, and r600 apparently doesn't do any integer src mods.
glsl_to_tgsi has apparently never generated integer src mods.
Given that r600 can't do any integer src mods, just stop trying to
generate them for TGSI.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8369 >
2021-01-13 22:52:10 +00:00
Eric Anholt
ecaa7c3e39
gallium/ttn: Add support for TGSI_OPCODE_I64NEG/ABS.
...
Found when converting AMD's built-in TGSI shaders to not using 64-bit src
mods.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8369 >
2021-01-13 22:52:10 +00:00
Ilia Mirkin
8c7526afd2
nv50,nvc0: explicitly list recently-added caps
...
Some of these should be implemented, but that can be done in a later
change.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8461 >
2021-01-13 17:19:32 -05:00
Ilia Mirkin
be7e12d81b
nv50/ir: ignore FS_BLEND_EQUATION_ADVANCED
...
It's unsupported, but gets set unconditionally by the state tracker,
even when fbfetch is to be used.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8461 >
2021-01-13 17:19:19 -05:00
Mike Blumenkrantz
9d651d2a0f
zink: clamp sampler+samplerview limits
...
* struct shader_info provides a 32bit mask for textures_used
* samplers and samplerviews are a 1:1 mapping for shader descriptors
* also according to spec this is always 32 per stage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8457 >
2021-01-13 21:53:56 +00:00
Jason Ekstrand
f4902bb189
intel/genxml,anv,iris: Drop the legacy compute path from gen125.xml
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:28 -08:00
Jordan Justen
32857a6350
iris: Add support for COMPUTE_WALKER
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:28 -08:00
Jason Ekstrand
8f85e68dea
anv: Enable push constants on gen12-hp
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:28 -08:00
Jason Ekstrand
369eab9420
intel/fs: Emit code for Gen12-HP indirect compute data
...
Reworks:
* Jordan: Apply to gen > 12
* Jordan: Adjust comment about loading constants
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:28 -08:00
Jason Ekstrand
4077ca1cc8
anv: Add a general state pool
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:28 -08:00
Jordan Justen
a6f8d59142
anv: Use COMPUTE_WALKER for gen12-hp
...
Rework: Rafael Antognolli, Jason Ekstrand
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:28 -08:00
Jordan Justen
91fe96cfbe
anv: Don't use MEDIA_INTERFACE_DESCRIPTOR_LOAD for gen12-hp
...
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:27 -08:00
Jordan Justen
435b272241
anv: Emit CFE_STATE for gen12-hp
...
Rework:
* make scratch TODO. (Jason)
* emit_compute_cs_state => emit_compute_state. (Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:27 -08:00
Jason Ekstrand
b4ffbf1521
intel/fs: Allow compute dispatch without a pushed subgroup ID on Gen12-HP
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:27 -08:00
Jordan Justen
9294193098
intel/compiler: Disable push constants on gen12-hp
...
We currently don't use push constants with the COMPUTE_WALKER command.
Make all uniforms to be pull constants.
The local group id previously was a push constant, but is now
available in R0.2[7:0].
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:27 -08:00
Jason Ekstrand
b7c1ad00fc
intel/tools: Decode COMPUTE_WALKER
...
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:27 -08:00
Jordan Justen
cdc9e22a3a
intel/genxml/gen125: Add CFE_STATE and COMPUTE_WALKER
...
Reworks:
* Jason: Captalize COMPUTE_WALKER::BTD mode
* Jason: Make COMPUTE_WALKER::InlineData an array
* Jason: Remove stale fields, uint=>bool, add missing enum values.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342 >
2021-01-13 13:10:27 -08:00
Dylan Baker
9149d71bb6
docs: update calendar for 21.0.0-rc1
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8478 >
2021-01-13 20:25:25 +00:00
Dylan Baker
68b1e7b234
docs: update calendar and link releases notes for 20.3.3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8478 >
2021-01-13 20:25:25 +00:00
Dylan Baker
60ffde5994
docs: Add sha256sum for 20.3.3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8478 >
2021-01-13 20:25:25 +00:00
Dylan Baker
1a20041361
docs: add release notes for 20.3.3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8478 >
2021-01-13 20:25:25 +00:00
Boris Brezillon
86101cdad7
panfrost: Don't skip the test with a 4k shader
...
Commit bfcdc8f174 ("pan/bi: Add some zero bytes after shaders on
Bifrost") should have fixed the problem.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8470 >
2021-01-13 19:17:33 +00:00
Rhys Perry
dfe429eb41
nir/loop_unroll: unroll more aggressively if it can improve load scheduling
...
Significantly improves performance of a Control compute shader. Also seems
to increase FPS at the very start of the game by ~5% (RX 580, 1080p,
medium settings, no MSAA).
fossil-db (Sienna):
Totals from 81 (0.06% of 139391) affected shaders:
SGPRs: 3848 -> 4362 (+13.36%); split: -0.99%, +14.35%
VGPRs: 4132 -> 4648 (+12.49%)
CodeSize: 275532 -> 659188 (+139.24%)
MaxWaves: 986 -> 906 (-8.11%)
Instrs: 54422 -> 126865 (+133.11%)
Cycles: 1057240 -> 750464 (-29.02%); split: -42.61%, +13.60%
VMEM: 26507 -> 61829 (+133.26%); split: +135.56%, -2.30%
SMEM: 4748 -> 5895 (+24.16%); split: +31.47%, -7.31%
VClause: 1933 -> 6802 (+251.89%); split: -0.72%, +252.61%
SClause: 1179 -> 1810 (+53.52%); split: -3.14%, +56.66%
Branches: 1174 -> 1157 (-1.45%); split: -23.94%, +22.49%
PreVGPRs: 3219 -> 3387 (+5.22%); split: -0.96%, +6.18%
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/6538 >
2021-01-13 18:54:18 +00:00
Rob Clark
74748f16c9
freedreno/ir3: Remove legacy packed-struct encoding
...
Note that we can't actually remove the packed structs themselves yet,
because tu still uses them in some hand-coded blit shaders.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:48 +00:00
Rob Clark
1a8113fdee
freedreno/ir3/decode: Switch over to new disasm
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:48 +00:00
Rob Clark
668943e9f7
freedreno/ir3: Realign disasm shader stats
...
To better match up with what mesa shader-db stats look like, for easier
comparision.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
3e15ba5ccc
freedreno/ir3: Better sstall estimation
...
1) Take into account repeat/nop cycles
2) Clear sfu_delay after an (ss) sync
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
11cba228fd
freedreno/ir3: Small resinfo disasm tweak
...
Add the 'type' field.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
5cae4779c2
freedreno/ir3: Switch over to new encoder/decoder
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
01e8bd55de
freedreno/ir3/tests: Switch disasm test over to new decoder
...
Also, uncomment the `stc` test vectors (since the new decoder decodes
these properly) and comment out an instruction which looks suspiciously
like -6.0 in hex.
This also switches the parser back to `atomic.b.op` from `atomic.op.b`
which was a short-term workaround to make it easier for the legacy
disassembler.
Also switch the binary encoding for ldib to clear b0, because the new
disassembler warns about unexpected dontcare bits (which cases the
disasm to not match).
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
704e49bae0
freedreno/hw/isa: Add expression caching
...
Drops decoding an ~850KB collection of instructions from ~4min to ~1sec.
Granted for normal sized shaders, this probably doesn't matter.. but it
at reduces my cycle time for fixing things to match existing disasm
syntax using this massive collection of unique instructions.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
6d94f575d2
freedreno/hw/isa: Add description of ir3 ISA
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
e7630ec278
freedreno/hw: Add isaspec mechanism for documenting/defining an ISA
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
6309c9313b
freedreno/ir3: Add some new "logical" opcodes
...
Once we switch over to the xml based ir3 ISA definition, the opcodes
will be decoupled from instruction encoding. Which will let us better
handle cases where a single "opcode" (from instruction encoding stand-
point) means different things on different generations. And also cases
like the different variations of `b`ranch instructions, which share a
single hw "opcode" plus a separate "brtype" field. When we start using
these in ir3, we'd like to treat them as separate instructions and not
have to care about the details of how they are encoded.
For now, these are only used internally within the new xml generated
instruction encoding, but once the existing "packed struct" encoding/
decoding is replace, we'll update ir3 to start using the new opcode
enums directly (except for the `mov` variants).
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
cd31bface8
freedreno/ir3: Decouple ir3_info collection from assembler
...
We'll want to re-use this when cutting over to the new XML based
instruction encoding. So untangle it from instruction packing.
Also, move handling of the appended constant data out of the
assembler, since this isn't much related to instruction encoding.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Rob Clark
e1f8aaf9d2
freedreno/ir3: Fix ldg decoding/parsing
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997 >
2021-01-13 18:32:47 +00:00
Tony Wasserka
b603875482
aco/ra: Use PhysRegInterval for count_zero
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
c30e83cc51
aco/ra: Use PhysRegInterval for collect_vars parameters
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
0959b7c435
aco/ra: Use PhysReg when indexing into RegisterFile's containers
...
This gets rid of a lot of implicit/explicit conversions from PhysReg to
unsigned.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
c3660f4781
aco/ra: Use PhysReg for member functions of PhysRegInterval
...
This replaces the various PhysReg{lb} casts that had been all over the place.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
d2d0096c0c
aco/ra: Remove unused function parameter
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
d9e1375e27
aco/ra: Use std::all_of to simplify a loop
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
f7e6b61379
aco/ra: Add helpers to test for intersection/containment of reg intervals
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
88f21ad87a
aco/ra: Move commonly repeated code to a helper function
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
8962510e38
aco/ra: Conservatively refactor get_reg_specified to use PhysRegInterval
...
All expressions have been replaced by their closest equivalent. No major
simplification efforts have been made to minimize risk of regressions.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
46c9d76134
aco/ra: Use std::all_of to simplify a loop
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
2b3b2f7ff5
aco/ra: Use std::find_if(_not) to clean up get_reg_simple
...
This makes for a more self-describing iteration behavior, and it gets rid
of the need for the duplicated "final check" at the bottom.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
ebdb362937
aco/ra: Add iterator interface for PhysRegInterval
...
This enables various loops to use range-based for.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:06 +00:00
Tony Wasserka
689ce1f39d
aco/ra: Remove always-false conditions
...
All code paths that set "found" to true either break or return before the
loop header is reached again, so the checks are unnecessary.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:05 +00:00
Tony Wasserka
46eee40abc
aco/ra: Conservatively refactor existing code to use PhysRegInterval
...
All expressions have been replaced by their closest equivalent. No major
simplification efforts have been made to minimize risk of regressions.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:05 +00:00
Tony Wasserka
9bbd6162a9
aco/ra: Introduce PhysRegInterval helper class
...
This mainly clarifies the semantics of register bounds (inclusive vs
exclusive), and further groups related varaibles together to clarify
sliding-window-style loops.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:05 +00:00
Tony Wasserka
67c1f32228
aco/ra: Update register use bounds before recursing in get_regs_for_copies
...
Delaying the call to adjust_max_used_regs until after get_regs_for_copies
returns puts the RA context into a state where registers past max_used_gpr
may be blocked. This isn't an issue on its own, but it adds a surprising
corner case to get_reg_simple that is easily avoided now.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7799 >
2021-01-13 18:21:05 +00:00
Daniel Schürmann
288032a873
aco: remove divergent branches which only jump over very few instructions
...
Totals from 18436 (13.23% of 139391) affected shaders (NAVI10):
CodeSize: 138428504 -> 138172588 (-0.18%)
Instrs: 26605127 -> 26541176 (-0.24%)
Cycles: 1624994088 -> 1622461620 (-0.16%)
VMEM: 3689892 -> 3689102 (-0.02%)
SMEM: 1131767 -> 1131761 (-0.00%)
Branches: 851796 -> 787852 (-7.51%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7814 >
2021-01-13 18:04:28 +00:00
Daniel Schürmann
412291ddef
aco: propagate swizzles when optimizing packed clamp & fma
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
6ecbccfb23
aco: optimize v_pk_fma_f16 -> v_pk_fmac_f16 on GFX10
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
b03be30e07
aco: optimize packed fneg
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
e3790fc458
aco: optimize packed clamp
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
a9fd9187e8
aco: optimize packed mul+add to v_pk_fma_f16
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
01134b0bfe
aco: simplify multiply-add combining
...
When both operands of a v_sub (same apply for v_add) are mul and one
already uses clamp/omod, pick the other operand to get a chance to
combine to a MAD.
No fossils-db changes.
Co-authored-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
fcd2ef23e5
radv: vectorize 16bit instructions
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
454bbf8f23
aco: emit packed 16bit instructions
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
5ad52ac906
aco: create helpers to emit vop3p instructions
...
Also make get_alu_src() capable to return
unswizzled multi-component SGPR sources.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
036a369f46
aco: change usesModifiers() considering opsel_hi on packed instructions
...
opsel_hi == 1 means that the high operand selects the
high bits of the input, which is the normal behavior.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
178b33c870
aco: allow SGPRs on every src position for VOP3P
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
0db4263a3a
aco: allow constants/literals on every src position for VOP3P
...
and prevent literals on VOP3P pre-GFX10.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:56 +00:00
Daniel Schürmann
4a75a28698
aco/RA: fix subdword operands on VOP3P instructions
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:55 +00:00
Daniel Schürmann
2caba08c1a
aco: fix VOP3P assembly, VN and validation
...
aco/opcodes: rename v_pk_fma_mix* -> v_fma_mix*
and add modifier capabilities for VOP3P.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6680 >
2021-01-13 17:46:55 +00:00
Dylan Baker
2bde971f46
VERSION: bump for 21.1.0 cycle
2021-01-13 09:46:19 -08:00