Fix various graphics issues detected by Vulkan Validation Layers on Android
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Current materials shader version.
|
/// Current materials shader version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
#define MATERIAL_GRAPH_VERSION 174
|
#define MATERIAL_GRAPH_VERSION 175
|
||||||
|
|
||||||
class Material;
|
class Material;
|
||||||
class GPUShader;
|
class GPUShader;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ struct PipelineBarrierVulkan
|
|||||||
|
|
||||||
FORCE_INLINE bool HasBarrier() const
|
FORCE_INLINE bool HasBarrier() const
|
||||||
{
|
{
|
||||||
return ImageBarriers.Count() + BufferBarriers.Count() + MemoryBarriers.Count() != 0;
|
return ImageBarriers.Count() + BufferBarriers.Count() + MemoryBarriers.Count() != 0 || SourceStage + DestStage != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Execute(const CmdBufferVulkan* cmdBuffer);
|
void Execute(const CmdBufferVulkan* cmdBuffer);
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ static const char* GInstanceExtensions[] =
|
|||||||
#endif
|
#endif
|
||||||
#if defined(VK_KHR_display) && 0
|
#if defined(VK_KHR_display) && 0
|
||||||
VK_KHR_DISPLAY_EXTENSION_NAME,
|
VK_KHR_DISPLAY_EXTENSION_NAME,
|
||||||
|
#endif
|
||||||
|
#if GPU_ENABLE_TRACY && VK_EXT_calibrated_timestamps && VK_EXT_host_query_reset
|
||||||
|
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, // Required by VK_EXT_host_query_reset (unless using Vulkan 1.1 or newer)
|
||||||
#endif
|
#endif
|
||||||
nullptr
|
nullptr
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ static VKAPI_ATTR VkBool32 VKAPI_PTR DebugUtilsCallback(VkDebugUtilsMessageSever
|
|||||||
case 3: // Attachment 2 not written by fragment shader
|
case 3: // Attachment 2 not written by fragment shader
|
||||||
case 5: // SPIR-V module not valid: MemoryBarrier: Vulkan specification requires Memory Semantics to have one of the following bits set: Acquire, Release, AcquireRelease or SequentiallyConsistent
|
case 5: // SPIR-V module not valid: MemoryBarrier: Vulkan specification requires Memory Semantics to have one of the following bits set: Acquire, Release, AcquireRelease or SequentiallyConsistent
|
||||||
case -1666394502: // After query pool creation, each query must be reset before it is used. Queries must also be reset between uses.
|
case -1666394502: // After query pool creation, each query must be reset before it is used. Queries must also be reset between uses.
|
||||||
|
case 1203141749:
|
||||||
case 602160055: // Attachment 4 not written by fragment shader; undefined values will be written to attachment. TODO: investigate it for PS_GBuffer shader from Deferred material with USE_LIGHTMAP=1
|
case 602160055: // Attachment 4 not written by fragment shader; undefined values will be written to attachment. TODO: investigate it for PS_GBuffer shader from Deferred material with USE_LIGHTMAP=1
|
||||||
case 7060244: // Image Operand Offset can only be used with OpImage*Gather operations
|
case 7060244: // Image Operand Offset can only be used with OpImage*Gather operations
|
||||||
case -1539028524: // SortedIndices is null so Vulkan backend sets it to default R32_SFLOAT format which is not good for UINT format of the buffer
|
case -1539028524: // SortedIndices is null so Vulkan backend sets it to default R32_SFLOAT format which is not good for UINT format of the buffer
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ void MaterialGenerator::ProcessGroupMaterial(Box* box, Node* node, Value& value)
|
|||||||
|
|
||||||
// Sample scene depth buffer
|
// Sample scene depth buffer
|
||||||
auto sceneDepthTexture = findOrAddSceneTexture(MaterialSceneTextures::SceneDepth);
|
auto sceneDepthTexture = findOrAddSceneTexture(MaterialSceneTextures::SceneDepth);
|
||||||
auto depthSample = writeLocal(VariantType::Float, String::Format(TEXT("{0}.SampleLevel(SamplerLinearClamp, {1}, 0).x"), sceneDepthTexture.ShaderName, screenUVs.Value), node);
|
auto depthSample = writeLocal(VariantType::Float, String::Format(TEXT("{0}.SampleLevel(SamplerPointClamp, {1}, 0).x"), sceneDepthTexture.ShaderName, screenUVs.Value), node);
|
||||||
|
|
||||||
// Linearize raw device depth
|
// Linearize raw device depth
|
||||||
Value sceneDepth;
|
Value sceneDepth;
|
||||||
|
|||||||
Reference in New Issue
Block a user