mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 03:50:47 -05:00
Add a COGL_DEBUG option to disable software clipping
This adds a debug option called disable-software-clipping which causes the journal to always log the clip stack state rather than trying to manually clip rectangles.
This commit is contained in:
parent
62c893feee
commit
3fa91efea8
@ -143,6 +143,11 @@ OPT (DISABLE_NPOT_TEXTURES,
|
|||||||
"Disable non-power-of-two textures",
|
"Disable non-power-of-two textures",
|
||||||
"Makes Cogl think that the GL driver doesn't support NPOT textures "
|
"Makes Cogl think that the GL driver doesn't support NPOT textures "
|
||||||
"so that it will create sliced textures or textures with waste instead.")
|
"so that it will create sliced textures or textures with waste instead.")
|
||||||
|
OPT (DISABLE_SOFTWARE_CLIP,
|
||||||
|
"Root Cause",
|
||||||
|
"disable-software-clip",
|
||||||
|
"Disable software clipping",
|
||||||
|
"Disables Cogl's attempts to clip some rectangles in software.")
|
||||||
OPT (SHOW_SOURCE,
|
OPT (SHOW_SOURCE,
|
||||||
"Cogl Tracing",
|
"Cogl Tracing",
|
||||||
"show-source",
|
"show-source",
|
||||||
|
@ -72,7 +72,8 @@ static const GDebugKey cogl_behavioural_debug_keys[] = {
|
|||||||
{ "disable-glsl", COGL_DEBUG_DISABLE_GLSL},
|
{ "disable-glsl", COGL_DEBUG_DISABLE_GLSL},
|
||||||
{ "disable-blending", COGL_DEBUG_DISABLE_BLENDING},
|
{ "disable-blending", COGL_DEBUG_DISABLE_BLENDING},
|
||||||
{ "disable-npot-textures", COGL_DEBUG_DISABLE_NPOT_TEXTURES},
|
{ "disable-npot-textures", COGL_DEBUG_DISABLE_NPOT_TEXTURES},
|
||||||
{ "wireframe", COGL_DEBUG_WIREFRAME}
|
{ "wireframe", COGL_DEBUG_WIREFRAME},
|
||||||
|
{ "disable-software-clip", COGL_DEBUG_DISABLE_SOFTWARE_CLIP}
|
||||||
};
|
};
|
||||||
static const int n_cogl_behavioural_debug_keys =
|
static const int n_cogl_behavioural_debug_keys =
|
||||||
G_N_ELEMENTS (cogl_behavioural_debug_keys);
|
G_N_ELEMENTS (cogl_behavioural_debug_keys);
|
||||||
|
@ -58,7 +58,8 @@ typedef enum {
|
|||||||
COGL_DEBUG_TEXTURE_PIXMAP = 1 << 25,
|
COGL_DEBUG_TEXTURE_PIXMAP = 1 << 25,
|
||||||
COGL_DEBUG_BITMAP = 1 << 26,
|
COGL_DEBUG_BITMAP = 1 << 26,
|
||||||
COGL_DEBUG_DISABLE_NPOT_TEXTURES = 1 << 27,
|
COGL_DEBUG_DISABLE_NPOT_TEXTURES = 1 << 27,
|
||||||
COGL_DEBUG_WIREFRAME = 1 << 28
|
COGL_DEBUG_WIREFRAME = 1 << 28,
|
||||||
|
COGL_DEBUG_DISABLE_SOFTWARE_CLIP = 1 << 29
|
||||||
} CoglDebugFlags;
|
} CoglDebugFlags;
|
||||||
|
|
||||||
#ifdef COGL_ENABLE_DEBUG
|
#ifdef COGL_ENABLE_DEBUG
|
||||||
|
@ -1155,6 +1155,8 @@ _cogl_journal_flush (void)
|
|||||||
state.modelview_stack = modelview_stack;
|
state.modelview_stack = modelview_stack;
|
||||||
state.projection_stack = _cogl_framebuffer_get_projection_stack (framebuffer);
|
state.projection_stack = _cogl_framebuffer_get_projection_stack (framebuffer);
|
||||||
|
|
||||||
|
if (G_UNLIKELY ((cogl_debug_flags & COGL_DEBUG_DISABLE_SOFTWARE_CLIP) == 0))
|
||||||
|
{
|
||||||
/* We do an initial walk of the journal to analyse the clip stack
|
/* We do an initial walk of the journal to analyse the clip stack
|
||||||
batches to see if we can do software clipping. We do this as a
|
batches to see if we can do software clipping. We do this as a
|
||||||
separate walk of the journal because we can modify entries and
|
separate walk of the journal because we can modify entries and
|
||||||
@ -1165,6 +1167,7 @@ _cogl_journal_flush (void)
|
|||||||
compare_entry_clip_stacks,
|
compare_entry_clip_stacks,
|
||||||
_cogl_journal_check_software_clip, /* callback */
|
_cogl_journal_check_software_clip, /* callback */
|
||||||
&state); /* data */
|
&state); /* data */
|
||||||
|
}
|
||||||
|
|
||||||
/* We upload the vertices after the clip stack pass in case it
|
/* We upload the vertices after the clip stack pass in case it
|
||||||
modifies the entries */
|
modifies the entries */
|
||||||
|
Loading…
Reference in New Issue
Block a user