summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_sf_emit.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-11-25 15:46:34 -0800
committerKenneth Graunke <kenneth@whitecape.org>2013-12-05 13:59:18 -0800
commita7bdd4cba8ddcab8dff59ecaaa7efbd436c6c307 (patch)
treeb312572e9a4e30db2dbb66116b65617ba5e6e72b /src/mesa/drivers/dri/i965/brw_sf_emit.c
parentd542c45c75671e93a1cfae1f0eaf9c12f082f4f1 (diff)
downloadexternal_mesa3d-a7bdd4cba8ddcab8dff59ecaaa7efbd436c6c307.zip
external_mesa3d-a7bdd4cba8ddcab8dff59ecaaa7efbd436c6c307.tar.gz
external_mesa3d-a7bdd4cba8ddcab8dff59ecaaa7efbd436c6c307.tar.bz2
i965: Drop trailing whitespace from the rest of the driver.
Performed via: $ for file in *; do sed -i 's/ *//g'; done Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sf_emit.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_emit.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index b206797..d3feabf 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
*/
-
+
#include "main/glheader.h"
#include "main/macros.h"
@@ -95,7 +95,7 @@ have_attr(struct brw_sf_compile *c, GLuint attr)
return (c->key.attrs & BITFIELD64_BIT(attr)) ? 1 : 0;
}
-/***********************************************************************
+/***********************************************************************
* Twoside lighting
*/
static void copy_bfc( struct brw_sf_compile *c,
@@ -107,7 +107,7 @@ static void copy_bfc( struct brw_sf_compile *c,
for (i = 0; i < 2; i++) {
if (have_attr(c, VARYING_SLOT_COL0+i) &&
have_attr(c, VARYING_SLOT_BFC0+i))
- brw_MOV(p,
+ brw_MOV(p,
get_varying(c, vert, VARYING_SLOT_COL0+i),
get_varying(c, vert, VARYING_SLOT_BFC0+i));
}
@@ -237,7 +237,7 @@ static void do_flatshade_line( struct brw_sf_compile *c )
GLuint nr;
GLuint jmpi = 1;
- /* Already done in clip program:
+ /* Already done in clip program:
*/
if (c->key.primitive == SF_UNFILLED_TRIS)
return;
@@ -248,7 +248,7 @@ static void do_flatshade_line( struct brw_sf_compile *c )
nr = count_flatshaded_attributes(c);
brw_push_insn_state(p);
-
+
brw_MUL(p, c->pv, c->pv, brw_imm_d(jmpi*(nr+1)));
brw_JMPI(p, ip, ip, c->pv);
copy_flatshaded_attributes(c, c->vert[1], c->vert[0]);
@@ -287,7 +287,7 @@ static void alloc_regs( struct brw_sf_compile *c )
c->inv_w[1] = brw_vec1_grf(2, 3);
c->z[2] = brw_vec1_grf(2, 4);
c->inv_w[2] = brw_vec1_grf(2, 5);
-
+
/* The vertices:
*/
reg = 3;
@@ -306,7 +306,7 @@ static void alloc_regs( struct brw_sf_compile *c )
/* Note grf allocation:
*/
c->prog_data.total_grf = reg;
-
+
/* Outputs of this program - interpolation coefficients for
* rasterization:
@@ -328,7 +328,7 @@ static void copy_z_inv_w( struct brw_sf_compile *c )
*/
for (i = 0; i < c->nr_verts; i++)
brw_MOV(p, vec2(suboffset(c->vert[i], 2)), vec2(c->z[i]));
-
+
brw_pop_insn_state(p);
}
@@ -338,10 +338,10 @@ static void invert_det( struct brw_sf_compile *c)
/* Looks like we invert all 8 elements just to get 1/det in
* position 2 !?!
*/
- brw_math(&c->func,
- c->inv_det,
+ brw_math(&c->func,
+ c->inv_det,
BRW_MATH_FUNCTION_INV,
- 0,
+ 0,
c->det,
BRW_MATH_DATA_SCALAR,
BRW_MATH_PRECISION_FULL);
@@ -362,7 +362,7 @@ calculate_masks(struct brw_sf_compile *c,
*pc_persp = 0;
*pc_linear = 0;
*pc = 0xf;
-
+
interp = c->key.interpolation_mode.mode[vert_reg_to_vue_slot(c, reg, 0)];
if (interp == INTERP_QUALIFIER_SMOOTH) {
*pc_linear = 0xf;
@@ -430,13 +430,13 @@ void brw_emit_tri_setup(struct brw_sf_compile *c, bool allocate)
invert_det(c);
copy_z_inv_w(c);
- if (c->key.do_twoside_color)
+ if (c->key.do_twoside_color)
do_twoside_color(c);
if (c->has_flat_shading)
do_flatshade_triangle(c);
-
-
+
+
for (i = 0; i < c->nr_setup_regs; i++)
{
/* Pair of incoming attributes:
@@ -454,10 +454,10 @@ void brw_emit_tri_setup(struct brw_sf_compile *c, bool allocate)
brw_MUL(p, a1, a1, c->inv_w[1]);
brw_MUL(p, a2, a2, c->inv_w[2]);
}
-
-
+
+
/* Calculate coefficients for interpolated values:
- */
+ */
if (pc_linear)
{
brw_set_predicate_control_flag_value(p, pc_linear);
@@ -479,15 +479,15 @@ void brw_emit_tri_setup(struct brw_sf_compile *c, bool allocate)
}
{
- brw_set_predicate_control_flag_value(p, pc);
+ brw_set_predicate_control_flag_value(p, pc);
/* start point for interpolation
*/
brw_MOV(p, c->m3C0, a0);
-
+
/* Copy m0..m3 to URB. m0 is implicitly copied from r0 in
* the send instruction:
- */
- brw_urb_WRITE(p,
+ */
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0), /* r0, will be copied to m0 */
@@ -539,11 +539,11 @@ void brw_emit_line_setup(struct brw_sf_compile *c, bool allocate)
/* Calculate coefficients for position, color:
*/
if (pc_linear) {
- brw_set_predicate_control_flag_value(p, pc_linear);
+ brw_set_predicate_control_flag_value(p, pc_linear);
brw_ADD(p, c->a1_sub_a0, a1, negate(a0));
- brw_MUL(p, c->tmp, c->a1_sub_a0, c->dx0);
+ 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);
@@ -551,15 +551,15 @@ void brw_emit_line_setup(struct brw_sf_compile *c, bool allocate)
}
{
- brw_set_predicate_control_flag_value(p, pc);
+ brw_set_predicate_control_flag_value(p, pc);
/* start point for interpolation
*/
brw_MOV(p, c->m3C0, a0);
- /* Copy m0..m3 to URB.
+ /* Copy m0..m3 to URB.
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
@@ -568,9 +568,9 @@ void brw_emit_line_setup(struct brw_sf_compile *c, bool allocate)
4, /* msg len */
0, /* response len */
i*4, /* urb destination offset */
- BRW_URB_SWIZZLE_TRANSPOSE);
+ BRW_URB_SWIZZLE_TRANSPOSE);
}
- }
+ }
}
void brw_emit_point_sprite_setup(struct brw_sf_compile *c, bool allocate)
@@ -669,7 +669,7 @@ void brw_emit_point_setup(struct brw_sf_compile *c, bool allocate)
GLuint i;
c->nr_verts = 1;
-
+
if (allocate)
alloc_regs(c);
@@ -683,7 +683,7 @@ void brw_emit_point_setup(struct brw_sf_compile *c, bool allocate)
struct brw_reg a0 = offset(c->vert[0], i);
GLushort pc, pc_persp, pc_linear;
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
@@ -699,13 +699,13 @@ void brw_emit_point_setup(struct brw_sf_compile *c, bool allocate)
* code in the fragment shader.
*/
{
- brw_set_predicate_control_flag_value(p, pc);
+ brw_set_predicate_control_flag_value(p, pc);
brw_MOV(p, c->m3C0, a0); /* constant value */
- /* Copy m0..m3 to URB.
+ /* Copy m0..m3 to URB.
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
@@ -724,11 +724,11 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
struct brw_compile *p = &c->func;
struct brw_reg ip = brw_ip_reg();
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 payload_attr = get_element_ud(brw_vec1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0), 0);
struct brw_reg primmask;
int jmp;
struct brw_reg v1_null_ud = vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD));
-
+
GLuint saveflag;
c->nr_verts = 3;
@@ -750,7 +750,7 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
jmp = brw_JMPI(p, ip, ip, brw_imm_d(0)) - p->store;
{
saveflag = p->flag_value;
- brw_push_insn_state(p);
+ brw_push_insn_state(p);
brw_emit_tri_setup( c, false );
brw_pop_insn_state(p);
p->flag_value = saveflag;
@@ -771,25 +771,25 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
jmp = brw_JMPI(p, ip, ip, brw_imm_d(0)) - p->store;
{
saveflag = p->flag_value;
- brw_push_insn_state(p);
+ brw_push_insn_state(p);
brw_emit_line_setup( c, false );
brw_pop_insn_state(p);
p->flag_value = saveflag;
/* note - thread killed in subroutine */
}
- brw_land_fwd_jump(p, jmp);
+ brw_land_fwd_jump(p, jmp);
brw_set_conditionalmod(p, BRW_CONDITIONAL_Z);
brw_AND(p, v1_null_ud, payload_attr, brw_imm_ud(1<<BRW_SPRITE_POINT_ENABLE));
jmp = brw_JMPI(p, ip, ip, brw_imm_d(0)) - p->store;
{
saveflag = p->flag_value;
- brw_push_insn_state(p);
+ brw_push_insn_state(p);
brw_emit_point_sprite_setup( c, false );
brw_pop_insn_state(p);
p->flag_value = saveflag;
}
- brw_land_fwd_jump(p, jmp);
+ brw_land_fwd_jump(p, jmp);
brw_emit_point_setup( c, false );
}