Skip to content

Commit

Permalink
Merge pull request #12803 from unknownbrackets/depal-gles
Browse files Browse the repository at this point in the history
GLES: Re-enable non-float depal shader path
  • Loading branch information
hrydgard authored Apr 8, 2020
2 parents d52c39b + a5ede2b commit 6df4228
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GPU/GLES/DepalettizeShaderGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ void main() {
DepalShaderCacheGLES::DepalShaderCacheGLES(Draw::DrawContext *draw) {
_assert_(draw);
render_ = (GLRenderManager *)draw->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
// Pre-build the vertex program
useGL3_ = gl_extensions.GLES3 || gl_extensions.VersionGEThan(3, 3);
}

void DepalShaderCacheGLES::Init() {
if (!gstate_c.Supports(GPU_SUPPORTS_32BIT_INT_FSHADER)) {
// Use the floating point path, it just can't handle the math.
useGL3_ = false;
Expand Down
1 change: 1 addition & 0 deletions GPU/GLES/DepalettizeShaderGLES.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class DepalShaderCacheGLES : public DepalShaderCacheCommon {
// This also uploads the palette and binds the correct texture.
DepalShader *GetDepalettizeShader(uint32_t clutMode, GEBufferFormat pixelFormat);
GLRTexture *GetClutTexture(GEPaletteFormat clutFormat, const u32 clutHash, u32 *rawClut);
void Init();
void Clear();
void Decimate();
std::vector<std::string> DebugGetShaderIDs(DebugShaderType type);
Expand Down
1 change: 1 addition & 0 deletions GPU/GLES/GPU_GLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ GPU_GLES::GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
framebufferManagerGL_->SetTextureCache(textureCacheGL_);
framebufferManagerGL_->SetShaderManager(shaderManagerGL_);
framebufferManagerGL_->SetDrawEngine(&drawEngine_);
depalShaderCache_.Init();
textureCacheGL_->SetFramebufferManager(framebufferManagerGL_);
textureCacheGL_->SetDepalShaderCache(&depalShaderCache_);
textureCacheGL_->SetShaderManager(shaderManagerGL_);
Expand Down

0 comments on commit 6df4228

Please sign in to comment.