From 9b70eab19494550c6765910affb5fc8c3f883662 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 11 Jul 2021 20:00:02 +0200 Subject: render/gles2: rename wlr_egl.exts to better match Khronos Khronos refers to extensions with their namespace as a prefix in uppercase. Change our naming to align with Khronos conventions. This also makes grepping easier. --- render/gles2/renderer.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'render/gles2') diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 7ef076c5..0e6109ab 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -274,7 +274,7 @@ static bool gles2_render_subtexture_with_matrix( case GL_TEXTURE_EXTERNAL_OES: shader = &renderer->shaders.tex_ext; - if (!renderer->exts.egl_image_external_oes) { + if (!renderer->exts.OES_egl_image_external) { wlr_log(WLR_ERROR, "Failed to render texture: " "GL_TEXTURE_EXTERNAL_OES not supported"); return false; @@ -407,7 +407,7 @@ static uint32_t gles2_preferred_read_format( return fmt->drm_format; } - if (renderer->exts.read_format_bgra_ext) { + if (renderer->exts.EXT_read_format_bgra) { return DRM_FORMAT_XRGB8888; } return DRM_FORMAT_XBGR8888; @@ -427,7 +427,7 @@ static bool gles2_read_pixels(struct wlr_renderer *wlr_renderer, return false; } - if (fmt->gl_format == GL_BGRA_EXT && !renderer->exts.read_format_bgra_ext) { + if (fmt->gl_format == GL_BGRA_EXT && !renderer->exts.EXT_read_format_bgra) { wlr_log(WLR_ERROR, "Cannot read pixels: missing GL_EXT_read_format_bgra extension"); return false; @@ -530,7 +530,7 @@ static void gles2_destroy(struct wlr_renderer *wlr_renderer) { glDeleteProgram(renderer->shaders.tex_ext.program); pop_gles2_debug(renderer); - if (renderer->exts.debug_khr) { + if (renderer->exts.KHR_debug) { glDisable(GL_DEBUG_OUTPUT_KHR); renderer->procs.glDebugMessageCallbackKHR(NULL, NULL); } @@ -760,11 +760,11 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl) { return NULL; } - renderer->exts.read_format_bgra_ext = + renderer->exts.EXT_read_format_bgra = check_gl_ext(exts_str, "GL_EXT_read_format_bgra"); if (check_gl_ext(exts_str, "GL_KHR_debug")) { - renderer->exts.debug_khr = true; + renderer->exts.KHR_debug = true; load_gl_proc(&renderer->procs.glDebugMessageCallbackKHR, "glDebugMessageCallbackKHR"); load_gl_proc(&renderer->procs.glDebugMessageControlKHR, @@ -772,18 +772,18 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl) { } if (check_gl_ext(exts_str, "GL_OES_EGL_image_external")) { - renderer->exts.egl_image_external_oes = true; + renderer->exts.OES_egl_image_external = true; load_gl_proc(&renderer->procs.glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES"); } if (check_gl_ext(exts_str, "GL_OES_EGL_image")) { - renderer->exts.egl_image_oes = true; + renderer->exts.OES_egl_image = true; load_gl_proc(&renderer->procs.glEGLImageTargetRenderbufferStorageOES, "glEGLImageTargetRenderbufferStorageOES"); } - if (renderer->exts.debug_khr) { + if (renderer->exts.KHR_debug) { glEnable(GL_DEBUG_OUTPUT_KHR); glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR); renderer->procs.glDebugMessageCallbackKHR(gles2_log, NULL); @@ -831,7 +831,7 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl) { renderer->shaders.tex_rgbx.pos_attrib = glGetAttribLocation(prog, "pos"); renderer->shaders.tex_rgbx.tex_attrib = glGetAttribLocation(prog, "texcoord"); - if (renderer->exts.egl_image_external_oes) { + if (renderer->exts.OES_egl_image_external) { renderer->shaders.tex_ext.program = prog = link_program(renderer, tex_vertex_src, tex_fragment_src_external); if (!renderer->shaders.tex_ext.program) { @@ -859,7 +859,7 @@ error: pop_gles2_debug(renderer); - if (renderer->exts.debug_khr) { + if (renderer->exts.KHR_debug) { glDisable(GL_DEBUG_OUTPUT_KHR); renderer->procs.glDebugMessageCallbackKHR(NULL, NULL); } -- cgit v1.2.3