summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c11
-rw-r--r--src/mesa/state_tracker/st_debug.c1
-rw-r--r--src/mesa/state_tracker/st_debug.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index a2285383e7d..dfa728b19ec 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -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:
*/
diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c
index 8c15e18d397..de3e3a9cdb2 100644
--- a/src/mesa/state_tracker/st_debug.c
+++ b/src/mesa/state_tracker/st_debug.c
@@ -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
};
diff --git a/src/mesa/state_tracker/st_debug.h b/src/mesa/state_tracker/st_debug.h
index c1c482524c9..49b916fb336 100644
--- a/src/mesa/state_tracker/st_debug.h
+++ b/src/mesa/state_tracker/st_debug.h
@@ -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;