mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 18:19:36 +01:00
gl-render-manager: Fix HW tesselation. Remove 1D texture support, likely no benefit.
This commit is contained in:
1 parent
9945e011c6
commit
ccdb4d186d
12 files changed
+80
-141
No files matched your search
@@ -182,8 +182,6 @@ void GLQueueRunner::RunInitSteps(const std::vector<GLRInitStep> &steps) {
|
||||
InitCreateFramebuffer(step);
|
||||
break;
|
||||
}
|
||||
case GLRInitStepType::TEXTURE_SUBDATA:
|
||||
break;
|
||||
case GLRInitStepType::TEXTURE_IMAGE:
|
||||
{
|
||||
GLRTexture *tex = step.texture_image.texture;
|
||||
@@ -193,13 +191,20 @@ void GLQueueRunner::RunInitSteps(const std::vector<GLRInitStep> &steps) {
|
||||
glBindTexture(tex->target, tex->texture);
|
||||
boundTexture = tex->texture;
|
||||
}
|
||||
if (!step.texture_image.data)
|
||||
Crash();
|
||||
// For things to show in RenderDoc, need to split into glTexImage2D(..., nullptr) and glTexSubImage.
|
||||
glTexImage2D(tex->target, step.texture_image.level, step.texture_image.internalFormat, step.texture_image.width, step.texture_image.height, 0, step.texture_image.format, step.texture_image.type, step.texture_image.data);
|
||||
delete[] step.texture_image.data;
|
||||
CHECK_GL_ERROR_IF_DEBUG();
|
||||
glTexParameteri(tex->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(tex->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(tex->target, GL_TEXTURE_MAG_FILTER, step.texture_image.linearFilter ? GL_LINEAR : GL_NEAREST);
|
||||
glTexParameteri(tex->target, GL_TEXTURE_MIN_FILTER, step.texture_image.linearFilter ? GL_LINEAR : GL_NEAREST);
|
||||
tex->wrapS = GL_CLAMP_TO_EDGE;
|
||||
tex->wrapT = GL_CLAMP_TO_EDGE;
|
||||
tex->magFilter = step.texture_image.linearFilter ? GL_LINEAR : GL_NEAREST;
|
||||
tex->minFilter = step.texture_image.linearFilter ? GL_LINEAR : GL_NEAREST;
|
||||
glTexParameteri(tex->target, GL_TEXTURE_WRAP_S, tex->wrapS);
|
||||
glTexParameteri(tex->target, GL_TEXTURE_WRAP_T, tex->wrapT);
|
||||
glTexParameteri(tex->target, GL_TEXTURE_MAG_FILTER, tex->magFilter);
|
||||
glTexParameteri(tex->target, GL_TEXTURE_MIN_FILTER, tex->minFilter);
|
||||
break;
|
||||
}
|
||||
case GLRInitStepType::TEXTURE_FINALIZE:
|
||||
@@ -210,6 +215,7 @@ void GLQueueRunner::RunInitSteps(const std::vector<GLRInitStep> &steps) {
|
||||
boundTexture = tex->texture;
|
||||
}
|
||||
glTexParameteri(tex->target, GL_TEXTURE_MAX_LEVEL, step.texture_finalize.maxLevel);
|
||||
tex->maxLod = step.texture_finalize.maxLevel;
|
||||
if (step.texture_finalize.genMips) {
|
||||
glGenerateMipmap(tex->target);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user