mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-20 08:47:50 +00:00
Fixes AMD Vulkan drivers crash with GPU skinning
R16G16B16_SFLOAT isn't guaranteed to be supported: https://docs.vulkan.org/spec/latest/chapters/formats.html See Table 17. Mandatory Format Support: 16-bit Components It's safe to use less components: https://docs.vulkan.org/spec/latest/chapters/fxvertex.html > The number of components in the vertex shader input variable > need not exactly match the number of components in the format. > If the vertex shader has fewer components, the extra components > are discarded. The issue is reported here (second one): https://wildfiregames.com/forum/topic/129061-two-vulkan-issues-in-a27-and-unrelated-choppiness-caused-by-control-groups/
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
/* Copyright (C) 2026 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -277,7 +277,7 @@ ModelDefRData::ModelDefRData(const CModelDefPtr& modelDef)
|
||||
m_Position.format, 0, OUTPUT_POSITION_STRIDE,
|
||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 0},
|
||||
{Renderer::Backend::VertexAttributeStream::NORMAL,
|
||||
Renderer::Backend::Format::R16G16B16_SFLOAT, OUTPUT_NORMAL_OFFSET, OUTPUT_NORMAL_TANGENT_STRIDE,
|
||||
Renderer::Backend::Format::R16G16B16A16_SFLOAT, OUTPUT_NORMAL_OFFSET, OUTPUT_NORMAL_TANGENT_STRIDE,
|
||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 1},
|
||||
{Renderer::Backend::VertexAttributeStream::UV2,
|
||||
Renderer::Backend::Format::R16G16B16A16_SFLOAT, OUTPUT_TANGENT_OFFSET, OUTPUT_NORMAL_TANGENT_STRIDE,
|
||||
|
||||
Reference in New Issue
Block a user