summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
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
parent8860584045f8c534264f9d456bfafdb545d81437 (diff)
tgsi: remove some not so useful variables from tgsi_shader_info
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_blend.c5
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c12
-rw-r--r--src/gallium/drivers/svga/svga_state_fs.c2
4 files changed, 14 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 431f31efaf7..c344fc07b0c 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -2323,6 +2323,8 @@ generate_fragment(struct llvmpipe_context *lp,
LLVMValueRef mask_store = lp_build_array_alloca(gallivm, mask_type,
num_loop, "mask_store");
LLVMValueRef color_store[PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS];
+ boolean pixel_center_integer =
+ shader->info.base.properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER][0];
/*
* The shader input interpolation info is not explicitely baked in the
@@ -2333,7 +2335,7 @@ generate_fragment(struct llvmpipe_context *lp,
gallivm,
shader->info.base.num_inputs,
inputs,
- shader->info.base.pixel_center_integer,
+ pixel_center_integer,
builder, fs_type,
a0_ptr, dadx_ptr, dady_ptr,
x, y);
diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c
index 6c52c9071af..d60e5087ac0 100644
--- a/src/gallium/drivers/softpipe/sp_quad_blend.c
+++ b/src/gallium/drivers/softpipe/sp_quad_blend.c
@@ -923,9 +923,8 @@ blend_fallback(struct quad_stage *qs,
struct softpipe_context *softpipe = qs->softpipe;
const struct pipe_blend_state *blend = softpipe->blend;
unsigned cbuf;
- boolean write_all;
-
- write_all = softpipe->fs_variant->info.color0_writes_all_cbufs;
+ boolean write_all =
+ softpipe->fs_variant->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0];
for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++) {
if (softpipe->framebuffer.cbufs[cbuf]) {
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];
diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c
index e714c078405..1e83d2e2da9 100644
--- a/src/gallium/drivers/svga/svga_state_fs.c
+++ b/src/gallium/drivers/svga/svga_state_fs.c
@@ -338,7 +338,7 @@ make_fs_key(const struct svga_context *svga,
== PIPE_SPRITE_COORD_LOWER_LEFT);
/* SVGA_NEW_FRAME_BUFFER */
- if (fs->base.info.color0_writes_all_cbufs) {
+ if (fs->base.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0]) {
/* Replicate color0 output to N colorbuffers */
key->write_color0_to_n_cbufs = svga->curr.framebuffer.nr_cbufs;
}