* swrast allocates images aligned to 64x64 tiles, which results in images
that are larger than the window. PutImage requests must be clamped on
the y-axis to avoid uploading/damaging out-of-bounds regions
* winsys coords are y-inverted
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
this way we can use shader-db report.py to analyze shader-db changes for zink
with the vk driver of our choosing. requires corresponding report.py relaxations
to be useful, the idea was to change zink a bit and change report.py a bit and
meet in the middle with something useful for arbitrary vulkan drivers.
the output isn't too pretty but it works,
synthetic example on nvk:
Instruction count HURT: shaders/glmark/1-1.shader_test vertex: 42 -> 43 (2.38%)
total Instruction count in shared programs: 7135 -> 7136 (0.01%)
Instruction count in affected programs: 42 -> 43 (2.38%)
helped: 0
HURT: 1
total Code Size in shared programs: 114160 -> 114160 (0.00%)
Code Size in affected programs: 0 -> 0
helped: 0
HURT: 0
total Number of GPRs in shared programs: 2677 -> 2677 (0.00%)
Number of GPRs in affected programs: 0 -> 0
helped: 0
HURT: 0
total SLM Size in shared programs: 0 -> 0
SLM Size in affected programs: 0 -> 0
helped: 0
HURT: 0
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30194>
Use common db_alignment to calculate dpb_size for DPB_MAX_RES,
DPB_DYNAMIC_TIER_1 and DPB_DYNAMIC_TIER_2. This makes the db_pitch
in sync with all DPB types.
Remove the VCN5 hack of using 256 for H264 as 64 works.
Remove redundant codes for width and height as they were calculated
at the beginning in calc_dpb_size().
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30186>
spirv_info_h was added to idep_vulkan_lite_runtime_headers but it's also
needed for building libvulkan_lite_runtime. Without this patch, from
a clean meson setup (tested with: -Dvulkan-drivers=freedreno -Dgallium-drivers= -Dplatforms=wayland)
ninja -C build src/vulkan/runtime/libvulkan_lite_runtime.a
In file included from ../src/vulkan/runtime/vk_physical_device.c:24:
../src/vulkan/runtime/vk_physical_device.h:32:10: fatal error: compiler/spirv/spirv_info.h: No such file or directory
Fixes: 1759c0eba7 ("vulkan: add helper to fill out spirv caps automatically")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30189>
Commit 94989b45a5 ("anv,driconf: Add fake non device local memory WA
for Total War: Warhammer 3") implemented a workaround to make
Warhammer 3 work on ADL, but the game still doesn't work on LNL, which
uses xe.ko, and MTL, which uses i915.ko: it still fails at launch
claiming it couldn't allocate memory.
So in this implementation, instead of clearing DEVICE_LOCAL_BIT we
just duplicate our memory types, one having the bit and one not
having.
v2:
- Check for VK_MAX_MEMORY_TYPES (José)
- Invert the order of the memory types (José)
- Fix white space issue (José)
v3:
- Comment our non-spec-compliance (José)
- Remove useless lines (José)
Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8721
Fixes: 94989b45a5 ("anv,driconf: Add fake non device local memory WA for Total War: Warhammer 3")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30162>
Some apps (like firefox and chromium) seem to like to create textures
with internal format GL_RGBA8 but then upload GL_BGRA to them. If the
app were a bit more clever it could hit the memcpy path. But fallback
sw conversion (convert_ubytes()) is slow. If we are going to have to
make this extra copy, do it on the gpu.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
A sequence like:
1) set_framebuffer_state(A)
2) clears and/or draws
3) set_framebuffer_state(B)
4) context_flush(ASYNC)
would result in the fence for batch B being returned, instead of batch A.
Resulting in a fence that signals too early.
Instead, in context_flush() find the most recently modified batch, so
that in the example above batch A would be flushed.
There is one wrinkle, that we want to avoid a dependency loop. So the
'last_batch' can actually be a batch that depends on the most recently
modified batch. But in either case, the batch that is used for the
returned fence is one that directly or indirectly depends on all other
batches associated with the context.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
The other callers were already doing the prepatory stencil clear before
calling util_blitter_stencil_fallback(). Doing the clear in the driver
avoids recursively entering u_blitter if the driver uses
util_blitter_clear_depth_stencil() to implement ->clear_depth_stencil().
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/30064>
this is required for nvk to create a heap. fixes zink+nvk+drm-shim:
run: ../src/gallium/drivers/zink/zink_screen.c:3371: zink_internal_create_screen: Assertion `i == ZINK_HEAP_HOST_VISIBLE_COHERENT_CACHED || i == ZINK_HEAP_DEVICE_LOCAL_LAZY || i == ZINK_HEAP_DEVICE_LOCAL_VISIBLE' failed.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30136>