Skip to content

Commit

Permalink
Merge pull request #530 from pbdot/ec-gl4es-fixes
Browse files Browse the repository at this point in the history
A few GL4ES fixes from upstream
  • Loading branch information
pbdot authored Aug 26, 2023
2 parents 11dc36d + 5908e6e commit 6784b17
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source_files/gl4es/src/gl/fpe.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ typedef struct scratch_s {
void free_scratch(scratch_t* scratch);


fpe_fpe_t *fpe_GetCache();
fpe_fpe_t *fpe_GetCache(fpe_cache_t *cur, fpe_state_t *state, int fixed);
void fpe_disposeCache(fpe_cache_t* cache, int freeprog);

// fpe is gles export replacement, so should use same caling conversion
Expand Down
4 changes: 2 additions & 2 deletions source_files/gl4es/src/gl/framebuffers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,12 +1441,12 @@ void APIENTRY_GL4ES gl4es_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX
if(!created) {
if((tex->actual.min_filter!=filter) || (tex->actual.mag_filter!=filter)) {
gltexture_t *old = glstate->texture.bound[ENABLED_TEX2D][0];
if(old->texture != glname);
if(old->texture != glname)
gl4es_glBindTexture(GL_TEXTURE_2D, glname);
gl4es_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
gl4es_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
tex->actual.min_filter = tex->actual.mag_filter = filter;
if(old->texture != glname);
if(old->texture != glname)
gl4es_glBindTexture(GL_TEXTURE_2D, old->texture);
}
}
Expand Down
2 changes: 2 additions & 0 deletions source_files/gl4es/src/gl/shaderconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,8 @@ char* ConvertShader(const char* pEntry, int isVertex, shaderconv_need_t *need)
printf("New Shader source:\n%s\n", Tmp);
}
// clean preproc'd source
if(versionString != NULL)
free(versionString);
if(pEntry!=pBuffer)
free(pBuffer);
return Tmp;
Expand Down
2 changes: 1 addition & 1 deletion source_files/gl4es/src/glx/glx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ GLXPbuffer gl4es_glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *
egl_eglQuerySurface(eglDisplay,Surface,EGL_WIDTH,&Width);
egl_eglQuerySurface(eglDisplay,Surface,EGL_HEIGHT,&Height);

return addPBuffer(Surface, Width, Height, Context, Config[1]);
return addPBuffer(Surface, Width, Height, Context, Config[0]);
}

GLXPbuffer addPixBuffer(Display *dpy, EGLSurface surface, EGLConfig Config, int Width, int Height, EGLContext Context, Pixmap pixmap, int depth, int emulated)
Expand Down

0 comments on commit 6784b17

Please sign in to comment.