Skip to content

Commit

Permalink
Merge pull request #1246 from absolutelynothelix/opengl-max-depth
Browse files Browse the repository at this point in the history
common: remove OPENGL_MAX_DEPTH and it's uses
  • Loading branch information
absolutelynothelix authored Apr 29, 2024
2 parents d6e3335 + fa42eac commit af27c38
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
6 changes: 0 additions & 6 deletions src/backend/gl/glx.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,6 @@ static image_handle
glx_bind_pixmap(backend_t *base, xcb_pixmap_t pixmap, struct xvisual_info fmt) {
GLXPixmap *glxpixmap = NULL;
auto gd = (struct _glx_data *)base;
// Retrieve pixmap parameters, if they aren't provided
if (fmt.visual_depth > OPENGL_MAX_DEPTH) {
log_error("Requested depth %d higher than max possible depth %d.",
fmt.visual_depth, OPENGL_MAX_DEPTH);
return NULL;
}

if (fmt.visual_depth < 0) {
log_error("Pixmap %#010x with invalid depth %d", pixmap, fmt.visual_depth);
Expand Down
3 changes: 0 additions & 3 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
#define US_PER_SEC 1000000L
#define MS_PER_SEC 1000

/// @brief Maximum OpenGL FBConfig depth.
#define OPENGL_MAX_DEPTH 32

/// @brief Maximum OpenGL buffer age.
#define CGLX_MAX_BUFFER_AGE 5

Expand Down
5 changes: 0 additions & 5 deletions src/opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,11 +746,6 @@ bool glx_bind_pixmap(session_t *ps, glx_texture_t **pptex, xcb_pixmap_t pixmap,
log_error("Failed to query info of pixmap %#010x.", pixmap);
return false;
}
if (r->depth > OPENGL_MAX_DEPTH) {
log_error("Requested depth %d higher than %d.", depth,
OPENGL_MAX_DEPTH);
return false;
}
depth = r->depth;
width = r->width;
height = r->height;
Expand Down

0 comments on commit af27c38

Please sign in to comment.