summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_setup.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-09-30 15:59:37 +0200
committerMarek Olšák <[email protected]>2014-10-04 15:16:14 +0200
commit7dc016419232f281d7d65f15c065e7587ab5b8db (patch)
tree583366cf50c54a022da91820021ba8730a3ded4c /src/gallium/drivers/softpipe/sp_setup.c
parent8860584045f8c534264f9d456bfafdb545d81437 (diff)
tgsi: remove some not so useful variables from tgsi_shader_info
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_setup.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index 7937e10ad8a..989ed9c601b 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -562,17 +562,21 @@ static void
setup_fragcoord_coeff(struct setup_context *setup, uint slot)
{
const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info;
+ boolean origin_lower_left =
+ fsInfo->properties[TGSI_PROPERTY_FS_COORD_ORIGIN][0];
+ boolean pixel_center_integer =
+ fsInfo->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER][0];
/*X*/
- setup->coef[slot].a0[0] = fsInfo->pixel_center_integer ? 0.0f : 0.5f;
+ setup->coef[slot].a0[0] = pixel_center_integer ? 0.0f : 0.5f;
setup->coef[slot].dadx[0] = 1.0f;
setup->coef[slot].dady[0] = 0.0f;
/*Y*/
setup->coef[slot].a0[1] =
- (fsInfo->origin_lower_left ? setup->softpipe->framebuffer.height-1 : 0)
- + (fsInfo->pixel_center_integer ? 0.0f : 0.5f);
+ (origin_lower_left ? setup->softpipe->framebuffer.height-1 : 0)
+ + (pixel_center_integer ? 0.0f : 0.5f);
setup->coef[slot].dadx[1] = 0.0f;
- setup->coef[slot].dady[1] = fsInfo->origin_lower_left ? -1.0f : 1.0f;
+ setup->coef[slot].dady[1] = origin_lower_left ? -1.0f : 1.0f;
/*Z*/
setup->coef[slot].a0[2] = setup->posCoef.a0[2];
setup->coef[slot].dadx[2] = setup->posCoef.dadx[2];