projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i965/nir/vec4: Implement conditional statements (nir_cf_node_if)
[mesa.git]
/
src
/
mesa
/
drivers
/
dri
/
i965
/
brw_clip.c
diff --git
a/src/mesa/drivers/dri/i965/brw_clip.c
b/src/mesa/drivers/dri/i965/brw_clip.c
index 12f512d7b008b0e84ddb8c56a9ec753c63b97ee5..3a73c64a88b1e3f5ae956d80e348358984a092fc 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_clip.c
+++ b/
src/mesa/drivers/dri/i965/brw_clip.c
@@
-42,7
+42,7
@@
#include "brw_state.h"
#include "brw_clip.h"
#include "brw_state.h"
#include "brw_clip.h"
-#include "
gls
l/ralloc.h"
+#include "
uti
l/ralloc.h"
#define FRONT_UNFILLED_BIT 0x1
#define BACK_UNFILLED_BIT 0x2
#define FRONT_UNFILLED_BIT 0x1
#define BACK_UNFILLED_BIT 0x2
@@
-62,7
+62,7
@@
static void compile_clip_prog( struct brw_context *brw,
/* Begin the compilation:
*/
/* Begin the compilation:
*/
- brw_init_co
mpile(brw
, &c.func, mem_ctx);
+ brw_init_co
degen(brw->intelScreen->devinfo
, &c.func, mem_ctx);
c.func.single_program_flow = 1;
c.func.single_program_flow = 1;
@@
-106,8
+106,7
@@
static void compile_clip_prog( struct brw_context *brw,
brw_emit_point_clip( &c );
break;
default:
brw_emit_point_clip( &c );
break;
default:
- assert(0);
- return;
+ unreachable("not reached");
}
brw_compact_instructions(&c.func, 0, 0, NULL);
}
brw_compact_instructions(&c.func, 0, 0, NULL);
@@
-118,12
+117,13
@@
static void compile_clip_prog( struct brw_context *brw,
if (unlikely(INTEL_DEBUG & DEBUG_CLIP)) {
fprintf(stderr, "clip:\n");
if (unlikely(INTEL_DEBUG & DEBUG_CLIP)) {
fprintf(stderr, "clip:\n");
- brw_disassemble(brw, c.func.store, 0, program_size, stderr);
+ brw_disassemble(brw->intelScreen->devinfo, c.func.store,
+ 0, program_size, stderr);
fprintf(stderr, "\n");
}
brw_upload_cache(&brw->cache,
fprintf(stderr, "\n");
}
brw_upload_cache(&brw->cache,
- BRW_CLIP_PROG,
+ BRW_C
ACHE_C
LIP_PROG,
&c.key, sizeof(c.key),
program, program_size,
&c.prog_data, sizeof(c.prog_data),
&c.key, sizeof(c.key),
program, program_size,
&c.prog_data, sizeof(c.prog_data),
@@
-225,8
+225,7
@@
brw_upload_clip_prog(struct brw_context *brw)
key.offset_factor = ctx->Polygon.OffsetFactor * ctx->DrawBuffer->_MRD;
}
key.offset_factor = ctx->Polygon.OffsetFactor * ctx->DrawBuffer->_MRD;
}
- switch (ctx->Polygon.FrontFace) {
- case GL_CCW:
+ if (!ctx->Polygon._FrontBit) {
key.fill_ccw = fill_front;
key.fill_cw = fill_back;
key.offset_ccw = offset_front;
key.fill_ccw = fill_front;
key.fill_cw = fill_back;
key.offset_ccw = offset_front;
@@
-234,8
+233,7
@@
brw_upload_clip_prog(struct brw_context *brw)
if (ctx->Light.Model.TwoSide &&
key.fill_cw != CLIP_CULL)
key.copy_bfc_cw = 1;
if (ctx->Light.Model.TwoSide &&
key.fill_cw != CLIP_CULL)
key.copy_bfc_cw = 1;
- break;
- case GL_CW:
+ } else {
key.fill_cw = fill_front;
key.fill_ccw = fill_back;
key.offset_cw = offset_front;
key.fill_cw = fill_front;
key.fill_ccw = fill_back;
key.offset_cw = offset_front;
@@
-243,13
+241,12
@@
brw_upload_clip_prog(struct brw_context *brw)
if (ctx->Light.Model.TwoSide &&
key.fill_ccw != CLIP_CULL)
key.copy_bfc_ccw = 1;
if (ctx->Light.Model.TwoSide &&
key.fill_ccw != CLIP_CULL)
key.copy_bfc_ccw = 1;
- break;
}
}
}
}
}
}
}
}
- if (!brw_search_cache(&brw->cache, BRW_CLIP_PROG,
+ if (!brw_search_cache(&brw->cache, BRW_C
ACHE_C
LIP_PROG,
&key, sizeof(key),
&brw->clip.prog_offset, &brw->clip.prog_data)) {
compile_clip_prog( brw, &key );
&key, sizeof(key),
&brw->clip.prog_offset, &brw->clip.prog_data)) {
compile_clip_prog( brw, &key );
@@
-259,13
+256,13
@@
brw_upload_clip_prog(struct brw_context *brw)
const struct brw_tracked_state brw_clip_prog = {
.dirty = {
const struct brw_tracked_state brw_clip_prog = {
.dirty = {
- .mesa =
(_NEW_LIGHT
|
- _NEW_
TRANSFORM
|
- _NEW_POLYGON |
- _NEW_
BUFFERS)
,
- .brw =
(BRW_NEW_REDUCED_PRIMITIVE
|
-
BRW_NEW_VUE_MAP_GEOM_OUT
|
- BRW_NEW_INTERPOLATION_MAP)
+ .mesa =
_NEW_BUFFERS
|
+ _NEW_
LIGHT
|
+ _NEW_POLYGON |
+ _NEW_
TRANSFORM
,
+ .brw =
BRW_NEW_INTERPOLATION_MAP
|
+
BRW_NEW_REDUCED_PRIMITIVE
|
+ BRW_NEW_VUE_MAP_GEOM_OUT,
},
.emit = brw_upload_clip_prog
};
},
.emit = brw_upload_clip_prog
};