i965simple: use u_reduced_prim() function
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include "pipe/p_context.h"
|
#include "pipe/p_context.h"
|
||||||
#include "pipe/internal/p_winsys_screen.h"
|
#include "pipe/internal/p_winsys_screen.h"
|
||||||
|
#include "util/u_prim.h"
|
||||||
|
|
||||||
static unsigned hw_prim[PIPE_PRIM_POLYGON+1] = {
|
static unsigned hw_prim[PIPE_PRIM_POLYGON+1] = {
|
||||||
_3DPRIM_POINTLIST,
|
_3DPRIM_POINTLIST,
|
||||||
@@ -50,20 +51,6 @@ static unsigned hw_prim[PIPE_PRIM_POLYGON+1] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static const int reduced_prim[PIPE_PRIM_POLYGON+1] = {
|
|
||||||
PIPE_PRIM_POINTS,
|
|
||||||
PIPE_PRIM_LINES,
|
|
||||||
PIPE_PRIM_LINES,
|
|
||||||
PIPE_PRIM_LINES,
|
|
||||||
PIPE_PRIM_TRIANGLES,
|
|
||||||
PIPE_PRIM_TRIANGLES,
|
|
||||||
PIPE_PRIM_TRIANGLES,
|
|
||||||
PIPE_PRIM_TRIANGLES,
|
|
||||||
PIPE_PRIM_TRIANGLES,
|
|
||||||
PIPE_PRIM_TRIANGLES
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* When the primitive changes, set a state bit and re-validate. Not
|
/* When the primitive changes, set a state bit and re-validate. Not
|
||||||
* the nicest and would rather deal with this by having all the
|
* the nicest and would rather deal with this by having all the
|
||||||
* programs be immune to the active primitive (ie. cope with all
|
* programs be immune to the active primitive (ie. cope with all
|
||||||
@@ -85,8 +72,8 @@ static void brw_set_prim(struct brw_context *brw, int prim)
|
|||||||
brw->primitive = prim;
|
brw->primitive = prim;
|
||||||
brw->state.dirty.brw |= BRW_NEW_PRIMITIVE;
|
brw->state.dirty.brw |= BRW_NEW_PRIMITIVE;
|
||||||
|
|
||||||
if (reduced_prim[prim] != brw->reduced_primitive) {
|
if (u_reduced_prim(prim) != brw->reduced_primitive) {
|
||||||
brw->reduced_primitive = reduced_prim[prim];
|
brw->reduced_primitive = u_reduced_prim(prim);
|
||||||
brw->state.dirty.brw |= BRW_NEW_REDUCED_PRIMITIVE;
|
brw->state.dirty.brw |= BRW_NEW_REDUCED_PRIMITIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user