Commit 2f737c25 by Shahbaz Youssefi Committed by Commit Bot

Translator: Rename GLSL to SPIR-V in Vulkan and Metal output

Preparation for actual SPIR-V output instead of GLSL. Bug: angleproject:4889 Change-Id: Ic279b23d3a817bd5dca66a844905378207afdbac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721194 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent a6b16d29
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// Version number for shader translation API. // Version number for shader translation API.
// It is incremented every time the API changes. // It is incremented every time the API changes.
#define ANGLE_SH_VERSION 253 #define ANGLE_SH_VERSION 254
enum ShShaderSpec enum ShShaderSpec
{ {
...@@ -69,12 +69,11 @@ enum ShShaderOutput ...@@ -69,12 +69,11 @@ enum ShShaderOutput
SH_HLSL_4_1_OUTPUT = 0x8B49, // D3D 11 SH_HLSL_4_1_OUTPUT = 0x8B49, // D3D 11
SH_HLSL_4_0_FL9_3_OUTPUT = 0x8B4A, // D3D 11 feature level 9_3 SH_HLSL_4_0_FL9_3_OUTPUT = 0x8B4A, // D3D 11 feature level 9_3
// Output specialized GLSL to be fed to glslang for Vulkan SPIR. // Output SPIR-V for the Vulkan backend.
SH_GLSL_VULKAN_OUTPUT = 0x8B4B, SH_SPIRV_VULKAN_OUTPUT = 0x8B4B,
// Output specialized GLSL to be fed to glslang for Vulkan SPIR to be cross compiled to Metal // Output SPIR-V to be cross compiled to Metal.
// later. SH_SPIRV_METAL_OUTPUT = 0x8B4C,
SH_GLSL_METAL_OUTPUT = 0x8B4C,
}; };
// Compile options. // Compile options.
......
...@@ -183,7 +183,7 @@ int main(int argc, char *argv[]) ...@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
compileOptions |= SH_INITIALIZE_UNINITIALIZED_LOCALS; compileOptions |= SH_INITIALIZE_UNINITIALIZED_LOCALS;
break; break;
case 'v': case 'v':
output = SH_GLSL_VULKAN_OUTPUT; output = SH_SPIRV_VULKAN_OUTPUT;
compileOptions |= SH_INITIALIZE_UNINITIALIZED_LOCALS; compileOptions |= SH_INITIALIZE_UNINITIALIZED_LOCALS;
break; break;
case 'h': case 'h':
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// OutputVulkanGLSL: // OutputVulkanGLSL:
// Code that outputs shaders that fit GL_KHR_vulkan_glsl. // Code that outputs shaders that fit GL_KHR_vulkan_glsl, to be fed to glslang to generate
// The shaders are then fed into glslang to spit out SPIR-V (libANGLE-side). // SPIR-V.
// See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt // See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt
// //
......
...@@ -4,11 +4,14 @@ ...@@ -4,11 +4,14 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// OutputVulkanGLSL: // OutputVulkanGLSL:
// Code that outputs shaders that fit GL_KHR_vulkan_glsl. // Code that outputs shaders that fit GL_KHR_vulkan_glsl, to be fed to glslang to generate
// The shaders are then fed into glslang to spit out SPIR-V (libANGLE-side). // SPIR-V.
// See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt // See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt
// //
#ifndef COMPILER_TRANSLATOR_OUTPUTVULKANGLSL_H_
#define COMPILER_TRANSLATOR_OUTPUTVULKANGLSL_H_
#include "compiler/translator/OutputGLSL.h" #include "compiler/translator/OutputGLSL.h"
namespace sh namespace sh
...@@ -67,3 +70,5 @@ class TOutputVulkanGLSL : public TOutputGLSL ...@@ -67,3 +70,5 @@ class TOutputVulkanGLSL : public TOutputGLSL
}; };
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_OUTPUTVULKANGLSL_H_
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
// considerations for Metal backend limitations. // considerations for Metal backend limitations.
// //
#ifndef COMPILER_TRANSLATOR_OUTPUTVULKANGLSLFORMETAL_H_
#define COMPILER_TRANSLATOR_OUTPUTVULKANGLSLFORMETAL_H_
#include "compiler/translator/OutputVulkanGLSL.h" #include "compiler/translator/OutputVulkanGLSL.h"
namespace sh namespace sh
...@@ -37,3 +40,5 @@ class TOutputVulkanGLSLForMetal : public TOutputVulkanGLSL ...@@ -37,3 +40,5 @@ class TOutputVulkanGLSLForMetal : public TOutputVulkanGLSL
}; };
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_OUTPUTVULKANGLSLFORMETAL_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// TranslatorMetal: // TranslatorMetal:
// A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl. // A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl.
// It takes into account some considerations for Metal backend also. // It takes into account some considerations for Metal backend also.
// The shaders are then fed into glslang to spit out SPIR-V (libANGLE-side). // The shaders are then fed into glslang to spit out SPIR-V.
// See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt // See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt
// //
// The SPIR-V will then be translated to Metal Shading Language later in Metal backend. // The SPIR-V will then be translated to Metal Shading Language later in Metal backend.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// TranslatorMetal: // TranslatorMetal:
// A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl. // A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl.
// It takes into account some considerations for Metal backend also. // It takes into account some considerations for Metal backend also.
// The shaders are then fed into glslang to spit out SPIR-V (libANGLE-side). // The shaders are then fed into glslang to spit out SPIR-V.
// See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt // See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt
// //
// The SPIR-V will then be translated to Metal Shading Language later in Metal backend. // The SPIR-V will then be translated to Metal Shading Language later in Metal backend.
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// TranslatorVulkan: // TranslatorVulkan:
// A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl. // A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl and feeds them into
// The shaders are then fed into glslang to spit out SPIR-V (libANGLE-side). // glslang to spit out SPIR-V.
// See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt // See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt
// //
...@@ -1295,7 +1295,7 @@ bool TranslatorVulkan::translate(TIntermBlock *root, ...@@ -1295,7 +1295,7 @@ bool TranslatorVulkan::translate(TIntermBlock *root,
TInfoSinkBase &sink = getInfoSink().obj; TInfoSinkBase &sink = getInfoSink().obj;
bool precisionEmulation = false; bool precisionEmulation = false;
if (!emulatePrecisionIfNeeded(root, sink, &precisionEmulation, SH_GLSL_VULKAN_OUTPUT)) if (!emulatePrecisionIfNeeded(root, sink, &precisionEmulation, SH_SPIRV_VULKAN_OUTPUT))
return false; return false;
bool enablePrecision = (compileOptions & SH_IGNORE_PRECISION_QUALIFIERS) == 0; bool enablePrecision = (compileOptions & SH_IGNORE_PRECISION_QUALIFIERS) == 0;
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
// TranslatorVulkan: // TranslatorVulkan:
// A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl. // A GLSL-based translator that outputs shaders that fit GL_KHR_vulkan_glsl and feeds them into
// The shaders are then fed into glslang to spit out SPIR-V (libANGLE-side). // glslang to spit out SPIR-V.
// See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt // See: https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt
// //
......
...@@ -863,11 +863,11 @@ bool IsOutputHLSL(ShShaderOutput output) ...@@ -863,11 +863,11 @@ bool IsOutputHLSL(ShShaderOutput output)
} }
bool IsOutputVulkan(ShShaderOutput output) bool IsOutputVulkan(ShShaderOutput output)
{ {
return output == SH_GLSL_VULKAN_OUTPUT; return output == SH_SPIRV_VULKAN_OUTPUT;
} }
bool IsOutputMetal(ShShaderOutput output) bool IsOutputMetal(ShShaderOutput output)
{ {
return output == SH_GLSL_METAL_OUTPUT; return output == SH_SPIRV_METAL_OUTPUT;
} }
bool IsInShaderStorageBlock(TIntermTyped *node) bool IsInShaderStorageBlock(TIntermTyped *node)
......
...@@ -20,7 +20,7 @@ CompilerMtl::~CompilerMtl() {} ...@@ -20,7 +20,7 @@ CompilerMtl::~CompilerMtl() {}
ShShaderOutput CompilerMtl::getTranslatorOutputType() const ShShaderOutput CompilerMtl::getTranslatorOutputType() const
{ {
return SH_GLSL_METAL_OUTPUT; return SH_SPIRV_METAL_OUTPUT;
} }
} // namespace rx } // namespace rx
...@@ -20,7 +20,7 @@ CompilerVk::~CompilerVk() {} ...@@ -20,7 +20,7 @@ CompilerVk::~CompilerVk() {}
ShShaderOutput CompilerVk::getTranslatorOutputType() const ShShaderOutput CompilerVk::getTranslatorOutputType() const
{ {
return SH_GLSL_VULKAN_OUTPUT; return SH_SPIRV_VULKAN_OUTPUT;
} }
} // namespace rx } // namespace rx
...@@ -106,7 +106,7 @@ TEST_P(APPLEClipDistanceTest, CompileSucceedsVulkan) ...@@ -106,7 +106,7 @@ TEST_P(APPLEClipDistanceTest, CompileSucceedsVulkan)
mResources.APPLE_clip_distance = 1; mResources.APPLE_clip_distance = 1;
mResources.MaxClipDistances = 8; mResources.MaxClipDistances = 8;
InitializeCompiler(SH_GLSL_VULKAN_OUTPUT); InitializeCompiler(SH_SPIRV_VULKAN_OUTPUT);
EXPECT_TRUE(TestShaderCompile(EXTPragma)); EXPECT_TRUE(TestShaderCompile(EXTPragma));
} }
#endif #endif
...@@ -118,7 +118,7 @@ TEST_P(APPLEClipDistanceTest, CompileSucceedsMetal) ...@@ -118,7 +118,7 @@ TEST_P(APPLEClipDistanceTest, CompileSucceedsMetal)
mResources.APPLE_clip_distance = 1; mResources.APPLE_clip_distance = 1;
mResources.MaxClipDistances = 8; mResources.MaxClipDistances = 8;
InitializeCompiler(SH_GLSL_METAL_OUTPUT); InitializeCompiler(SH_SPIRV_METAL_OUTPUT);
EXPECT_TRUE(TestShaderCompile(EXTPragma)); EXPECT_TRUE(TestShaderCompile(EXTPragma));
} }
#endif #endif
......
...@@ -323,7 +323,7 @@ TEST_P(EXTClipCullDistanceForVertexShaderTest, CompileSucceedsVulkan) ...@@ -323,7 +323,7 @@ TEST_P(EXTClipCullDistanceForVertexShaderTest, CompileSucceedsVulkan)
mResources.MaxCullDistances = 8; mResources.MaxCullDistances = 8;
mResources.MaxCombinedClipAndCullDistances = 8; mResources.MaxCombinedClipAndCullDistances = 8;
InitializeCompiler(SH_GLSL_VULKAN_OUTPUT); InitializeCompiler(SH_SPIRV_VULKAN_OUTPUT);
EXPECT_TRUE(TestShaderCompile(EXTPragma)); EXPECT_TRUE(TestShaderCompile(EXTPragma));
EXPECT_FALSE(TestShaderCompile("")); EXPECT_FALSE(TestShaderCompile(""));
EXPECT_TRUE(TestShaderCompile(EXTPragma)); EXPECT_TRUE(TestShaderCompile(EXTPragma));
...@@ -358,7 +358,7 @@ TEST_P(EXTClipCullDistanceForFragmentShaderTest, CompileSucceedsVulkan) ...@@ -358,7 +358,7 @@ TEST_P(EXTClipCullDistanceForFragmentShaderTest, CompileSucceedsVulkan)
mResources.MaxCullDistances = 8; mResources.MaxCullDistances = 8;
mResources.MaxCombinedClipAndCullDistances = 8; mResources.MaxCombinedClipAndCullDistances = 8;
InitializeCompiler(SH_GLSL_VULKAN_OUTPUT); InitializeCompiler(SH_SPIRV_VULKAN_OUTPUT);
EXPECT_TRUE(TestShaderCompile(EXTPragma)); EXPECT_TRUE(TestShaderCompile(EXTPragma));
EXPECT_FALSE(TestShaderCompile("")); EXPECT_FALSE(TestShaderCompile(""));
EXPECT_TRUE(TestShaderCompile(EXTPragma)); EXPECT_TRUE(TestShaderCompile(EXTPragma));
...@@ -380,7 +380,7 @@ TEST_P(EXTClipCullDistanceForVertexShaderCompileFailureTest, CompileFails) ...@@ -380,7 +380,7 @@ TEST_P(EXTClipCullDistanceForVertexShaderCompileFailureTest, CompileFails)
mResources.MaxCullDistances = 8; mResources.MaxCullDistances = 8;
mResources.MaxCombinedClipAndCullDistances = 8; mResources.MaxCombinedClipAndCullDistances = 8;
InitializeCompiler(SH_GLSL_VULKAN_OUTPUT); InitializeCompiler(SH_SPIRV_VULKAN_OUTPUT);
EXPECT_FALSE(TestShaderCompile(EXTPragma)); EXPECT_FALSE(TestShaderCompile(EXTPragma));
} }
...@@ -392,7 +392,7 @@ TEST_P(EXTClipCullDistanceForFragmentShaderCompileFailureTest, CompileFails) ...@@ -392,7 +392,7 @@ TEST_P(EXTClipCullDistanceForFragmentShaderCompileFailureTest, CompileFails)
mResources.MaxCullDistances = 8; mResources.MaxCullDistances = 8;
mResources.MaxCombinedClipAndCullDistances = 8; mResources.MaxCombinedClipAndCullDistances = 8;
InitializeCompiler(SH_GLSL_VULKAN_OUTPUT); InitializeCompiler(SH_SPIRV_VULKAN_OUTPUT);
EXPECT_FALSE(TestShaderCompile(EXTPragma)); EXPECT_FALSE(TestShaderCompile(EXTPragma));
} }
#endif #endif
......
...@@ -126,7 +126,7 @@ class EXTShaderFramebufferFetchNoncoherentTest : public sh::ShaderExtensionTest ...@@ -126,7 +126,7 @@ class EXTShaderFramebufferFetchNoncoherentTest : public sh::ShaderExtensionTest
std::map<ShShaderOutput, std::string> shaderOutputList = { std::map<ShShaderOutput, std::string> shaderOutputList = {
{SH_GLSL_450_CORE_OUTPUT, "SH_GLSL_450_CORE_OUTPUT"}, {SH_GLSL_450_CORE_OUTPUT, "SH_GLSL_450_CORE_OUTPUT"},
#if defined(ANGLE_ENABLE_VULKAN) #if defined(ANGLE_ENABLE_VULKAN)
{SH_GLSL_VULKAN_OUTPUT, "SH_GLSL_VULKAN_OUTPUT"} {SH_SPIRV_VULKAN_OUTPUT, "SH_SPIRV_VULKAN_OUTPUT"}
#endif #endif
}; };
...@@ -330,7 +330,7 @@ class EXTShaderFramebufferFetchNoncoherentSuccessTest ...@@ -330,7 +330,7 @@ class EXTShaderFramebufferFetchNoncoherentSuccessTest
void SetUp() override void SetUp() override
{ {
std::map<ShShaderOutput, std::string> shaderOutputList = { std::map<ShShaderOutput, std::string> shaderOutputList = {
{SH_GLSL_VULKAN_OUTPUT, "SH_GLSL_VULKAN_OUTPUT"}}; {SH_SPIRV_VULKAN_OUTPUT, "SH_SPIRV_VULKAN_OUTPUT"}};
Initialize(shaderOutputList); Initialize(shaderOutputList);
} }
......
...@@ -72,7 +72,7 @@ TEST_F(EmulateGLBaseVertexBaseInstanceTest, EmulatesUniform) ...@@ -72,7 +72,7 @@ TEST_F(EmulateGLBaseVertexBaseInstanceTest, EmulatesUniform)
addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT); addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT);
addOutputType(SH_ESSL_OUTPUT); addOutputType(SH_ESSL_OUTPUT);
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
addOutputType(SH_GLSL_VULKAN_OUTPUT); addOutputType(SH_SPIRV_VULKAN_OUTPUT);
#endif #endif
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
addOutputType(SH_HLSL_3_0_OUTPUT); addOutputType(SH_HLSL_3_0_OUTPUT);
...@@ -101,7 +101,7 @@ TEST_F(EmulateGLBaseVertexBaseInstanceTest, EmulatesUniform) ...@@ -101,7 +101,7 @@ TEST_F(EmulateGLBaseVertexBaseInstanceTest, EmulatesUniform)
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
EXPECT_TRUE(foundInCode( EXPECT_TRUE(foundInCode(
SH_GLSL_VULKAN_OUTPUT, SH_SPIRV_VULKAN_OUTPUT,
"uniform defaultUniformsVS\n{\n int angle_BaseInstance;\n int angle_BaseVertex;")); "uniform defaultUniformsVS\n{\n int angle_BaseInstance;\n int angle_BaseVertex;"));
#endif #endif
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
...@@ -191,7 +191,7 @@ TEST_F(EmulateGLBaseVertexBaseInstanceTest, AllowsUserDefinedANGLEDrawID) ...@@ -191,7 +191,7 @@ TEST_F(EmulateGLBaseVertexBaseInstanceTest, AllowsUserDefinedANGLEDrawID)
addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT); addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT);
addOutputType(SH_ESSL_OUTPUT); addOutputType(SH_ESSL_OUTPUT);
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
addOutputType(SH_GLSL_VULKAN_OUTPUT); addOutputType(SH_SPIRV_VULKAN_OUTPUT);
#endif #endif
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
addOutputType(SH_HLSL_3_0_OUTPUT); addOutputType(SH_HLSL_3_0_OUTPUT);
......
...@@ -73,7 +73,7 @@ TEST_F(EmulateGLDrawIDTest, EmulatesUniform) ...@@ -73,7 +73,7 @@ TEST_F(EmulateGLDrawIDTest, EmulatesUniform)
addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT); addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT);
addOutputType(SH_ESSL_OUTPUT); addOutputType(SH_ESSL_OUTPUT);
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
addOutputType(SH_GLSL_VULKAN_OUTPUT); addOutputType(SH_SPIRV_VULKAN_OUTPUT);
#endif #endif
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
addOutputType(SH_HLSL_3_0_OUTPUT); addOutputType(SH_HLSL_3_0_OUTPUT);
...@@ -97,7 +97,7 @@ TEST_F(EmulateGLDrawIDTest, EmulatesUniform) ...@@ -97,7 +97,7 @@ TEST_F(EmulateGLDrawIDTest, EmulatesUniform)
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
EXPECT_TRUE( EXPECT_TRUE(
foundInCode(SH_GLSL_VULKAN_OUTPUT, "uniform defaultUniformsVS\n{\n int angle_DrawID;")); foundInCode(SH_SPIRV_VULKAN_OUTPUT, "uniform defaultUniformsVS\n{\n int angle_DrawID;"));
#endif #endif
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
EXPECT_TRUE(foundInCode(SH_HLSL_3_0_OUTPUT, "uniform int angle_DrawID : register")); EXPECT_TRUE(foundInCode(SH_HLSL_3_0_OUTPUT, "uniform int angle_DrawID : register"));
...@@ -148,7 +148,7 @@ TEST_F(EmulateGLDrawIDTest, AllowsUserDefinedANGLEDrawID) ...@@ -148,7 +148,7 @@ TEST_F(EmulateGLDrawIDTest, AllowsUserDefinedANGLEDrawID)
addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT); addOutputType(SH_GLSL_COMPATIBILITY_OUTPUT);
addOutputType(SH_ESSL_OUTPUT); addOutputType(SH_ESSL_OUTPUT);
#ifdef ANGLE_ENABLE_VULKAN #ifdef ANGLE_ENABLE_VULKAN
addOutputType(SH_GLSL_VULKAN_OUTPUT); addOutputType(SH_SPIRV_VULKAN_OUTPUT);
#endif #endif
#ifdef ANGLE_ENABLE_HLSL #ifdef ANGLE_ENABLE_HLSL
addOutputType(SH_HLSL_3_0_OUTPUT); addOutputType(SH_HLSL_3_0_OUTPUT);
......
...@@ -113,7 +113,7 @@ TEST_P(OESSampleVariablesTestES31, CompileFailsWithExtensionWithoutPragma) ...@@ -113,7 +113,7 @@ TEST_P(OESSampleVariablesTestES31, CompileFailsWithExtensionWithoutPragma)
TEST_P(OESSampleVariablesTestES31, CompileSucceedsWithExtensionAndPragmaOnVulkan) TEST_P(OESSampleVariablesTestES31, CompileSucceedsWithExtensionAndPragmaOnVulkan)
{ {
mResources.OES_sample_variables = 1; mResources.OES_sample_variables = 1;
InitializeCompiler(SH_GLSL_VULKAN_OUTPUT); InitializeCompiler(SH_SPIRV_VULKAN_OUTPUT);
EXPECT_TRUE(TestShaderCompile(OESPragma)); EXPECT_TRUE(TestShaderCompile(OESPragma));
// Test reset functionality. // Test reset functionality.
EXPECT_FALSE(TestShaderCompile("")); EXPECT_FALSE(TestShaderCompile(""));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment