aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/renderer.c32
-rw-r--r--render/gles2/texture.c16
-rw-r--r--render/gles2/util.c4
3 files changed, 26 insertions, 26 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index 5233ed1b..27c16e52 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -258,7 +258,7 @@ static bool gles2_read_pixels(struct wlr_renderer *wlr_renderer,
const struct wlr_gles2_pixel_format *fmt = get_gles2_format_from_wl(wl_fmt);
if (fmt == NULL) {
- wlr_log(L_ERROR, "Cannot read pixels: unsupported pixel format");
+ wlr_log(WLR_ERROR, "Cannot read pixels: unsupported pixel format");
return false;
}
@@ -325,7 +325,7 @@ static void gles2_init_wl_display(struct wlr_renderer *wlr_renderer,
struct wlr_gles2_renderer *renderer =
gles2_get_renderer_in_context(wlr_renderer);
if (!wlr_egl_bind_display(renderer->egl, wl_display)) {
- wlr_log(L_INFO, "failed to bind wl_display to EGL");
+ wlr_log(WLR_INFO, "failed to bind wl_display to EGL");
}
}
@@ -389,18 +389,18 @@ void pop_gles2_marker(void) {
}
}
-static log_importance_t gles2_log_importance_to_wlr(GLenum type) {
+static enum wlr_log_importance gles2_log_importance_to_wlr(GLenum type) {
switch (type) {
- case GL_DEBUG_TYPE_ERROR_KHR: return L_ERROR;
- case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR: return L_DEBUG;
- case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR: return L_ERROR;
- case GL_DEBUG_TYPE_PORTABILITY_KHR: return L_DEBUG;
- case GL_DEBUG_TYPE_PERFORMANCE_KHR: return L_DEBUG;
- case GL_DEBUG_TYPE_OTHER_KHR: return L_DEBUG;
- case GL_DEBUG_TYPE_MARKER_KHR: return L_DEBUG;
- case GL_DEBUG_TYPE_PUSH_GROUP_KHR: return L_DEBUG;
- case GL_DEBUG_TYPE_POP_GROUP_KHR: return L_DEBUG;
- default: return L_DEBUG;
+ case GL_DEBUG_TYPE_ERROR_KHR: return WLR_ERROR;
+ case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR: return WLR_DEBUG;
+ case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR: return WLR_ERROR;
+ case GL_DEBUG_TYPE_PORTABILITY_KHR: return WLR_DEBUG;
+ case GL_DEBUG_TYPE_PERFORMANCE_KHR: return WLR_DEBUG;
+ case GL_DEBUG_TYPE_OTHER_KHR: return WLR_DEBUG;
+ case GL_DEBUG_TYPE_MARKER_KHR: return WLR_DEBUG;
+ case GL_DEBUG_TYPE_PUSH_GROUP_KHR: return WLR_DEBUG;
+ case GL_DEBUG_TYPE_POP_GROUP_KHR: return WLR_DEBUG;
+ default: return WLR_DEBUG;
}
}
@@ -490,9 +490,9 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl) {
wlr_egl_make_current(renderer->egl, EGL_NO_SURFACE, NULL);
renderer->exts_str = (const char*) glGetString(GL_EXTENSIONS);
- wlr_log(L_INFO, "Using %s", glGetString(GL_VERSION));
- wlr_log(L_INFO, "GL vendor: %s", glGetString(GL_VENDOR));
- wlr_log(L_INFO, "Supported GLES2 extensions: %s", renderer->exts_str);
+ wlr_log(WLR_INFO, "Using %s", glGetString(GL_VERSION));
+ wlr_log(WLR_INFO, "GL vendor: %s", glGetString(GL_VENDOR));
+ wlr_log(WLR_INFO, "Supported GLES2 extensions: %s", renderer->exts_str);
if (glDebugMessageCallbackKHR && glDebugMessageControlKHR) {
glEnable(GL_DEBUG_OUTPUT_KHR);
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 0ef9d759..3c70a235 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -44,13 +44,13 @@ static bool gles2_texture_write_pixels(struct wlr_texture *wlr_texture,
get_gles2_texture_in_context(wlr_texture);
if (texture->type != WLR_GLES2_TEXTURE_GLTEX) {
- wlr_log(L_ERROR, "Cannot write pixels to immutable texture");
+ wlr_log(WLR_ERROR, "Cannot write pixels to immutable texture");
return false;
}
const struct wlr_gles2_pixel_format *fmt = get_gles2_format_from_wl(wl_fmt);
if (fmt == NULL) {
- wlr_log(L_ERROR, "Unsupported pixel format %"PRIu32, wl_fmt);
+ wlr_log(WLR_ERROR, "Unsupported pixel format %"PRIu32, wl_fmt);
return false;
}
@@ -141,14 +141,14 @@ struct wlr_texture *wlr_gles2_texture_from_pixels(struct wlr_egl *egl,
const struct wlr_gles2_pixel_format *fmt = get_gles2_format_from_wl(wl_fmt);
if (fmt == NULL) {
- wlr_log(L_ERROR, "Unsupported pixel format %"PRIu32, wl_fmt);
+ wlr_log(WLR_ERROR, "Unsupported pixel format %"PRIu32, wl_fmt);
return NULL;
}
struct wlr_gles2_texture *texture =
calloc(1, sizeof(struct wlr_gles2_texture));
if (texture == NULL) {
- wlr_log(L_ERROR, "Allocation failed");
+ wlr_log(WLR_ERROR, "Allocation failed");
return NULL;
}
wlr_texture_init(&texture->wlr_texture, &texture_impl);
@@ -183,7 +183,7 @@ struct wlr_texture *wlr_gles2_texture_from_wl_drm(struct wlr_egl *egl,
struct wlr_gles2_texture *texture =
calloc(1, sizeof(struct wlr_gles2_texture));
if (texture == NULL) {
- wlr_log(L_ERROR, "Allocation failed");
+ wlr_log(WLR_ERROR, "Allocation failed");
return NULL;
}
wlr_texture_init(&texture->wlr_texture, &texture_impl);
@@ -212,7 +212,7 @@ struct wlr_texture *wlr_gles2_texture_from_wl_drm(struct wlr_egl *egl,
texture->has_alpha = true;
break;
default:
- wlr_log(L_ERROR, "Invalid or unsupported EGL buffer format");
+ wlr_log(WLR_ERROR, "Invalid or unsupported EGL buffer format");
free(texture);
return NULL;
}
@@ -240,7 +240,7 @@ struct wlr_texture *wlr_gles2_texture_from_dmabuf(struct wlr_egl *egl,
}
if (!egl->exts.image_dmabuf_import_ext) {
- wlr_log(L_ERROR, "Cannot create DMA-BUF texture: EGL extension "
+ wlr_log(WLR_ERROR, "Cannot create DMA-BUF texture: EGL extension "
"unavailable");
return NULL;
}
@@ -260,7 +260,7 @@ struct wlr_texture *wlr_gles2_texture_from_dmabuf(struct wlr_egl *egl,
struct wlr_gles2_texture *texture =
calloc(1, sizeof(struct wlr_gles2_texture));
if (texture == NULL) {
- wlr_log(L_ERROR, "Allocation failed");
+ wlr_log(WLR_ERROR, "Allocation failed");
return NULL;
}
wlr_texture_init(&texture->wlr_texture, &texture_impl);
diff --git a/render/gles2/util.c b/render/gles2/util.c
index c291f533..3ac777ee 100644
--- a/render/gles2/util.c
+++ b/render/gles2/util.c
@@ -28,10 +28,10 @@ bool _gles2_flush_errors(const char *file, int line) {
failure = true;
if (err == GL_OUT_OF_MEMORY) {
// The OpenGL context is now undefined
- _wlr_log(L_ERROR, "[%s:%d] Fatal GL error: out of memory", file, line);
+ _wlr_log(WLR_ERROR, "[%s:%d] Fatal GL error: out of memory", file, line);
exit(1);
} else {
- _wlr_log(L_ERROR, "[%s:%d] GL error %d %s", file, line, err, gles2_strerror(err));
+ _wlr_log(WLR_ERROR, "[%s:%d] GL error %d %s", file, line, err, gles2_strerror(err));
}
}
return failure;