summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clip_line.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-04-15 14:13:58 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2015-04-22 16:00:32 -0700
commit61c4702489fa1694892c5ce90ccf65a5094df3e7 (patch)
treee065364f3e0261f0f0eea2041a3e258b4d0450b5 /src/mesa/drivers/dri/i965/brw_clip_line.c
parent639314d40e78b5b56c3fc840b2f416e7fc519a4d (diff)
downloadexternal_mesa3d-61c4702489fa1694892c5ce90ccf65a5094df3e7.zip
external_mesa3d-61c4702489fa1694892c5ce90ccf65a5094df3e7.tar.gz
external_mesa3d-61c4702489fa1694892c5ce90ccf65a5094df3e7.tar.bz2
i965: Remove the context field from brw_compiler
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip_line.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_line.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index 070adba..395cd2f 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -45,7 +45,7 @@
static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
{
- struct brw_context *brw = c->func.brw;
+ const struct brw_device_info *devinfo = c->func.devinfo;
GLuint i = 0,j;
/* Register usage is static, precompute here:
@@ -89,7 +89,7 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
c->reg.clipdistance_offset = retype(brw_vec1_grf(i, 1), BRW_REGISTER_TYPE_W);
i++;
- if (brw->gen == 5) {
+ if (devinfo->gen == 5) {
c->reg.ff_sync = retype(brw_vec1_grf(i, 0), BRW_REGISTER_TYPE_UD);
i++;
}
@@ -129,7 +129,6 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
static void clip_and_emit_line( struct brw_clip_compile *c )
{
struct brw_compile *p = &c->func;
- struct brw_context *brw = p->brw;
struct brw_indirect vtx0 = brw_indirect(0, 0);
struct brw_indirect vtx1 = brw_indirect(1, 0);
struct brw_indirect newvtx0 = brw_indirect(2, 0);
@@ -155,7 +154,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_clip_init_clipmask(c);
/* -ve rhw workaround */
- if (brw->has_negative_rhw_bug) {
+ if (p->devinfo->has_negative_rhw_bug) {
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
brw_inst_set_cond_modifier(p->devinfo, brw_last_inst, BRW_CONDITIONAL_NZ);
@@ -213,7 +212,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
* Both can be negative on GM965/G965 due to RHW workaround
* if so, this object should be rejected.
*/
- if (brw->has_negative_rhw_bug) {
+ if (p->devinfo->has_negative_rhw_bug) {
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_LE, c->reg.dp0, brw_imm_f(0.0));
brw_IF(p, BRW_EXECUTE_1);
{
@@ -239,7 +238,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
/* If both are positive, do nothing */
/* Only on GM965/G965 */
- if (brw->has_negative_rhw_bug) {
+ if (p->devinfo->has_negative_rhw_bug) {
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.dp0, brw_imm_f(0.0));
brw_IF(p, BRW_EXECUTE_1);
}
@@ -255,7 +254,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
BRW_PREDICATE_NORMAL);
}
- if (brw->has_negative_rhw_bug) {
+ if (p->devinfo->has_negative_rhw_bug) {
brw_ENDIF(p);
}
}