Compare commits

...

20 Commits

Author SHA1 Message Date
Dylan Baker
667218a8d2 VERSION: bump for 23.0.0-rc2 2023-01-18 11:04:34 -08:00
Tapani Pälli
05e9555046 intel/compiler: add cpp_std=c++17 when building tests
Otherwise build fails:

"../src/intel/compiler/brw_private.h:40:4: note:
 ‘std::variant’ is only available from C++17 onwards"

Fixes: 6c194ddd18 ("intel/compiler: Prepare SIMD selection helpers to handle different prog_datas")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20725>
(cherry picked from commit 53de48f1c4)
2023-01-17 10:16:40 -08:00
Alyssa Rosenzweig
c1393d1430 panfrost: Fix clears with conditional rendering
batch can be invalidated by the render condition check.

Fixes nv_conditional_render-clear.

Fixes: 638b22354e ("panfrost: Clear with a quad to avoid flushing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20689>
(cherry picked from commit 02f9cddb61)
2023-01-17 10:16:40 -08:00
Alyssa Rosenzweig
7dd8437e09 panfrost: Fix logic ops on Bifrost
opaque should not be set when logicops are enabled, that needs blending
even on Bifrost. Fixes is for when I believe the bug became possible to hit.
The logical error is older.

Fixes Piglit logicop tests again.

Fixes: d849d9779a ("panfrost: Avoid blend shader when not blending")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20685>
(cherry picked from commit 41d99c10d1)
2023-01-17 10:16:40 -08:00
Alyssa Rosenzweig
6b139c2be7 panfrost: Enable NV_primitive_restart on Valhall
Unlike literally every other mesa/st emulation, for some inexplicable reason we
need to pretend to support the CAP and then set a different EMULATE cap instead
of the emulation keying off the lack of support for the CAP. Set the CAPs
accordingly so we get NV_primitive_restart (with emulation of non-fixed
indices).

This gets Mesa to advertise GL 3.1 on Mali-G57 as intended.

Fixes: 30c14f54cf ("panfrost: Disable PIPE_CAP_PRIMITIVE_RESTART on v9")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20702>
(cherry picked from commit fe4dc59e99)
2023-01-17 10:16:39 -08:00
Alyssa Rosenzweig
0b4c673810 pan/bi: Fix incorrect compilation of fsat(reg.yx)
Future changes to nir_lower_blend cause fsat(reg.yx) instructions to be
generated, which correspond to "FCLAMP.v2f16 x.h10" pseudoinstructions. These
get their swizzles lowered, but we forgot to clear the swizzle out, so we end up
with extra swap (cancelling out the intended swizzle).

Fix the lowering logic.

Fixes: ac636f5adb ("pan/bi: Use FCLAMP pseudo op for clamp prop")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20683>
(cherry picked from commit ed46c617b0)
2023-01-17 10:16:39 -08:00
Friedrich Vock
e8dd7a275e radv/bvh: Prevent NANs when computing node cost
Otherwise the degenerate geometry workaround never triggers, leading to bad performance.

Fixes: 6f45c98b ("radv/bvh: Adjust sah cost based on depth")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20723>
(cherry picked from commit 684eee0748)
2023-01-17 10:16:39 -08:00
Lionel Landwerlin
20f8f6ebc6 Revert "ci: build hasvk if we're building anv"
This reverts commit b4d3d11e43.

We're seeing problems on the builders running the hasvk tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20726>
(cherry picked from commit 4121aa43c4)
2023-01-17 10:16:38 -08:00
Alejandro Piñeiro
ec70534827 vulkan/wsi: check if image info was already freed
We set the different data being freed to NULL after freeing it, and
checks for NULL before freeing it.

This fixes several double free crash with v3dv, when running OOM wsi
tests, like for example:
dEQP-VK.wsi.xlib.swapchain.simulate_oom.composite_alpha

Although note that only one person got those on a new fresh install of
the Raspbian OS, so this problem was rare.

Fixes: 5b13d74583 ("vulkan/wsi/drm: Break create_native_image in pieces")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20695>
(cherry picked from commit b27e42dcb5)
2023-01-17 10:16:23 -08:00
Vinson Lee
fdf09a06ca radv: Fix memory leak.
Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable page going out of scope leaks the storage it points to.

Fixes: 8d0e6c02c7 ("radv: Add RMV tracing utilities")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20711>
(cherry picked from commit 6986332c80)
2023-01-17 10:16:18 -08:00
Friedrich Vock
35213f18b8 radv/rt: Divide by the correct workgroup size
Improves build performance by around 25%.

Fixes: 9369b407 ("radv: Use PLOC for BVH building")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20717>
(cherry picked from commit eab2c39951)
2023-01-17 10:16:17 -08:00
Alyssa Rosenzweig
bbf4675847 panfrost: Don't use AFBC of sRGB luminance-alpha
This isn't allowed for the same reason that AFBC of regular luminance-alpha
isn't allowed (and will raise DATA_INVALID_FAULTs). Reorder the checks to
ensure these formats are checked.

Fixes Piglit texwrap GL_EXT_texture_sRGB-s3tc.

Fixes: 476be5cb27 ("panfrost: Don't use texture format swizzles on v7")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20686>
(cherry picked from commit 5fdfd8044d)
2023-01-17 10:16:17 -08:00
Jesse Natalie
668503534d dzn: Fix clear bind flag logic
This is the patch I had meant to merge

Fixes: 8b79e6fb ("dzn: No need to add another bind flag for clears if one is already present")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20361>
(cherry picked from commit f1faf30a5f)
2023-01-17 10:16:16 -08:00
Dylan Baker
4b0a1e19d6 .pick_status.json: Update to 8084b412ca 2023-01-17 10:16:15 -08:00
Bas Nieuwenhuizen
2114fdf5eb aco: Pass correct number of coords to Vega 1D LOD instruction.
If we pass a physical 2D texture descriptor we should also pass 2
coords. Otherwise it just uses the random content in the second
register which ends up funny sometimes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20696>
(cherry picked from commit edca10e9c9)
2023-01-13 13:52:42 -08:00
t0b3
54cfb552ab nir/nir_opt_move: fix ALWAYS_INLINE compiler error
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Closes: #6825
Fixes: f1d20ec6 ("nir/nir_opt_move: handle non-SSA defs ")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17439>
(cherry picked from commit 267dd1f4d5)
2023-01-13 13:52:42 -08:00
Samuel Pitoiset
264d64cc6c radv: fix re-emitting RB+ when the non-compacted color format changes
If the previously emitted graphics pipeline uses the value A for
col_format_non_compacted and the new bound graphics pipeline uses B.

At bind time, radv_cmd_state::col_format_non_compacted will be set to
B and the rbplus flag will be dirtied. But if there is no draws and a
new graphics pipeline is bound with the same value as A, the next
draw will emit the rbplus state with B instead of A.

This can be basically triggered with meta operations after drawing
because the driver saves/restores the bound pipeline.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8073
Fixes: 11469f7553 ("radv: copy the non-compacted color format at pipeline bind time")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20692>
(cherry picked from commit 5b3fb44ecc)
2023-01-13 13:52:42 -08:00
Dylan Baker
a56dcf635e .pick_status.json: Update to a5a19903ab 2023-01-13 13:52:38 -08:00
Dylan Baker
f081fa4047 VERSION: bump for rc1 2023-01-13 09:54:13 -08:00
Dylan Baker
376f8131d0 docs: add missing updates to new_features.txt
I looked through the changes to features.txt since the 22.3 branchpoint
and added those to the new_features list as well. It was pointed out
that VK_KHR_present_wait wasn't in the list of new features.
2023-01-13 09:51:01 -08:00
21 changed files with 1653 additions and 45 deletions

View File

@@ -78,7 +78,7 @@ debian-testing:
-D dri3=enabled
-D gallium-va=enabled
GALLIUM_DRIVERS: "swrast,virgl,radeonsi,zink,crocus,iris,i915"
VULKAN_DRIVERS: "swrast,amd,intel,intel_hasvk,virtio-experimental"
VULKAN_DRIVERS: "swrast,amd,intel,virtio-experimental"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D spirv-to-dxil=true
@@ -121,7 +121,7 @@ debian-testing-msan:
MESON_TEST_ARGS: "--suite glcpp --suite gallium --suite format"
# Freedreno dropped because freedreno tools fail at msan.
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
VULKAN_DRIVERS: intel,intel_hasvk,amd,broadcom,virtio-experimental
VULKAN_DRIVERS: intel,amd,broadcom,virtio-experimental
.debian-cl-testing:
extends:
@@ -305,7 +305,7 @@ fedora-release:
-D shared-llvm=enabled
LLVM_VERSION: ""
UNWIND: "disabled"
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,intel_hasvk,imagination-experimental"
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination-experimental"
script:
- .gitlab-ci/meson/build.sh
@@ -350,7 +350,7 @@ debian-android:
# is not a dependency that AOSP wants to accept. Can't do Radeon Gallium
# drivers because they requires LLVM, which we don't have an Android build
# of.
- PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=amd,intel,intel_hasvk .gitlab-ci/meson/build.sh
- PKG_CONFIG_PATH=/usr/local/lib/x86_64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/pkgconfig/ CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris VULKAN_DRIVERS=amd,intel .gitlab-ci/meson/build.sh
.meson-cross:
extends:
@@ -481,7 +481,7 @@ debian-clang:
-D shared-llvm=enabled
-D opencl-spirv=true
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
VULKAN_DRIVERS: intel,intel_hasvk,amd,freedreno,broadcom,virtio-experimental,swrast,panfrost,imagination-experimental,microsoft-experimental
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,swrast,panfrost,imagination-experimental,microsoft-experimental
EXTRA_OPTION:
-D spirv-to-dxil=true
-D osmesa=true
@@ -579,7 +579,7 @@ debian-vulkan:
-D c_args=-fno-sanitize-recover=all
-D cpp_args=-fno-sanitize-recover=all
UBSAN_OPTIONS: "print_stacktrace=1"
VULKAN_DRIVERS: intel,intel_hasvk,amd,freedreno,broadcom,virtio-experimental,imagination-experimental,microsoft-experimental
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental,imagination-experimental,microsoft-experimental
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D build-aco-tests=true
@@ -592,7 +592,7 @@ debian-i386:
- .use-debian/i386_build
variables:
CROSS: i386
VULKAN_DRIVERS: intel,intel_hasvk,amd,swrast,virtio-experimental
VULKAN_DRIVERS: intel,amd,swrast,virtio-experimental
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,swrast,virgl,zink,crocus"
LLVM_VERSION: 13
EXTRA_OPTION: >

1577
.pick_status.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
23.0.0-devel
23.0.0-rc2

View File

@@ -1,9 +1,21 @@
VK_EXT_descriptor_buffer on RADV
VK_EXT_descriptor_buffer on RADV, Turnip
VK_AMD_shader_early_and_late_fragment_tests on RADV
VK_AMD_shader_explicit_vertex_parameter on RADV/RDNA3
VK_EXT_swapchain_colorspace on RADV
VK_EXT_swapchain_colorspace on RADV, ANV, Turnip
Enabled VK_EXT_mesh_shader by default on RADV/RDNA2
Implemented more VK_EXT_dynamic_state3 features on RADV
Implemented more VK_EXT_dynamic_state3 features on RADV, Turnip
Various raytracing, graphics pipeline library and RDNA3 improvements on RADV
Radeon Memory Visualizer support with RADV.
VK_KHR_shader_integer_dot_product on V3DV
VK_KHR_present_wait on ANV, RADV, Turnip
VK_KHR_push_descriptor on Venus
VK_KHR_pci_bus_info on Venus
GL_ARB_clip_control on panfrost
GL_ARB_texture_filter_anisotropic on panfrost, asahi
GL_ARB_occulsion_query2 on asahi
GL_ARB_shader_stencil_export on asahi
GL_ARB_draw_instanced on asahi
GL_ARB_instanced_ararys on asahi
GL_ARB_seamless_cube_map on asahi
GL_NV_conditional_render on asahi
GL_ARB_texture_mirror_clamp_to_edge on asahi

View File

@@ -1,5 +1,4 @@
dEQP-VK.dynamic_rendering.basic.*
dEQP-VK.glsl.texture_functions.query.texturequerylod.*
dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers
dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers_cubemap
dEQP-VK.image.sample_texture.128_bit_compressed_format_two_samplers

View File

@@ -1,9 +1,4 @@
dEQP-VK.dynamic_rendering.basic.*
dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1darray_float_zero_uv_width_fragment
dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1d_fixed_fragment
dEQP-VK.glsl.texture_functions.query.texturequerylod.usampler1darray_fragment
dEQP-VK.glsl.texture_functions.query.texturequerylod.usampler1darray_zero_uv_width_fragment
dEQP-VK.glsl.texture_functions.query.texturequerylod.isampler1darray_fragment
dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers
dEQP-VK.image.sample_texture.64_bit_compressed_format_two_samplers_cubemap
dEQP-VK.image.sample_texture.128_bit_compressed_format_two_samplers

View File

@@ -9626,7 +9626,7 @@ visit_tex(isel_context* ctx, nir_tex_instr* instr)
unsigned wqm_coord_count = 0;
std::vector<Temp> unpacked_coord;
if (ctx->options->gfx_level == GFX9 && instr->sampler_dim == GLSL_SAMPLER_DIM_1D &&
instr->op != nir_texop_lod && instr->coord_components) {
instr->coord_components) {
RegClass rc = a16 ? v2b : v1;
for (unsigned i = 0; i < coord.bytes() / rc.bytes(); i++)
unpacked_coord.emplace_back(emit_extract_vector(ctx, coord, i, rc));

View File

@@ -198,6 +198,9 @@ combined_node_cost(uint32_t lds_base, uint32_t i, uint32_t j)
combined_bounds.max = max(shared_bounds[i - lds_base].max, shared_bounds[j - lds_base].max);
float area = aabb_surface_area(combined_bounds);
if (area == 0.0)
return 0.0;
/* p_a and p_b are the probabilities that i or j are hit by a ray:
* Assuming that the current node is hit (p = 1) and the probability of hitting a node
* is proportional to its surface area, p = area * c with p = 1 for the current node.

View File

@@ -790,7 +790,7 @@ ploc_build_internal(VkCommandBuffer commandBuffer, uint32_t infoCount,
cmd_buffer->device->meta_state.accel_struct_build.ploc_p_layout,
VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(consts), &consts);
vk_common_CmdDispatch(commandBuffer,
MAX2(DIV_ROUND_UP(bvh_states[i].node_count, 64), 1), 1, 1);
MAX2(DIV_ROUND_UP(bvh_states[i].node_count, PLOC_WORKGROUP_SIZE), 1), 1, 1);
}
}

View File

@@ -6233,7 +6233,7 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline
if (cmd_buffer->device->physical_device->rad_info.rbplus_allowed &&
(!cmd_buffer->state.emitted_graphics_pipeline ||
cmd_buffer->state.emitted_graphics_pipeline->col_format_non_compacted != graphics_pipeline->col_format_non_compacted)) {
cmd_buffer->state.col_format_non_compacted != graphics_pipeline->col_format_non_compacted)) {
cmd_buffer->state.col_format_non_compacted = graphics_pipeline->col_format_non_compacted;
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_RBPLUS;
}

View File

@@ -276,6 +276,8 @@ append_trace_events(struct radv_device *device, int pipe_fd)
read_ptr += length - sizeof(struct trace_event_header);
}
} while (true);
free(page);
}
static void

View File

@@ -51,13 +51,13 @@
* lower register pressure.
*/
static ALWAYS_INLINE bool
static inline bool
src_is_ssa(nir_src *src, void *state)
{
return src->is_ssa;
}
static ALWAYS_INLINE bool
static inline bool
instr_reads_register(nir_instr *instr)
{
return !nir_foreach_src(instr, src_is_ssa, NULL);

View File

@@ -4209,7 +4209,7 @@ panfrost_create_blend_state(struct pipe_context *pipe,
const bool supports_2src = pan_blend_supports_2src(PAN_ARCH);
so->info[c] = (struct pan_blend_info){
.enabled = (equation.color_mask != 0),
.opaque = pan_blend_is_opaque(equation),
.opaque = !blend->logicop_enable && pan_blend_is_opaque(equation),
.constant_mask = constant_mask,
/* TODO: check the dest for the logicop */

View File

@@ -60,12 +60,15 @@ panfrost_clear(struct pipe_context *pipe, unsigned buffers,
const union pipe_color_union *color, double depth,
unsigned stencil)
{
if (!panfrost_render_condition_check(pan_context(pipe)))
return;
/* Only get batch after checking the render condition, since the check can
* cause the batch to be flushed.
*/
struct panfrost_context *ctx = pan_context(pipe);
struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
if (!panfrost_render_condition_check(ctx))
return;
/* At the start of the batch, we can clear for free */
if (!batch->scoreboard.first_job) {
panfrost_batch_clear(batch, buffers, color, depth, stencil);

View File

@@ -135,6 +135,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 1;
case PIPE_CAP_OCCLUSION_QUERY:
case PIPE_CAP_PRIMITIVE_RESTART:
case PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX:
return true;
@@ -312,8 +313,8 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
/* Removed in v9 (Valhall). PRIMTIIVE_RESTART_FIXED_INDEX is of course
* still supported as it is core GLES3.0 functionality
*/
case PIPE_CAP_PRIMITIVE_RESTART:
return dev->arch <= 7;
case PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART:
return dev->arch >= 9;
case PIPE_CAP_FLATSHADE:
case PIPE_CAP_TWO_SIDED_COLOR:

View File

@@ -208,6 +208,7 @@ if with_tests
link_with : [
libintel_compiler, libintel_common, libintel_dev, libisl,
],
override_options: ['cpp_std=c++17'],
dependencies : [idep_gtest, idep_nir, idep_mesautil],
),
suite : ['intel'],

View File

@@ -240,16 +240,16 @@ dzn_image_create(struct dzn_device *device,
* destination. Both operations require the RT or DS cap flags.
*/
if ((image->vk.usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT) &&
image->vk.tiling == VK_IMAGE_TILING_OPTIMAL &&
(image->desc.Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET |
D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) == D3D12_RESOURCE_FLAG_NONE) {
image->vk.tiling == VK_IMAGE_TILING_OPTIMAL) {
D3D12_FEATURE_DATA_FORMAT_SUPPORT dfmt_info =
dzn_physical_device_get_format_support(pdev, pCreateInfo->format);
if (dfmt_info.Support1 & D3D12_FORMAT_SUPPORT1_RENDER_TARGET) {
image->desc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
image->valid_access |= D3D12_BARRIER_ACCESS_RENDER_TARGET;
} else if (dfmt_info.Support1 & D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL) {
} else if ((dfmt_info.Support1 & D3D12_FORMAT_SUPPORT1_DEPTH_STENCIL) &&
(image->desc.Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET |
D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS)) == D3D12_RESOURCE_FLAG_NONE) {
image->desc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL;
image->valid_access |= D3D12_BARRIER_ACCESS_DEPTH_STENCIL_WRITE;
} else if (dfmt_info.Support1 & D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW) {

View File

@@ -133,8 +133,10 @@ lower_swizzle(bi_context *ctx, bi_instr *ins, unsigned src)
bi_index dest = ins->dest[0];
bi_index tmp = bi_temp(ctx);
bi_index swizzled_src = bi_replace_index(ins->src[0], tmp);
ins->src[0].swizzle = BI_SWIZZLE_H01;
ins->dest[0] = tmp;
bi_swz_v2i16_to(&b, dest, bi_replace_index(ins->src[0], tmp));
bi_swz_v2i16_to(&b, dest, swizzled_src);
return;
}

View File

@@ -118,6 +118,13 @@ unswizzled_format(enum pipe_format format)
enum pan_afbc_mode
panfrost_afbc_format(unsigned arch, enum pipe_format format)
{
/* sRGB does not change the pixel format itself, only the
* interpretation. The interpretation is handled by conversion hardware
* independent to the compression hardware, so we can compress sRGB
* formats by using the corresponding linear format.
*/
format = util_format_linear(format);
/* Luminance-alpha not supported for AFBC on v7+ */
switch (format) {
case PIPE_FORMAT_A8_UNORM:
@@ -132,13 +139,6 @@ panfrost_afbc_format(unsigned arch, enum pipe_format format)
break;
}
/* sRGB does not change the pixel format itself, only the
* interpretation. The interpretation is handled by conversion hardware
* independent to the compression hardware, so we can compress sRGB
* formats by using the corresponding linear format.
*/
format = util_format_linear(format);
/* We handle swizzling orthogonally to AFBC */
format = unswizzled_format(format);

View File

@@ -796,7 +796,8 @@ GENX(pan_blend_get_shader_locked)(const struct panfrost_device *dev,
};
/* Blend shaders should only be used for blending on Bifrost onwards */
assert(dev->arch <= 5 || !pan_blend_is_opaque(state->rts[rt].equation));
assert(dev->arch <= 5 || state->logicop_enable ||
!pan_blend_is_opaque(state->rts[rt].equation));
assert(state->rts[rt].equation.color_mask != 0);
struct hash_entry *he =

View File

@@ -641,10 +641,22 @@ void
wsi_destroy_image_info(const struct wsi_swapchain *chain,
struct wsi_image_info *info)
{
vk_free(&chain->alloc, (void *)info->create.pQueueFamilyIndices);
vk_free(&chain->alloc, (void *)info->format_list.pViewFormats);
vk_free(&chain->alloc, (void *)info->drm_mod_list.pDrmFormatModifiers);
vk_free(&chain->alloc, info->modifier_props);
if (info->create.pQueueFamilyIndices != NULL) {
vk_free(&chain->alloc, (void *)info->create.pQueueFamilyIndices);
info->create.pQueueFamilyIndices = NULL;
}
if (info->format_list.pViewFormats != NULL) {
vk_free(&chain->alloc, (void *)info->format_list.pViewFormats);
info->format_list.pViewFormats = NULL;
}
if (info->drm_mod_list.pDrmFormatModifiers != NULL) {
vk_free(&chain->alloc, (void *)info->drm_mod_list.pDrmFormatModifiers);
info->drm_mod_list.pDrmFormatModifiers = NULL;
}
if (info->modifier_props != NULL) {
vk_free(&chain->alloc, info->modifier_props);
info->modifier_props = NULL;
}
}
VkResult