-static __inline int type_sz( GLuint type )
+static INLINE int type_sz( GLuint type )
{
switch( type ) {
case BRW_REGISTER_TYPE_UD:
}
}
-static __inline struct brw_reg brw_reg( GLuint file,
+static INLINE struct brw_reg brw_reg( GLuint file,
GLuint nr,
GLuint subnr,
GLuint type,
return reg;
}
-static __inline struct brw_reg brw_vec16_reg( GLuint file,
+static INLINE struct brw_reg brw_vec16_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
WRITEMASK_XYZW);
}
-static __inline struct brw_reg brw_vec8_reg( GLuint file,
+static INLINE struct brw_reg brw_vec8_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
}
-static __inline struct brw_reg brw_vec4_reg( GLuint file,
+static INLINE struct brw_reg brw_vec4_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
}
-static __inline struct brw_reg brw_vec2_reg( GLuint file,
+static INLINE struct brw_reg brw_vec2_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
WRITEMASK_XY);
}
-static __inline struct brw_reg brw_vec1_reg( GLuint file,
+static INLINE struct brw_reg brw_vec1_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
}
-static __inline struct brw_reg retype( struct brw_reg reg,
+static INLINE struct brw_reg retype( struct brw_reg reg,
GLuint type )
{
reg.type = type;
return reg;
}
-static __inline struct brw_reg suboffset( struct brw_reg reg,
+static INLINE struct brw_reg suboffset( struct brw_reg reg,
GLuint delta )
{
reg.subnr += delta * type_sz(reg.type);
}
-static __inline struct brw_reg offset( struct brw_reg reg,
+static INLINE struct brw_reg offset( struct brw_reg reg,
GLuint delta )
{
reg.nr += delta;
}
-static __inline struct brw_reg byte_offset( struct brw_reg reg,
+static INLINE struct brw_reg byte_offset( struct brw_reg reg,
GLuint bytes )
{
GLuint newoffset = reg.nr * REG_SIZE + reg.subnr + bytes;
}
-static __inline struct brw_reg brw_uw16_reg( GLuint file,
+static INLINE struct brw_reg brw_uw16_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
return suboffset(retype(brw_vec16_reg(file, nr, 0), BRW_REGISTER_TYPE_UW), subnr);
}
-static __inline struct brw_reg brw_uw8_reg( GLuint file,
+static INLINE struct brw_reg brw_uw8_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
return suboffset(retype(brw_vec8_reg(file, nr, 0), BRW_REGISTER_TYPE_UW), subnr);
}
-static __inline struct brw_reg brw_uw1_reg( GLuint file,
+static INLINE struct brw_reg brw_uw1_reg( GLuint file,
GLuint nr,
GLuint subnr )
{
return suboffset(retype(brw_vec1_reg(file, nr, 0), BRW_REGISTER_TYPE_UW), subnr);
}
-static __inline struct brw_reg brw_imm_reg( GLuint type )
+static INLINE struct brw_reg brw_imm_reg( GLuint type )
{
return brw_reg( BRW_IMMEDIATE_VALUE,
0,
0);
}
-static __inline struct brw_reg brw_imm_f( GLfloat f )
+static INLINE struct brw_reg brw_imm_f( GLfloat f )
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_F);
imm.dw1.f = f;
return imm;
}
-static __inline struct brw_reg brw_imm_d( GLint d )
+static INLINE struct brw_reg brw_imm_d( GLint d )
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_D);
imm.dw1.d = d;
return imm;
}
-static __inline struct brw_reg brw_imm_ud( GLuint ud )
+static INLINE struct brw_reg brw_imm_ud( GLuint ud )
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_UD);
imm.dw1.ud = ud;
return imm;
}
-static __inline struct brw_reg brw_imm_uw( GLushort uw )
+static INLINE struct brw_reg brw_imm_uw( GLushort uw )
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_UW);
imm.dw1.ud = uw | (uw << 16);
return imm;
}
-static __inline struct brw_reg brw_imm_w( GLshort w )
+static INLINE struct brw_reg brw_imm_w( GLshort w )
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_W);
imm.dw1.d = w | (w << 16);
/* Vector of eight signed half-byte values:
*/
-static __inline struct brw_reg brw_imm_v( GLuint v )
+static INLINE struct brw_reg brw_imm_v( GLuint v )
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_V);
imm.vstride = BRW_VERTICAL_STRIDE_0;
/* Vector of four 8-bit float values:
*/
-static __inline struct brw_reg brw_imm_vf( GLuint v )
+static INLINE struct brw_reg brw_imm_vf( GLuint v )
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_VF);
imm.vstride = BRW_VERTICAL_STRIDE_0;
#define VF_ONE 0x30
#define VF_NEG (1<<7)
-static __inline struct brw_reg brw_imm_vf4( GLuint v0,
+static INLINE struct brw_reg brw_imm_vf4( GLuint v0,
GLuint v1,
GLuint v2,
GLuint v3)
}
-static __inline struct brw_reg brw_address( struct brw_reg reg )
+static INLINE struct brw_reg brw_address( struct brw_reg reg )
{
return brw_imm_uw(reg.nr * REG_SIZE + reg.subnr);
}
-static __inline struct brw_reg brw_vec1_grf( GLuint nr,
+static INLINE struct brw_reg brw_vec1_grf( GLuint nr,
GLuint subnr )
{
return brw_vec1_reg(BRW_GENERAL_REGISTER_FILE, nr, subnr);
}
-static __inline struct brw_reg brw_vec8_grf( GLuint nr,
+static INLINE struct brw_reg brw_vec8_grf( GLuint nr,
GLuint subnr )
{
return brw_vec8_reg(BRW_GENERAL_REGISTER_FILE, nr, subnr);
}
-static __inline struct brw_reg brw_vec4_grf( GLuint nr,
+static INLINE struct brw_reg brw_vec4_grf( GLuint nr,
GLuint subnr )
{
return brw_vec4_reg(BRW_GENERAL_REGISTER_FILE, nr, subnr);
}
-static __inline struct brw_reg brw_vec2_grf( GLuint nr,
+static INLINE struct brw_reg brw_vec2_grf( GLuint nr,
GLuint subnr )
{
return brw_vec2_reg(BRW_GENERAL_REGISTER_FILE, nr, subnr);
}
-static __inline struct brw_reg brw_uw8_grf( GLuint nr,
+static INLINE struct brw_reg brw_uw8_grf( GLuint nr,
GLuint subnr )
{
return brw_uw8_reg(BRW_GENERAL_REGISTER_FILE, nr, subnr);
}
-static __inline struct brw_reg brw_null_reg( void )
+static INLINE struct brw_reg brw_null_reg( void )
{
return brw_vec8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_NULL,
0);
}
-static __inline struct brw_reg brw_address_reg( GLuint subnr )
+static INLINE struct brw_reg brw_address_reg( GLuint subnr )
{
return brw_uw1_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_ADDRESS,
* aren't xyzw. This goes against the convention for other scalar
* regs:
*/
-static __inline struct brw_reg brw_ip_reg( void )
+static INLINE struct brw_reg brw_ip_reg( void )
{
return brw_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_IP,
WRITEMASK_XYZW); /* NOTE! */
}
-static __inline struct brw_reg brw_acc_reg( void )
+static INLINE struct brw_reg brw_acc_reg( void )
{
return brw_vec8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_ACCUMULATOR,
}
-static __inline struct brw_reg brw_flag_reg( void )
+static INLINE struct brw_reg brw_flag_reg( void )
{
return brw_uw1_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_FLAG,
}
-static __inline struct brw_reg brw_mask_reg( GLuint subnr )
+static INLINE struct brw_reg brw_mask_reg( GLuint subnr )
{
return brw_uw1_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_MASK,
subnr);
}
-static __inline struct brw_reg brw_message_reg( GLuint nr )
+static INLINE struct brw_reg brw_message_reg( GLuint nr )
{
return brw_vec8_reg(BRW_MESSAGE_REGISTER_FILE,
nr,
/* This is almost always called with a numeric constant argument, so
* make things easy to evaluate at compile time:
*/
-static __inline GLuint cvt( GLuint val )
+static INLINE GLuint cvt( GLuint val )
{
switch (val) {
case 0: return 0;
return 0;
}
-static __inline struct brw_reg stride( struct brw_reg reg,
+static INLINE struct brw_reg stride( struct brw_reg reg,
GLuint vstride,
GLuint width,
GLuint hstride )
return reg;
}
-static __inline struct brw_reg vec16( struct brw_reg reg )
+static INLINE struct brw_reg vec16( struct brw_reg reg )
{
return stride(reg, 16,16,1);
}
-static __inline struct brw_reg vec8( struct brw_reg reg )
+static INLINE struct brw_reg vec8( struct brw_reg reg )
{
return stride(reg, 8,8,1);
}
-static __inline struct brw_reg vec4( struct brw_reg reg )
+static INLINE struct brw_reg vec4( struct brw_reg reg )
{
return stride(reg, 4,4,1);
}
-static __inline struct brw_reg vec2( struct brw_reg reg )
+static INLINE struct brw_reg vec2( struct brw_reg reg )
{
return stride(reg, 2,2,1);
}
-static __inline struct brw_reg vec1( struct brw_reg reg )
+static INLINE struct brw_reg vec1( struct brw_reg reg )
{
return stride(reg, 0,1,0);
}
-static __inline struct brw_reg get_element( struct brw_reg reg, GLuint elt )
+static INLINE struct brw_reg get_element( struct brw_reg reg, GLuint elt )
{
return vec1(suboffset(reg, elt));
}
-static __inline struct brw_reg get_element_ud( struct brw_reg reg, GLuint elt )
+static INLINE struct brw_reg get_element_ud( struct brw_reg reg, GLuint elt )
{
return vec1(suboffset(retype(reg, BRW_REGISTER_TYPE_UD), elt));
}
-static __inline struct brw_reg brw_swizzle( struct brw_reg reg,
+static INLINE struct brw_reg brw_swizzle( struct brw_reg reg,
GLuint x,
GLuint y,
GLuint z,
}
-static __inline struct brw_reg brw_swizzle1( struct brw_reg reg,
+static INLINE struct brw_reg brw_swizzle1( struct brw_reg reg,
GLuint x )
{
return brw_swizzle(reg, x, x, x, x);
}
-static __inline struct brw_reg brw_writemask( struct brw_reg reg,
+static INLINE struct brw_reg brw_writemask( struct brw_reg reg,
GLuint mask )
{
reg.dw1.bits.writemask &= mask;
return reg;
}
-static __inline struct brw_reg brw_set_writemask( struct brw_reg reg,
+static INLINE struct brw_reg brw_set_writemask( struct brw_reg reg,
GLuint mask )
{
reg.dw1.bits.writemask = mask;
return reg;
}
-static __inline struct brw_reg negate( struct brw_reg reg )
+static INLINE struct brw_reg negate( struct brw_reg reg )
{
reg.negate ^= 1;
return reg;
}
-static __inline struct brw_reg brw_abs( struct brw_reg reg )
+static INLINE struct brw_reg brw_abs( struct brw_reg reg )
{
reg.abs = 1;
return reg;
/***********************************************************************
*/
-static __inline struct brw_reg brw_vec4_indirect( GLuint subnr,
+static INLINE struct brw_reg brw_vec4_indirect( GLuint subnr,
GLint offset )
{
struct brw_reg reg = brw_vec4_grf(0, 0);
return reg;
}
-static __inline struct brw_reg brw_vec1_indirect( GLuint subnr,
+static INLINE struct brw_reg brw_vec1_indirect( GLuint subnr,
GLint offset )
{
struct brw_reg reg = brw_vec1_grf(0, 0);
return reg;
}
-static __inline struct brw_reg deref_4f(struct brw_indirect ptr, GLint offset)
+static INLINE struct brw_reg deref_4f(struct brw_indirect ptr, GLint offset)
{
return brw_vec4_indirect(ptr.addr_subnr, ptr.addr_offset + offset);
}
-static __inline struct brw_reg deref_1f(struct brw_indirect ptr, GLint offset)
+static INLINE struct brw_reg deref_1f(struct brw_indirect ptr, GLint offset)
{
return brw_vec1_indirect(ptr.addr_subnr, ptr.addr_offset + offset);
}
-static __inline struct brw_reg deref_4b(struct brw_indirect ptr, GLint offset)
+static INLINE struct brw_reg deref_4b(struct brw_indirect ptr, GLint offset)
{
return retype(deref_4f(ptr, offset), BRW_REGISTER_TYPE_B);
}
-static __inline struct brw_reg deref_1uw(struct brw_indirect ptr, GLint offset)
+static INLINE struct brw_reg deref_1uw(struct brw_indirect ptr, GLint offset)
{
return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_UW);
}
-static __inline struct brw_reg deref_1d(struct brw_indirect ptr, GLint offset)
+static INLINE struct brw_reg deref_1d(struct brw_indirect ptr, GLint offset)
{
return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_D);
}
-static __inline struct brw_reg deref_1ud(struct brw_indirect ptr, GLint offset)
+static INLINE struct brw_reg deref_1ud(struct brw_indirect ptr, GLint offset)
{
return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_UD);
}
-static __inline struct brw_reg get_addr_reg(struct brw_indirect ptr)
+static INLINE struct brw_reg get_addr_reg(struct brw_indirect ptr)
{
return brw_address_reg(ptr.addr_subnr);
}
-static __inline struct brw_indirect brw_indirect_offset( struct brw_indirect ptr, GLint offset )
+static INLINE struct brw_indirect brw_indirect_offset( struct brw_indirect ptr, GLint offset )
{
ptr.addr_offset += offset;
return ptr;
}
-static __inline struct brw_indirect brw_indirect( GLuint addr_subnr, GLint offset )
+static INLINE struct brw_indirect brw_indirect( GLuint addr_subnr, GLint offset )
{
struct brw_indirect ptr;
ptr.addr_subnr = addr_subnr;
return ptr;
}
-static __inline struct brw_instruction *current_insn( struct brw_compile *p)
+static INLINE struct brw_instruction *current_insn( struct brw_compile *p)
{
return &p->store[p->nr_insn];
}