*/
-#include "main/glheader.h"
#include "main/macros.h"
#include "main/enums.h"
static void copy_bfc( struct brw_sf_compile *c,
struct brw_reg vert )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
for (i = 0; i < 2; i++) {
static void do_twoside_color( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint backface_conditional = c->key.frontface_ccw ? BRW_CONDITIONAL_G : BRW_CONDITIONAL_L;
/* Already done in clip program:
struct brw_reg dst,
struct brw_reg src)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
int i;
for (i = 0; i < c->vue_map.num_slots; i++) {
*/
static void do_flatshade_triangle( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint nr;
GLuint jmpi = 1;
copy_flatshaded_attributes(c, c->vert[0], c->vert[2]);
copy_flatshaded_attributes(c, c->vert[1], c->vert[2]);
}
-
+
static void do_flatshade_line( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint nr;
GLuint jmpi = 1;
copy_flatshaded_attributes(c, c->vert[0], c->vert[1]);
}
-
/***********************************************************************
* Triangle setup.
static void copy_z_inv_w( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
/* Copy both scalars with a single MOV:
}
static void
-set_predicate_control_flag_value(struct brw_compile *p,
+set_predicate_control_flag_value(struct brw_codegen *p,
struct brw_sf_compile *c,
unsigned value)
{
void brw_emit_tri_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
brw_MUL(p, brw_null_reg(), c->a1_sub_a0, c->dy2);
brw_MAC(p, c->tmp, c->a2_sub_a0, negate(c->dy0));
brw_MUL(p, c->m1Cx, c->tmp, c->inv_det);
-
+
/* calculate dA/dy
*/
brw_MUL(p, brw_null_reg(), c->a2_sub_a0, c->dx0);
/* Copy m0..m3 to URB. m0 is implicitly copied from r0 in
* the send instruction:
- */
+ */
brw_urb_WRITE(p,
brw_null_reg(),
0,
void brw_emit_line_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
brw_MUL(p, c->tmp, c->a1_sub_a0, c->dx0);
brw_MUL(p, c->m1Cx, c->tmp, c->inv_det);
-
+
brw_MUL(p, c->tmp, c->a1_sub_a0, c->dy0);
brw_MUL(p, c->m2Cy, c->tmp, c->inv_det);
}
void brw_emit_point_sprite_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
*/
void brw_emit_point_setup(struct brw_sf_compile *c, bool allocate)
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
GLuint i;
c->flag_value = 0xff;
bool last = calculate_masks(c, i, &pc, &pc_persp, &pc_linear);
if (pc_persp)
- {
+ {
/* This seems odd as the values are all constant, but the
* fragment shader will be expecting it:
*/
void brw_emit_anyprim_setup( struct brw_sf_compile *c )
{
- struct brw_compile *p = &c->func;
+ struct brw_codegen *p = &c->func;
struct brw_reg payload_prim = brw_uw1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0);
struct brw_reg payload_attr = get_element_ud(brw_vec1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0), 0);
struct brw_reg primmask;