mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
st/mesa: add ST_DEBUG=wf option which enables wireframe rendering
Useful for tessellation.
This commit is contained in:
parent
5f5b83cbba
commit
e8764a4673
3 changed files with 11 additions and 2 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include "main/macros.h"
|
||||
#include "st_context.h"
|
||||
#include "st_atom.h"
|
||||
#include "st_debug.h"
|
||||
#include "st_program.h"
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_defines.h"
|
||||
|
|
@ -119,8 +120,14 @@ static void update_raster_state( struct st_context *st )
|
|||
/* _NEW_POLYGON
|
||||
*/
|
||||
{
|
||||
raster->fill_front = translate_fill( ctx->Polygon.FrontMode );
|
||||
raster->fill_back = translate_fill( ctx->Polygon.BackMode );
|
||||
if (ST_DEBUG & DEBUG_WIREFRAME) {
|
||||
raster->fill_front = PIPE_POLYGON_MODE_LINE;
|
||||
raster->fill_back = PIPE_POLYGON_MODE_LINE;
|
||||
}
|
||||
else {
|
||||
raster->fill_front = translate_fill( ctx->Polygon.FrontMode );
|
||||
raster->fill_back = translate_fill( ctx->Polygon.BackMode );
|
||||
}
|
||||
|
||||
/* Simplify when culling is active:
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ static const struct debug_named_value st_debug_flags[] = {
|
|||
{ "query", DEBUG_QUERY, NULL },
|
||||
{ "draw", DEBUG_DRAW, NULL },
|
||||
{ "buffer", DEBUG_BUFFER, NULL },
|
||||
{ "wf", DEBUG_WIREFRAME, NULL },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ st_print_current(void);
|
|||
#define DEBUG_SCREEN 0x80
|
||||
#define DEBUG_DRAW 0x100
|
||||
#define DEBUG_BUFFER 0x200
|
||||
#define DEBUG_WIREFRAME 0x400
|
||||
|
||||
#ifdef DEBUG
|
||||
extern int ST_DEBUG;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue