From 591affaf733ec82d7b38a7bf9c4d2f49a69a2c66 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Fri, 18 Apr 2025 16:18:02 -0700 Subject: Check the available VK extensions before using CoopVec APIs in GFX (#6849) * Check the available VK extensions before using CoopVec APIs in GFX * Remove a redundant request for cooperative vector extension for vk --- include/slang-gfx.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'include') diff --git a/include/slang-gfx.h b/include/slang-gfx.h index db9dcbacb..a4e616f7b 100644 --- a/include/slang-gfx.h +++ b/include/slang-gfx.h @@ -1723,6 +1723,36 @@ struct ClearResourceViewFlags }; }; +enum class CooperativeVectorComponentType +{ + Float16 = 0, + Float32 = 1, + Float64 = 2, + SInt8 = 3, + SInt16 = 4, + SInt32 = 5, + SInt64 = 6, + UInt8 = 7, + UInt16 = 8, + UInt32 = 9, + UInt64 = 10, + SInt8Packed = 11, + UInt8Packed = 12, + FloatE4M3 = 13, + FloatE5M2 = 14, +}; + +struct CooperativeVectorProperties +{ + CooperativeVectorComponentType inputType; + CooperativeVectorComponentType inputInterpretation; + CooperativeVectorComponentType matrixInterpretation; + CooperativeVectorComponentType biasInterpretation; + CooperativeVectorComponentType resultType; + bool transpose; +}; + + class IResourceCommandEncoder : public ICommandEncoder { // {F99A00E9-ED50-4088-8A0E-3B26755031EA} @@ -2780,6 +2810,10 @@ public: virtual SLANG_NO_THROW Result SLANG_MCALL getTextureRowAlignment(Size* outAlignment) = 0; + virtual SLANG_NO_THROW Result SLANG_MCALL getCooperativeVectorProperties( + CooperativeVectorProperties* properties, + uint32_t* propertyCount) = 0; + virtual SLANG_NO_THROW Result SLANG_MCALL createShaderObject2( slang::ISession* slangSession, slang::TypeReflection* type, -- cgit v1.2.3