mirror of https://github.com/snes9xgit/snes9x.git
Revert "Slang: Feedback support. Doesn't completely work yet."
This reverts commit 9536daa09b
.
This commit is contained in:
parent
9536daa09b
commit
814323513d
|
@ -598,13 +598,6 @@ void GLSLShader::render(GLuint &orig,
|
|||
pass[0].width = width;
|
||||
pass[0].height = height;
|
||||
|
||||
for (int i = 1; i < (int)pass.size(); i++)
|
||||
{
|
||||
GLuint tmp = pass[i].texture;
|
||||
pass[i].texture = pass[i].feedback_texture;
|
||||
pass[i].feedback_texture = tmp;
|
||||
}
|
||||
|
||||
// loop through all real passes
|
||||
for (unsigned int i = 1; i < pass.size(); i++)
|
||||
{
|
||||
|
@ -712,10 +705,18 @@ void GLSLShader::render(GLuint &orig,
|
|||
|
||||
glBindTexture(GL_TEXTURE_2D, pass[i - 1].texture);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) pass[i - 1].width);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, pass[i].wrap_mode);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, pass[i].wrap_mode);
|
||||
glTexParameteri(GL_TEXTURE_2D,
|
||||
GL_TEXTURE_MAG_FILTER,
|
||||
filter);
|
||||
glTexParameteri(GL_TEXTURE_2D,
|
||||
GL_TEXTURE_MIN_FILTER,
|
||||
filter);
|
||||
glTexParameteri(GL_TEXTURE_2D,
|
||||
GL_TEXTURE_WRAP_S,
|
||||
pass[i].wrap_mode);
|
||||
glTexParameteri(GL_TEXTURE_2D,
|
||||
GL_TEXTURE_WRAP_T,
|
||||
pass[i].wrap_mode);
|
||||
|
||||
glUseProgram(pass[i].program);
|
||||
#ifdef USE_SLANG
|
||||
|
|
|
@ -81,8 +81,7 @@ enum
|
|||
SL_LUTSIZE = 6,
|
||||
SL_MVP = 7,
|
||||
SL_FRAMECOUNT = 8,
|
||||
SL_PARAM = 9,
|
||||
SL_FEEDBACK = 10
|
||||
SL_PARAM = 9
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
@ -125,7 +124,6 @@ typedef struct
|
|||
std::vector<SlangUniform> uniforms;
|
||||
std::vector<uint8_t> ubo_buffer;
|
||||
GLuint ubo;
|
||||
GLuint feedback_texture;
|
||||
#endif
|
||||
} GLSLPass;
|
||||
|
||||
|
@ -191,8 +189,6 @@ typedef struct
|
|||
void slang_introspect();
|
||||
void slang_set_shader_vars(int p);
|
||||
void slang_clear_shader_vars();
|
||||
|
||||
bool using_feedback = false;
|
||||
#endif
|
||||
} GLSLShader;
|
||||
|
||||
|
|
|
@ -377,7 +377,6 @@ void GLSLShader::slang_introspect()
|
|||
for (int i = 1; i < (int)pass.size(); i++)
|
||||
{
|
||||
GLSLPass &p = pass[i];
|
||||
p.feedback_texture = 0;
|
||||
|
||||
int num_uniforms;
|
||||
glGetProgramiv(p.program, GL_ACTIVE_UNIFORMS, &num_uniforms);
|
||||
|
@ -492,13 +491,6 @@ void GLSLShader::slang_introspect()
|
|||
{
|
||||
u.num++;
|
||||
}
|
||||
else if (indexedtexorsize("PassFeedback", SL_FEEDBACK))
|
||||
{
|
||||
using_feedback = true;
|
||||
u.num++;
|
||||
if (u.type == SL_FEEDBACK + 1)
|
||||
u.type = SL_PASSSIZE;
|
||||
}
|
||||
else if (indexedtexorsize("User", SL_LUTTEXTURE))
|
||||
{
|
||||
}
|
||||
|
@ -650,7 +642,6 @@ void GLSLShader::slang_set_shader_vars(int p)
|
|||
case SL_PREVIOUSFRAMETEXTURE:
|
||||
case SL_PASSTEXTURE:
|
||||
case SL_LUTTEXTURE:
|
||||
case SL_FEEDBACK:
|
||||
glActiveTexture(GL_TEXTURE0 + texunit);
|
||||
|
||||
if (u.type == SL_PASSTEXTURE)
|
||||
|
@ -659,8 +650,6 @@ void GLSLShader::slang_set_shader_vars(int p)
|
|||
glBindTexture(GL_TEXTURE_2D, prev_frame[u.num - 1].texture);
|
||||
else if (u.type == SL_LUTTEXTURE)
|
||||
glBindTexture(GL_TEXTURE_2D, lut[u.num].texture);
|
||||
else if (u.type == SL_FEEDBACK)
|
||||
glBindTexture(GL_TEXTURE_2D, pass[u.num].feedback_texture);
|
||||
|
||||
if (u.location == -1)
|
||||
*((GLint *)(ubo + u.offset)) = texunit;
|
||||
|
@ -738,9 +727,6 @@ void GLSLShader::slang_set_shader_vars(int p)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (using_feedback)
|
||||
for (int i = 1; i < (int)pass.size(); i++)
|
||||
glGenTextures(1, &pass[i].feedback_texture);
|
||||
|
||||
if (pass[p].ubo_buffer.size() > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue