Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/asahi/vulkan/hk_buffer_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ hk_get_buffer_format_features(struct hk_physical_device *pdev,

if (p_format == PIPE_FORMAT_R32_UINT || p_format == PIPE_FORMAT_R32_SINT ||
(p_format == PIPE_FORMAT_R32_FLOAT &&
(agx_chip_native_hal200(pdev->dev.chip) ||
agx_chip_g17_m5(pdev->dev.chip))))
pdev->vk.supported_features.shaderImageFloat32Atomics))
features |= VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT;
}

Expand Down
5 changes: 3 additions & 2 deletions src/asahi/vulkan/hk_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,11 @@ hk_get_image_plane_format_features(struct hk_physical_device *pdev,
VK_FORMAT_FEATURE_2_BLIT_DST_BIT;
}

/* Our image atomic lowering doesn't bother to handle linear */
/* Our image atomic lowering doesn't bother to handle linear. R32_SFLOAT
* atomics are required wherever shaderImageFloat32Atomics is advertised. */
if ((p_format == PIPE_FORMAT_R32_UINT || p_format == PIPE_FORMAT_R32_SINT ||
(p_format == PIPE_FORMAT_R32_FLOAT &&
agx_chip_g17p_or_m5(pdev->dev.chip))) &&
pdev->vk.supported_features.shaderImageFloat32Atomics)) &&
tiling == VK_IMAGE_TILING_OPTIMAL) {

features |= VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT;
Expand Down
5 changes: 3 additions & 2 deletions src/asahi/vulkan/hk_shader.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ hk_populate_fs_key(struct hk_fs_key *key,
/* A fragment library without output-interface state may acquire color
* attachments later. Alpha-to-coverage also consumes color even without
* an attachment, so require it to be statically disabled. */
if (agx_chip_g17p_or_m5(chip) &&
if ((agx_chip_native_hal200(chip) || agx_chip_g17_m5(chip)) &&
state->rp &&
(state->cal || BITSET_TEST(state->dynamic,
MESA_VK_DYNAMIC_COLOR_ATTACHMENT_MAP)) &&
Expand Down Expand Up @@ -5493,7 +5493,8 @@ hk_compile_nir(struct hk_device *dev, const VkAllocationCallbacks *pAllocator,
nir_metadata_control_flow, NULL);
}
if (sw_stage == MESA_SHADER_VERTEX &&
agx_chip_g17p_or_m5(dev->dev.chip))
(agx_chip_native_hal200(dev->dev.chip) ||
agx_chip_g17_m5(dev->dev.chip)))
NIR_PASS(_, nir, agx_nir_preserve_position_order);
hk_lower_hw_vs(dev, nir, shader, kill_psiz,
agx_chip_native_or_m5(dev->dev.chip),
Expand Down