mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 19:34:39 +01:00
Merge pull request #14366 from unknownbrackets/shader-errors
Fix some shader errors from reporting
This commit is contained in:
13 files changed
+69
-20
No files matched your search
@@ -199,7 +199,7 @@ void GLQueueRunner::RunInitSteps(const std::vector<GLRInitStep> &steps, bool ski
|
||||
// Dual source alpha
|
||||
glBindFragDataLocationIndexed(program->program, 0, 0, "fragColor0");
|
||||
glBindFragDataLocationIndexed(program->program, 0, 1, "fragColor1");
|
||||
} else if (gl_extensions.VersionGEThan(3, 3, 0)) {
|
||||
} else if (gl_extensions.VersionGEThan(3, 0, 0)) {
|
||||
glBindFragDataLocation(program->program, 0, "fragColor0");
|
||||
}
|
||||
#elif !PPSSPP_PLATFORM(IOS)
|
||||
|
||||
@@ -641,8 +641,12 @@ OpenGLContext::OpenGLContext() {
|
||||
} else if (gl_extensions.VersionGEThan(3, 0, 0)) {
|
||||
shaderLanguageDesc_.shaderLanguage = ShaderLanguage::GLSL_1xx;
|
||||
shaderLanguageDesc_.fragColor0 = "fragColor0";
|
||||
shaderLanguageDesc_.texture = "texture";
|
||||
shaderLanguageDesc_.bitwiseOps = true;
|
||||
shaderLanguageDesc_.texelFetch = "texelFetch";
|
||||
shaderLanguageDesc_.varying_vs = "out";
|
||||
shaderLanguageDesc_.varying_fs = "in";
|
||||
shaderLanguageDesc_.attribute = "in";
|
||||
} else {
|
||||
// This too...
|
||||
shaderLanguageDesc_.shaderLanguage = ShaderLanguage::GLSL_1xx;
|
||||
|
||||
+7
-3
@@ -949,11 +949,15 @@ static u32 sceIoGetstat(const char *filename, u32 addr) {
|
||||
}
|
||||
|
||||
static u32 sceIoChstat(const char *filename, u32 iostatptr, u32 changebits) {
|
||||
auto iostat = PSPPointer<SceIoStat>::Create(iostatptr);
|
||||
if (!iostat.IsValid())
|
||||
return hleReportError(SCEIO, SCE_KERNEL_ERROR_ERRNO_INVALID_ARGUMENT, "bad address");
|
||||
|
||||
ERROR_LOG_REPORT(SCEIO, "UNIMPL sceIoChstat(%s, %08x, %08x)", filename, iostatptr, changebits);
|
||||
if (changebits & SCE_CST_MODE)
|
||||
ERROR_LOG(SCEIO, "sceIoChstat: change mode requested");
|
||||
ERROR_LOG_REPORT(SCEIO, "sceIoChstat: change mode to %03o requested", iostat->st_mode);
|
||||
if (changebits & SCE_CST_ATTR)
|
||||
ERROR_LOG(SCEIO, "sceIoChstat: change attr requested");
|
||||
ERROR_LOG_REPORT(SCEIO, "sceIoChstat: change attr to %04x requested", iostat->st_attr);
|
||||
if (changebits & SCE_CST_SIZE)
|
||||
ERROR_LOG(SCEIO, "sceIoChstat: change size requested");
|
||||
if (changebits & SCE_CST_CT)
|
||||
@@ -961,7 +965,7 @@ static u32 sceIoChstat(const char *filename, u32 iostatptr, u32 changebits) {
|
||||
if (changebits & SCE_CST_AT)
|
||||
ERROR_LOG(SCEIO, "sceIoChstat: change access time requested");
|
||||
if (changebits & SCE_CST_MT)
|
||||
ERROR_LOG(SCEIO, "sceIoChstat: change modification time requested");
|
||||
ERROR_LOG_REPORT(SCEIO, "sceIoChstat: change modification time to %04d-%02d-%02d requested", iostat->st_m_time.year, iostat->st_m_time.month, iostat->st_m_time.day);
|
||||
if (changebits & SCE_CST_PRVT)
|
||||
ERROR_LOG(SCEIO, "sceIoChstat: change private data requested");
|
||||
return 0;
|
||||
|
||||
@@ -292,7 +292,7 @@ void GenerateDepalShaderFloat(char *buffer, GEBufferFormat pixelFormat, ShaderLa
|
||||
WRITE(p, "precision mediump float;\n");
|
||||
} else {
|
||||
WRITE(p, "#version %d\n", gl_extensions.GLSLVersion());
|
||||
if (gl_extensions.VersionGEThan(3, 3)) {
|
||||
if (gl_extensions.VersionGEThan(3, 0, 0)) {
|
||||
WRITE(p, "#define gl_FragColor fragColor0\n");
|
||||
WRITE(p, "out vec4 fragColor0;\n");
|
||||
}
|
||||
|
||||
@@ -589,8 +589,8 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
||||
WRITE(p, " uint depalOffset = ((u_depal_mask_shift_off_fmt >> 16) & 0xFFU) << 4;\n");
|
||||
WRITE(p, " uint depalFmt = (u_depal_mask_shift_off_fmt >> 24) & 0x3U;\n");
|
||||
WRITE(p, " uvec4 col; uint index0; uint index1; uint index2; uint index3;\n");
|
||||
WRITE(p, " switch (depalFmt) {\n"); // We might want to include fmt in the shader ID if this is a performance issue.
|
||||
WRITE(p, " case 0U:\n"); // 565
|
||||
WRITE(p, " switch (int(depalFmt)) {\n"); // We might want to include fmt in the shader ID if this is a performance issue.
|
||||
WRITE(p, " case 0:\n"); // 565
|
||||
WRITE(p, " col = uvec4(t.rgb * vec3(31.99, 63.99, 31.99), 0);\n");
|
||||
WRITE(p, " index0 = (col.b << 11) | (col.g << 5) | (col.r);\n");
|
||||
WRITE(p, " if (bilinear) {\n");
|
||||
@@ -602,7 +602,7 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
||||
WRITE(p, " index3 = (col.b << 11) | (col.g << 5) | (col.r);\n");
|
||||
WRITE(p, " }\n");
|
||||
WRITE(p, " break;\n");
|
||||
WRITE(p, " case 1U:\n"); // 5551
|
||||
WRITE(p, " case 1:\n"); // 5551
|
||||
WRITE(p, " col = uvec4(t.rgba * vec4(31.99, 31.99, 31.99, 1.0));\n");
|
||||
WRITE(p, " index0 = (col.a << 15) | (col.b << 10) | (col.g << 5) | (col.r);\n");
|
||||
WRITE(p, " if (bilinear) {\n");
|
||||
@@ -614,7 +614,7 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
||||
WRITE(p, " index3 = (col.a << 15) | (col.b << 10) | (col.g << 5) | (col.r);\n");
|
||||
WRITE(p, " }\n");
|
||||
WRITE(p, " break;\n");
|
||||
WRITE(p, " case 2U:\n"); // 4444
|
||||
WRITE(p, " case 2:\n"); // 4444
|
||||
WRITE(p, " col = uvec4(t.rgba * 15.99);\n");
|
||||
WRITE(p, " index0 = (col.a << 12) | (col.b << 8) | (col.g << 4) | (col.r);\n");
|
||||
WRITE(p, " if (bilinear) {\n");
|
||||
@@ -626,7 +626,7 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
||||
WRITE(p, " index3 = (col.a << 12) | (col.b << 8) | (col.g << 4) | (col.r);\n");
|
||||
WRITE(p, " }\n");
|
||||
WRITE(p, " break;\n");
|
||||
WRITE(p, " case 3U:\n"); // 8888
|
||||
WRITE(p, " case 3:\n"); // 8888
|
||||
WRITE(p, " col = uvec4(t.rgba * 255.99);\n");
|
||||
WRITE(p, " index0 = (col.a << 24) | (col.b << 16) | (col.g << 8) | (col.r);\n");
|
||||
WRITE(p, " if (bilinear) {\n");
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
uniform vec2 u_texelDelta;
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
varying vec2 v_texcoord0;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
// by guest(r) - guest.r@gmail.com
|
||||
// license: GNU-GPL
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
uniform vec2 u_texelDelta;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
uniform vec2 u_texelDelta;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
varying vec2 v_texcoord0;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
uniform vec2 u_texelDelta;
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
+15
-10
@@ -1,10 +1,15 @@
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
|
||||
varying vec2 v_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position=a_position;
|
||||
v_texcoord0=a_texcoord0;
|
||||
}
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
|
||||
varying vec2 v_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position=a_position;
|
||||
v_texcoord0=a_texcoord0;
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texcoord0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user