mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
Additional fixes
This commit is contained in:
1 parent
69c8912b93
commit
fb2ac3a67e
4 files changed
+22
-5
No files matched your search
@@ -72,6 +72,11 @@ bool GenerateVertexShaderHLSL(const VShaderID &id, char *buffer, ShaderLanguage
|
||||
|
||||
bool doBezier = id.Bit(VS_BIT_BEZIER) && !enableBones && useHWTransform;
|
||||
bool doSpline = id.Bit(VS_BIT_SPLINE) && !enableBones && useHWTransform;
|
||||
if ((doBezier || doSpline) && !hasNormal) {
|
||||
// Bad usage.
|
||||
*errorString = "Invalid flags - tess requires normal.";
|
||||
return false;
|
||||
}
|
||||
bool hasColorTess = id.Bit(VS_BIT_HAS_COLOR_TESS);
|
||||
bool hasTexcoordTess = id.Bit(VS_BIT_HAS_TEXCOORD_TESS);
|
||||
bool hasNormalTess = id.Bit(VS_BIT_HAS_NORMAL_TESS);
|
||||
|
||||
@@ -163,8 +163,13 @@ bool GenerateVertexShaderGLSL(const VShaderID &id, char *buffer, const GLSLShade
|
||||
int matUpdate = id.Bits(VS_BIT_MATERIAL_UPDATE, 3);
|
||||
|
||||
// Apparently we don't support bezier/spline together with bones.
|
||||
bool doBezier = id.Bit(VS_BIT_BEZIER) && !enableBones;
|
||||
bool doSpline = id.Bit(VS_BIT_SPLINE) && !enableBones;
|
||||
bool doBezier = id.Bit(VS_BIT_BEZIER) && !enableBones && useHWTransform;
|
||||
bool doSpline = id.Bit(VS_BIT_SPLINE) && !enableBones && useHWTransform;
|
||||
if ((doBezier || doSpline) && !hasNormal) {
|
||||
// Bad usage.
|
||||
*errorString = "Invalid flags - tess requires normal.";
|
||||
return false;
|
||||
}
|
||||
bool hasColorTess = id.Bit(VS_BIT_HAS_COLOR_TESS);
|
||||
bool hasTexcoordTess = id.Bit(VS_BIT_HAS_TEXCOORD_TESS);
|
||||
bool hasNormalTess = id.Bit(VS_BIT_HAS_NORMAL_TESS);
|
||||
|
||||
@@ -123,6 +123,13 @@ bool GenerateVertexShaderVulkanGLSL(const VShaderID &id, char *buffer, std::stri
|
||||
|
||||
bool doBezier = id.Bit(VS_BIT_BEZIER) && !enableBones && useHWTransform;
|
||||
bool doSpline = id.Bit(VS_BIT_SPLINE) && !enableBones && useHWTransform;
|
||||
|
||||
if ((doBezier || doSpline) && !hasNormal) {
|
||||
// Bad usage.
|
||||
*errorString = "Invalid flags - tess requires normal.";
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasColorTess = id.Bit(VS_BIT_HAS_COLOR_TESS);
|
||||
bool hasTexcoordTess = id.Bit(VS_BIT_HAS_TEXCOORD_TESS);
|
||||
bool hasNormalTess = id.Bit(VS_BIT_HAS_NORMAL_TESS);
|
||||
|
||||
@@ -173,15 +173,15 @@ bool TestShaderGenerators() {
|
||||
}
|
||||
|
||||
if (generateSuccess[0] != generateSuccess[1]) {
|
||||
printf("mismatching success! %s %s\n", genErrorString[0].c_str(), genErrorString[1].c_str());
|
||||
printf("mismatching success! '%s' '%s'\n", genErrorString[0].c_str(), genErrorString[1].c_str());
|
||||
printf("%s\n", buffer[0]);
|
||||
printf("%s\n", buffer[1]);
|
||||
return 1;
|
||||
return false;
|
||||
}
|
||||
if (generateSuccess[0] && strcmp(buffer[0], buffer[1])) {
|
||||
printf("mismatching shaders! a=glsl b=vulkan\n");
|
||||
PrintDiff(buffer[0], buffer[1]);
|
||||
return 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now that we have the strings ready for easy comparison (buffer,4 in the watch window),
|
||||
|
||||
Reference in new issue
Block a user