#endif
#ifdef _WIN32
-#define ERR_EXIT(err_msg, err_class) \
- do { \
- MessageBox(NULL, err_msg, err_class, MB_OK); \
- exit(1); \
+#define ERR_EXIT(err_msg, err_class) \
+ do { \
+ MessageBox(NULL, err_msg, err_class, MB_OK); \
+ exit(1); \
} while (0)
#else // _WIN32
-#define ERR_EXIT(err_msg, err_class) \
- do { \
- printf(err_msg); \
- fflush(stdout); \
- exit(1); \
+#define ERR_EXIT(err_msg, err_class) \
+ do { \
+ printf(err_msg); \
+ fflush(stdout); \
+ exit(1); \
} while (0)
#endif // _WIN32
-#define GET_INSTANCE_PROC_ADDR(inst, entrypoint) \
- { \
- m_fp##entrypoint = \
- (PFN_vk##entrypoint)vkGetInstanceProcAddr(inst, "vk" #entrypoint); \
- if (m_fp##entrypoint == NULL) { \
- ERR_EXIT("vkGetInstanceProcAddr failed to find vk" #entrypoint, \
- "vkGetInstanceProcAddr Failure"); \
- } \
+#define GET_INSTANCE_PROC_ADDR(inst, entrypoint) \
+ { \
+ m_fp##entrypoint = (PFN_vk##entrypoint)vkGetInstanceProcAddr(inst, "vk" #entrypoint); \
+ if (m_fp##entrypoint == NULL) { \
+ ERR_EXIT("vkGetInstanceProcAddr failed to find vk" #entrypoint, "vkGetInstanceProcAddr Failure"); \
+ } \
}
-#define GET_DEVICE_PROC_ADDR(dev, entrypoint) \
- { \
- m_fp##entrypoint = \
- (PFN_vk##entrypoint)vkGetDeviceProcAddr(dev, "vk" #entrypoint); \
- if (m_fp##entrypoint == NULL) { \
- ERR_EXIT("vkGetDeviceProcAddr failed to find vk" #entrypoint, \
- "vkGetDeviceProcAddr Failure"); \
- } \
+#define GET_DEVICE_PROC_ADDR(dev, entrypoint) \
+ { \
+ m_fp##entrypoint = (PFN_vk##entrypoint)vkGetDeviceProcAddr(dev, "vk" #entrypoint); \
+ if (m_fp##entrypoint == NULL) { \
+ ERR_EXIT("vkGetDeviceProcAddr failed to find vk" #entrypoint, "vkGetDeviceProcAddr Failure"); \
+ } \
}
// Command-line options
void TestEnvironment::TearDown() { glslang::FinalizeProcess(); }
-VkTestFramework::VkTestFramework()
- : m_compile_options(0), m_num_shader_strings(0) {}
+VkTestFramework::VkTestFramework() : m_compile_options(0), m_num_shader_strings(0) {}
VkTestFramework::~VkTestFramework() {}
"\t\tSave tests images as ppm files in current working "
"directory.\n"
"\t\tUsed to generate golden images for compare-images.\n");
- printf(
- "\t--compare-images\n"
- "\t\tCompare test images to 'golden' image in golden folder.\n"
- "\t\tAlso saves the generated test image in current working\n"
- "\t\t\tdirectory but only if the image is different from the "
- "golden\n"
- "\t\tSetting RENDERTEST_GOLDEN_DIR environment variable can "
- "specify\n"
- "\t\t\tdifferent directory for golden images\n"
- "\t\tSignal test failure if different.\n");
- printf(
- "\t--no-SPV\n"
- "\t\tUse built-in GLSL compiler rather than SPV code path.\n");
+ printf("\t--compare-images\n"
+ "\t\tCompare test images to 'golden' image in golden folder.\n"
+ "\t\tAlso saves the generated test image in current working\n"
+ "\t\t\tdirectory but only if the image is different from the "
+ "golden\n"
+ "\t\tSetting RENDERTEST_GOLDEN_DIR environment variable can "
+ "specify\n"
+ "\t\t\tdifferent directory for golden images\n"
+ "\t\tSignal test failure if different.\n");
+ printf("\t--no-SPV\n"
+ "\t\tUse built-in GLSL compiler rather than SPV code path.\n");
printf("\t--strip-SPV\n"
"\t\tStrip SPIR-V debug information (line numbers, names, "
"etc).\n");
- printf(
- "\t--canonicalize-SPV\n"
- "\t\tRemap SPIR-V ids before submission to aid compression.\n");
+ printf("\t--canonicalize-SPV\n"
+ "\t\tRemap SPIR-V ids before submission to aid compression.\n");
exit(0);
} else {
printf("\nUnrecognized option: %s\n", argv[i]);
}
}
-VkFormat VkTestFramework::GetFormat(VkInstance instance,
- vk_testing::Device *device) {
+VkFormat VkTestFramework::GetFormat(VkInstance instance, vk_testing::Device *device) {
VkFormatProperties format_props;
- vkGetPhysicalDeviceFormatProperties(
- device->phy().handle(), VK_FORMAT_B8G8R8A8_UNORM, &format_props);
- if (format_props.linearTilingFeatures &
- VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT ||
- format_props.optimalTilingFeatures &
- VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) {
+ vkGetPhysicalDeviceFormatProperties(device->phy().handle(), VK_FORMAT_B8G8R8A8_UNORM, &format_props);
+ if (format_props.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT ||
+ format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) {
return VK_FORMAT_B8G8R8A8_UNORM;
}
- vkGetPhysicalDeviceFormatProperties(
- device->phy().handle(), VK_FORMAT_R8G8B8A8_UNORM, &format_props);
- if (format_props.linearTilingFeatures &
- VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT ||
- format_props.optimalTilingFeatures &
- VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) {
+ vkGetPhysicalDeviceFormatProperties(device->phy().handle(), VK_FORMAT_R8G8B8A8_UNORM, &format_props);
+ if (format_props.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT ||
+ format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) {
return VK_FORMAT_R8G8B8A8_UNORM;
}
printf("Error - device does not support VK_FORMAT_B8G8R8A8_UNORM nor "
// - parsing this string for the case where the user didn't supply one
// - dumping out a template for user construction of a config file
//
-static const char *DefaultConfig =
- "MaxLights 32\n"
- "MaxClipPlanes 6\n"
- "MaxTextureUnits 32\n"
- "MaxTextureCoords 32\n"
- "MaxVertexAttribs 64\n"
- "MaxVertexUniformComponents 4096\n"
- "MaxVaryingFloats 64\n"
- "MaxVertexTextureImageUnits 32\n"
- "MaxCombinedTextureImageUnits 80\n"
- "MaxTextureImageUnits 32\n"
- "MaxFragmentUniformComponents 4096\n"
- "MaxDrawBuffers 32\n"
- "MaxVertexUniformVectors 128\n"
- "MaxVaryingVectors 8\n"
- "MaxFragmentUniformVectors 16\n"
- "MaxVertexOutputVectors 16\n"
- "MaxFragmentInputVectors 15\n"
- "MinProgramTexelOffset -8\n"
- "MaxProgramTexelOffset 7\n"
- "MaxClipDistances 8\n"
- "MaxComputeWorkGroupCountX 65535\n"
- "MaxComputeWorkGroupCountY 65535\n"
- "MaxComputeWorkGroupCountZ 65535\n"
- "MaxComputeWorkGroupSizeX 1024\n"
- "MaxComputeWorkGroupSizeY 1024\n"
- "MaxComputeWorkGroupSizeZ 64\n"
- "MaxComputeUniformComponents 1024\n"
- "MaxComputeTextureImageUnits 16\n"
- "MaxComputeImageUniforms 8\n"
- "MaxComputeAtomicCounters 8\n"
- "MaxComputeAtomicCounterBuffers 1\n"
- "MaxVaryingComponents 60\n"
- "MaxVertexOutputComponents 64\n"
- "MaxGeometryInputComponents 64\n"
- "MaxGeometryOutputComponents 128\n"
- "MaxFragmentInputComponents 128\n"
- "MaxImageUnits 8\n"
- "MaxCombinedImageUnitsAndFragmentOutputs 8\n"
- "MaxCombinedShaderOutputResources 8\n"
- "MaxImageSamples 0\n"
- "MaxVertexImageUniforms 0\n"
- "MaxTessControlImageUniforms 0\n"
- "MaxTessEvaluationImageUniforms 0\n"
- "MaxGeometryImageUniforms 0\n"
- "MaxFragmentImageUniforms 8\n"
- "MaxCombinedImageUniforms 8\n"
- "MaxGeometryTextureImageUnits 16\n"
- "MaxGeometryOutputVertices 256\n"
- "MaxGeometryTotalOutputComponents 1024\n"
- "MaxGeometryUniformComponents 1024\n"
- "MaxGeometryVaryingComponents 64\n"
- "MaxTessControlInputComponents 128\n"
- "MaxTessControlOutputComponents 128\n"
- "MaxTessControlTextureImageUnits 16\n"
- "MaxTessControlUniformComponents 1024\n"
- "MaxTessControlTotalOutputComponents 4096\n"
- "MaxTessEvaluationInputComponents 128\n"
- "MaxTessEvaluationOutputComponents 128\n"
- "MaxTessEvaluationTextureImageUnits 16\n"
- "MaxTessEvaluationUniformComponents 1024\n"
- "MaxTessPatchComponents 120\n"
- "MaxPatchVertices 32\n"
- "MaxTessGenLevel 64\n"
- "MaxViewports 16\n"
- "MaxVertexAtomicCounters 0\n"
- "MaxTessControlAtomicCounters 0\n"
- "MaxTessEvaluationAtomicCounters 0\n"
- "MaxGeometryAtomicCounters 0\n"
- "MaxFragmentAtomicCounters 8\n"
- "MaxCombinedAtomicCounters 8\n"
- "MaxAtomicCounterBindings 1\n"
- "MaxVertexAtomicCounterBuffers 0\n"
- "MaxTessControlAtomicCounterBuffers 0\n"
- "MaxTessEvaluationAtomicCounterBuffers 0\n"
- "MaxGeometryAtomicCounterBuffers 0\n"
- "MaxFragmentAtomicCounterBuffers 1\n"
- "MaxCombinedAtomicCounterBuffers 1\n"
- "MaxAtomicCounterBufferSize 16384\n"
- "MaxTransformFeedbackBuffers 4\n"
- "MaxTransformFeedbackInterleavedComponents 64\n"
- "MaxCullDistances 8\n"
- "MaxCombinedClipAndCullDistances 8\n"
- "MaxSamples 4\n"
-
- "nonInductiveForLoops 1\n"
- "whileLoops 1\n"
- "doWhileLoops 1\n"
- "generalUniformIndexing 1\n"
- "generalAttributeMatrixVectorIndexing 1\n"
- "generalVaryingIndexing 1\n"
- "generalSamplerIndexing 1\n"
- "generalVariableIndexing 1\n"
- "generalConstantMatrixVectorIndexing 1\n";
+static const char *DefaultConfig = "MaxLights 32\n"
+ "MaxClipPlanes 6\n"
+ "MaxTextureUnits 32\n"
+ "MaxTextureCoords 32\n"
+ "MaxVertexAttribs 64\n"
+ "MaxVertexUniformComponents 4096\n"
+ "MaxVaryingFloats 64\n"
+ "MaxVertexTextureImageUnits 32\n"
+ "MaxCombinedTextureImageUnits 80\n"
+ "MaxTextureImageUnits 32\n"
+ "MaxFragmentUniformComponents 4096\n"
+ "MaxDrawBuffers 32\n"
+ "MaxVertexUniformVectors 128\n"
+ "MaxVaryingVectors 8\n"
+ "MaxFragmentUniformVectors 16\n"
+ "MaxVertexOutputVectors 16\n"
+ "MaxFragmentInputVectors 15\n"
+ "MinProgramTexelOffset -8\n"
+ "MaxProgramTexelOffset 7\n"
+ "MaxClipDistances 8\n"
+ "MaxComputeWorkGroupCountX 65535\n"
+ "MaxComputeWorkGroupCountY 65535\n"
+ "MaxComputeWorkGroupCountZ 65535\n"
+ "MaxComputeWorkGroupSizeX 1024\n"
+ "MaxComputeWorkGroupSizeY 1024\n"
+ "MaxComputeWorkGroupSizeZ 64\n"
+ "MaxComputeUniformComponents 1024\n"
+ "MaxComputeTextureImageUnits 16\n"
+ "MaxComputeImageUniforms 8\n"
+ "MaxComputeAtomicCounters 8\n"
+ "MaxComputeAtomicCounterBuffers 1\n"
+ "MaxVaryingComponents 60\n"
+ "MaxVertexOutputComponents 64\n"
+ "MaxGeometryInputComponents 64\n"
+ "MaxGeometryOutputComponents 128\n"
+ "MaxFragmentInputComponents 128\n"
+ "MaxImageUnits 8\n"
+ "MaxCombinedImageUnitsAndFragmentOutputs 8\n"
+ "MaxCombinedShaderOutputResources 8\n"
+ "MaxImageSamples 0\n"
+ "MaxVertexImageUniforms 0\n"
+ "MaxTessControlImageUniforms 0\n"
+ "MaxTessEvaluationImageUniforms 0\n"
+ "MaxGeometryImageUniforms 0\n"
+ "MaxFragmentImageUniforms 8\n"
+ "MaxCombinedImageUniforms 8\n"
+ "MaxGeometryTextureImageUnits 16\n"
+ "MaxGeometryOutputVertices 256\n"
+ "MaxGeometryTotalOutputComponents 1024\n"
+ "MaxGeometryUniformComponents 1024\n"
+ "MaxGeometryVaryingComponents 64\n"
+ "MaxTessControlInputComponents 128\n"
+ "MaxTessControlOutputComponents 128\n"
+ "MaxTessControlTextureImageUnits 16\n"
+ "MaxTessControlUniformComponents 1024\n"
+ "MaxTessControlTotalOutputComponents 4096\n"
+ "MaxTessEvaluationInputComponents 128\n"
+ "MaxTessEvaluationOutputComponents 128\n"
+ "MaxTessEvaluationTextureImageUnits 16\n"
+ "MaxTessEvaluationUniformComponents 1024\n"
+ "MaxTessPatchComponents 120\n"
+ "MaxPatchVertices 32\n"
+ "MaxTessGenLevel 64\n"
+ "MaxViewports 16\n"
+ "MaxVertexAtomicCounters 0\n"
+ "MaxTessControlAtomicCounters 0\n"
+ "MaxTessEvaluationAtomicCounters 0\n"
+ "MaxGeometryAtomicCounters 0\n"
+ "MaxFragmentAtomicCounters 8\n"
+ "MaxCombinedAtomicCounters 8\n"
+ "MaxAtomicCounterBindings 1\n"
+ "MaxVertexAtomicCounterBuffers 0\n"
+ "MaxTessControlAtomicCounterBuffers 0\n"
+ "MaxTessEvaluationAtomicCounterBuffers 0\n"
+ "MaxGeometryAtomicCounterBuffers 0\n"
+ "MaxFragmentAtomicCounterBuffers 1\n"
+ "MaxCombinedAtomicCounterBuffers 1\n"
+ "MaxAtomicCounterBufferSize 16384\n"
+ "MaxTransformFeedbackBuffers 4\n"
+ "MaxTransformFeedbackInterleavedComponents 64\n"
+ "MaxCullDistances 8\n"
+ "MaxCombinedClipAndCullDistances 8\n"
+ "MaxSamples 4\n"
+
+ "nonInductiveForLoops 1\n"
+ "whileLoops 1\n"
+ "doWhileLoops 1\n"
+ "generalUniformIndexing 1\n"
+ "generalAttributeMatrixVectorIndexing 1\n"
+ "generalVaryingIndexing 1\n"
+ "generalSamplerIndexing 1\n"
+ "generalVariableIndexing 1\n"
+ "generalConstantMatrixVectorIndexing 1\n";
//
// *.conf => this is a config file that can set limits/resources
const char *token = strtok(config, delims);
while (token) {
const char *valueStr = strtok(0, delims);
- if (valueStr == 0 ||
- !(valueStr[0] == '-' ||
- (valueStr[0] >= '0' && valueStr[0] <= '9'))) {
+ if (valueStr == 0 || !(valueStr[0] == '-' || (valueStr[0] >= '0' && valueStr[0] <= '9'))) {
printf("Error: '%s' bad .conf file. Each name must be followed by "
"one number.\n",
valueStr ? valueStr : "");
Resources.maxAtomicCounterBufferSize = value;
else if (strcmp(token, "MaxTransformFeedbackBuffers") == 0)
Resources.maxTransformFeedbackBuffers = value;
- else if (strcmp(token, "MaxTransformFeedbackInterleavedComponents") ==
- 0)
+ else if (strcmp(token, "MaxTransformFeedbackInterleavedComponents") == 0)
Resources.maxTransformFeedbackInterleavedComponents = value;
else if (strcmp(token, "MaxCullDistances") == 0)
Resources.maxCullDistances = value;
else if (strcmp(token, "generalUniformIndexing") == 0)
Resources.limits.generalUniformIndexing = (value != 0);
else if (strcmp(token, "generalAttributeMatrixVectorIndexing") == 0)
- Resources.limits.generalAttributeMatrixVectorIndexing =
- (value != 0);
+ Resources.limits.generalAttributeMatrixVectorIndexing = (value != 0);
else if (strcmp(token, "generalVaryingIndexing") == 0)
Resources.limits.generalVaryingIndexing = (value != 0);
else if (strcmp(token, "generalSamplerIndexing") == 0)
else if (strcmp(token, "generalConstantMatrixVectorIndexing") == 0)
Resources.limits.generalConstantMatrixVectorIndexing = (value != 0);
else
- printf("Warning: unrecognized limit (%s) in configuration file.\n",
- token);
+ printf("Warning: unrecognized limit (%s) in configuration file.\n", token);
token = strtok(0, delims);
}
char *fdata;
size_t count = 0;
const int maxSourceStrings = 5;
- char **return_data =
- (char **)malloc(sizeof(char *) * (maxSourceStrings + 1));
+ char **return_data = (char **)malloc(sizeof(char *) * (maxSourceStrings + 1));
if (errorCode) {
printf("Error: unable to open input file: %s\n", fileName);
//
// Convert VK shader type to compiler's
//
-EShLanguage
-VkTestFramework::FindLanguage(const VkShaderStageFlagBits shader_type) {
+EShLanguage VkTestFramework::FindLanguage(const VkShaderStageFlagBits shader_type) {
switch (shader_type) {
case VK_SHADER_STAGE_VERTEX_BIT:
return EShLangVertex;
// Compile a given string containing GLSL into SPV for use by VK
// Return value of false means an error was encountered.
//
-bool VkTestFramework::GLSLtoSPV(const VkShaderStageFlagBits shader_type,
- const char *pshader,
- std::vector<unsigned int> &spirv) {
+bool VkTestFramework::GLSLtoSPV(const VkShaderStageFlagBits shader_type, const char *pshader, std::vector<unsigned int> &spirv) {
glslang::TProgram program;
const char *shaderStrings[1];
EShMessages messages = EShMsgDefault;
SetMessageOptions(messages);
- messages =
- static_cast<EShMessages>(messages | EShMsgSpvRules | EShMsgVulkanRules);
+ messages = static_cast<EShMessages>(messages | EShMsgSpvRules | EShMsgVulkanRules);
EShLanguage stage = FindLanguage(shader_type);
glslang::TShader *shader = new glslang::TShader(stage);
shaderStrings[0] = pshader;
shader->setStrings(shaderStrings, 1);
- if (!shader->parse(&Resources,
- (m_compile_options & EOptionDefaultDesktop) ? 110 : 100,
- false, messages)) {
+ if (!shader->parse(&Resources, (m_compile_options & EOptionDefaultDesktop) ? 110 : 100, false, messages)) {
if (!(m_compile_options & EOptionSuppressInfolog)) {
puts(shader->getInfoLog());
bool VkTestFramework::m_use_glsl = false;
-VkFormat VkTestFramework::GetFormat(VkInstance instance, vk_testing::Device *device)
-{
+VkFormat VkTestFramework::GetFormat(VkInstance instance, vk_testing::Device *device) {
VkFormatProperties format_props;
vkGetPhysicalDeviceFormatProperties(device->phy().handle(), VK_FORMAT_B8G8R8A8_UNORM, &format_props);
if (format_props.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT ||
- format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)
- {
+ format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) {
return VK_FORMAT_B8G8R8A8_UNORM;
}
vkGetPhysicalDeviceFormatProperties(device->phy().handle(), VK_FORMAT_R8G8B8A8_UNORM, &format_props);
if (format_props.linearTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT ||
- format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)
- {
+ format_props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) {
return VK_FORMAT_R8G8B8A8_UNORM;
}
printf("Error - device does not support VK_FORMAT_B8G8R8A8_UNORM nor VK_FORMAT_R8G8B8A8_UNORM - exiting\n");
exit(0);
}
-
void VkTestFramework::InitArgs(int *argc, char *argv[]) {}
void VkTestFramework::Finish() {}
-void TestEnvironment::SetUp()
-{
- vk_testing::set_error_callback(test_error_callback);
-}
+void TestEnvironment::SetUp() { vk_testing::set_error_callback(test_error_callback); }
void TestEnvironment::TearDown() {}
-
// Android specific helper functions for shaderc.
struct shader_type_mapping {
VkShaderStageFlagBits vkshader_type;
};
static const shader_type_mapping shader_map_table[] = {
- {
- VK_SHADER_STAGE_VERTEX_BIT,
- shaderc_glsl_vertex_shader
- },
- {
- VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
- shaderc_glsl_tess_control_shader
- },
- {
- VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT,
- shaderc_glsl_tess_evaluation_shader
- },
- {
- VK_SHADER_STAGE_GEOMETRY_BIT,
- shaderc_glsl_geometry_shader
- },
- {
- VK_SHADER_STAGE_FRAGMENT_BIT,
- shaderc_glsl_fragment_shader
- },
- {
- VK_SHADER_STAGE_COMPUTE_BIT,
- shaderc_glsl_compute_shader
- },
+ {VK_SHADER_STAGE_VERTEX_BIT, shaderc_glsl_vertex_shader},
+ {VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, shaderc_glsl_tess_control_shader},
+ {VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, shaderc_glsl_tess_evaluation_shader},
+ {VK_SHADER_STAGE_GEOMETRY_BIT, shaderc_glsl_geometry_shader},
+ {VK_SHADER_STAGE_FRAGMENT_BIT, shaderc_glsl_fragment_shader},
+ {VK_SHADER_STAGE_COMPUTE_BIT, shaderc_glsl_compute_shader},
};
shaderc_shader_kind MapShadercType(VkShaderStageFlagBits vkShader) {
// Compile a given string containing GLSL into SPIR-V
// Return value of false means an error was encountered
-bool VkTestFramework::GLSLtoSPV(const VkShaderStageFlagBits shader_type,
- const char *pshader,
- std::vector<unsigned int> &spirv) {
+bool VkTestFramework::GLSLtoSPV(const VkShaderStageFlagBits shader_type, const char *pshader, std::vector<unsigned int> &spirv) {
// On Android, use shaderc instead.
shaderc::Compiler compiler;
- shaderc::SpvCompilationResult result = compiler.CompileGlslToSpv(pshader, strlen(pshader),
- MapShadercType(shader_type),
- "shader");
+ shaderc::SpvCompilationResult result =
+ compiler.CompileGlslToSpv(pshader, strlen(pshader), MapShadercType(shader_type), "shader");
if (result.GetCompilationStatus() != shaderc_compilation_status_success) {
- __android_log_print(ANDROID_LOG_ERROR,
- "VkLayerValidationTest",
- "GLSLtoSPV compilation failed");
+ __android_log_print(ANDROID_LOG_ERROR, "VkLayerValidationTest", "GLSLtoSPV compilation failed");
return false;
}