This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
src/libANGLE/renderer/vulkan Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -427,14 +427,11 @@ void RendererVk::ensureCapsInitialized() const
427427 // The gles2.0 section 2.10 states that "gl_Position is not a varying variable and does
428428 // not count against this limit.", but the Vulkan spec has no such mention in its Built-in
429429 // vars section. It is implicit that we need to actually reserve it for Vulkan in that case.
430- //
431- // Note: AMD has a weird behavior when we edge toward the maximum number of varyings and can
432- // often crash. Reserving an additional varying just for them bringing the total to 2.
433- constexpr GLint kReservedVaryingCount = 2 ;
434- mNativeCaps .maxVaryingVectors =
435- LimitToInt ((limitsVk.maxVertexOutputComponents / 4 ) - kReservedVaryingCount );
436- mNativeCaps .maxVertexOutputComponents =
437- LimitToInt (static_cast <uint32_t >(mNativeCaps .maxVaryingVectors * 4 ));
430+ GLint reservedVaryingVectorCount = 1 ;
431+
432+ mNativeCaps .maxVaryingVectors = LimitToInt (
433+ (limitsVk.maxVertexOutputComponents / kComponentsPerVector ) - reservedVaryingVectorCount);
434+ mNativeCaps .maxVertexOutputComponents = LimitToInt (limitsVk.maxVertexOutputComponents );
438435
439436 mNativeCaps .maxTransformFeedbackInterleavedComponents =
440437 gl::IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS;
You can’t perform that action at this time.
0 commit comments