mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Minimize the Adreno shader compiler bug repro test
This commit is contained in:
parent
c18142b41e
commit
c251d69eab
2 changed files with 6 additions and 9 deletions
|
@ -215,7 +215,7 @@ bool VKShaderModule::Compile(VulkanContext *vulkan, ShaderLanguage language, con
|
|||
std::vector<uint32_t> spirv;
|
||||
std::string errorMessage;
|
||||
if (!GLSLtoSPV(vkstage_, source_.c_str(), GLSLVariant::VULKAN, spirv, &errorMessage)) {
|
||||
INFO_LOG(G3D, "Shader compile to module failed: %s", errorMessage.c_str());
|
||||
WARN_LOG(G3D, "Shader compile to module failed: %s", errorMessage.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -231,6 +231,7 @@ bool VKShaderModule::Compile(VulkanContext *vulkan, ShaderLanguage language, con
|
|||
if (vulkan->CreateShaderModule(spirv, &module_)) {
|
||||
ok_ = true;
|
||||
} else {
|
||||
WARN_LOG(G3D, "vkCreateShaderModule failed");
|
||||
ok_ = false;
|
||||
}
|
||||
return ok_;
|
||||
|
@ -1281,7 +1282,7 @@ ShaderModule *VKContext::CreateShaderModule(ShaderStage stage, ShaderLanguage la
|
|||
if (shader->Compile(vulkan_, language, data, size)) {
|
||||
return shader;
|
||||
} else {
|
||||
ERROR_LOG(G3D, "Failed to compile shader: %s", (const char *)data);
|
||||
ERROR_LOG(G3D, "Failed to compile shader:\n%s", (const char *)data);
|
||||
shader->Release();
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -82,16 +82,12 @@ static const std::vector<Draw::ShaderSource> fsAdrenoLogicTest = {
|
|||
R"(#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
precision lowp float;
|
||||
layout(location = 0) flat in lowp vec4 oColor0;
|
||||
layout(location = 0) in vec4 oColor0;
|
||||
layout(location = 1) in highp vec2 oTexCoord0;
|
||||
layout(location = 0) out vec4 fragColor0;
|
||||
layout(set = 0, binding = 1) uniform sampler2D Sampler0;
|
||||
void main() {
|
||||
vec4 t = texture(Sampler0, oTexCoord0).aaaa;
|
||||
vec4 p = oColor0;
|
||||
vec4 v = p * t;
|
||||
v.rgb = clamp(v.rgb * 2.0, 0.0, 1.0);
|
||||
vec4 v = texture(Sampler0, oTexCoord0).aaaa * oColor0;
|
||||
if (v.r < 0.2 && v.g < 0.2 && v.b < 0.2) discard;
|
||||
fragColor0 = vec4(0.0, 1.0, 0.0, 1.0);
|
||||
})"
|
||||
|
@ -126,7 +122,7 @@ static const std::vector<Draw::ShaderSource> vsAdrenoLogicTest = {
|
|||
"layout (location = 0) in vec4 pos;\n"
|
||||
"layout (location = 1) in vec4 inColor;\n"
|
||||
"layout (location = 2) in vec2 inTexCoord;\n"
|
||||
"layout (location = 0) out lowp vec4 outColor;\n"
|
||||
"layout (location = 0) out vec4 outColor;\n"
|
||||
"layout (location = 1) out highp vec2 outTexCoord;\n"
|
||||
"out gl_PerVertex { vec4 gl_Position; };\n"
|
||||
"void main() {\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue