summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_prim_setup.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-26 10:13:39 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-02-26 10:13:39 -0700
commitf74279002a0ae0b106bd5410487ef9c0e9b1d8b6 (patch)
treef9273881651ea0df206c6281337f6872df2878db /src/gallium/drivers/softpipe/sp_prim_setup.c
parent1410b7bb509ef37c41043b173bc1047257483af0 (diff)
gallium: added tgsi_shader_field to sp_fragment_shader
Use the shader semantic info from there, instead of from pipe_shader_state. Carry this idea to draw module and other drivers...
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_prim_setup.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_setup.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/softpipe/sp_prim_setup.c b/src/gallium/drivers/softpipe/sp_prim_setup.c
index b6a3fddb29c..17284539b00 100644
--- a/src/gallium/drivers/softpipe/sp_prim_setup.c
+++ b/src/gallium/drivers/softpipe/sp_prim_setup.c
@@ -514,7 +514,7 @@ setup_fragcoord_coeff(struct setup_stage *setup, uint slot)
static void setup_tri_coefficients( struct setup_stage *setup )
{
struct softpipe_context *softpipe = setup->softpipe;
- const struct pipe_shader_state *fs = &softpipe->fs->shader;
+ const struct sp_fragment_shader *spfs = softpipe->fs;
const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe);
uint fragSlot;
@@ -525,7 +525,7 @@ static void setup_tri_coefficients( struct setup_stage *setup )
/* setup interpolation for all the remaining attributes:
*/
- for (fragSlot = 0; fragSlot < fs->num_inputs; fragSlot++) {
+ for (fragSlot = 0; fragSlot < spfs->info.num_inputs; fragSlot++) {
const uint vertSlot = vinfo->src_index[fragSlot];
uint j;
@@ -549,7 +549,7 @@ static void setup_tri_coefficients( struct setup_stage *setup )
assert(0);
}
- if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
+ if (spfs->info.input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
/* FOG.y = front/back facing XXX fix this */
setup->coef[fragSlot].a0[1] = 1.0f - setup->quad.facing;
setup->coef[fragSlot].dadx[1] = 0.0;
@@ -757,7 +757,7 @@ static INLINE void
setup_line_coefficients(struct setup_stage *setup, struct prim_header *prim)
{
struct softpipe_context *softpipe = setup->softpipe;
- const struct pipe_shader_state *fs = &setup->softpipe->fs->shader;
+ const struct sp_fragment_shader *spfs = softpipe->fs;
const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe);
uint fragSlot;
@@ -779,7 +779,7 @@ setup_line_coefficients(struct setup_stage *setup, struct prim_header *prim)
/* setup interpolation for all the remaining attributes:
*/
- for (fragSlot = 0; fragSlot < fs->num_inputs; fragSlot++) {
+ for (fragSlot = 0; fragSlot < spfs->info.num_inputs; fragSlot++) {
const uint vertSlot = vinfo->src_index[fragSlot];
uint j;
@@ -803,7 +803,7 @@ setup_line_coefficients(struct setup_stage *setup, struct prim_header *prim)
assert(0);
}
- if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
+ if (spfs->info.input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
/* FOG.y = front/back facing XXX fix this */
setup->coef[fragSlot].a0[1] = 1.0f - setup->quad.facing;
setup->coef[fragSlot].dadx[1] = 0.0;
@@ -967,7 +967,7 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
{
struct setup_stage *setup = setup_stage( stage );
struct softpipe_context *softpipe = setup->softpipe;
- const struct pipe_shader_state *fs = &softpipe->fs->shader;
+ const struct sp_fragment_shader *spfs = softpipe->fs;
const struct vertex_header *v0 = prim->v[0];
const int sizeAttr = setup->softpipe->psize_slot;
const float size
@@ -1002,7 +1002,7 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
const_coeff(setup, &setup->posCoef, 0, 2);
const_coeff(setup, &setup->posCoef, 0, 3);
- for (fragSlot = 0; fragSlot < fs->num_inputs; fragSlot++) {
+ for (fragSlot = 0; fragSlot < spfs->info.num_inputs; fragSlot++) {
const uint vertSlot = vinfo->src_index[fragSlot];
uint j;
@@ -1025,7 +1025,7 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
assert(0);
}
- if (fs->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
+ if (spfs->info.input_semantic_name[fragSlot] == TGSI_SEMANTIC_FOG) {
/* FOG.y = front/back facing XXX fix this */
setup->coef[fragSlot].a0[1] = 1.0f - setup->quad.facing;
setup->coef[fragSlot].dadx[1] = 0.0;