diff options
author | Brian Paul <[email protected]> | 2008-12-17 18:59:58 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-12-17 18:59:58 -0700 |
commit | 3ffd529ff19bf8dd7b022a267bf2afe44c7f0f65 (patch) | |
tree | e2e6059016cd83dd1af7d80a7cd6ca2965192617 /src/gallium/drivers/softpipe/sp_quad_fs.c | |
parent | d1c8af7c0a18340fdde45ade6f612939a3c8e62a (diff) |
softpipe: fix vertex shader texture sampling
Need to disable/bypass lambda calculation since derivatives of texcoords
are meaningless for adjacent vertices.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_quad_fs.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad_fs.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_fs.c b/src/gallium/drivers/softpipe/sp_quad_fs.c index 963a2b44f55..40329a95627 100644 --- a/src/gallium/drivers/softpipe/sp_quad_fs.c +++ b/src/gallium/drivers/softpipe/sp_quad_fs.c @@ -2,6 +2,7 @@ * * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. + * Copyright 2008 VMware, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the @@ -51,8 +52,6 @@ struct quad_shade_stage { struct quad_stage stage; /**< base class */ - struct sp_shader_sampler samplers[PIPE_MAX_SAMPLERS]; - struct sp_shader_sampler *samplers_list[PIPE_MAX_SAMPLERS]; struct tgsi_exec_machine machine; struct tgsi_exec_vector *inputs, *outputs; }; @@ -151,7 +150,8 @@ static void shade_begin(struct quad_stage *qs) softpipe->fs->prepare( softpipe->fs, &qss->machine, - (struct tgsi_sampler **) qss->samplers_list ); + (struct tgsi_sampler **) + softpipe->tgsi.frag_samplers_list ); qs->next->begin(qs->next); } @@ -184,16 +184,6 @@ struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe ) qss->stage.run = shade_quad; qss->stage.destroy = shade_destroy; - /* setup TGSI sampler state */ - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - assert(softpipe->tex_cache[i]); - qss->samplers[i].base.get_samples = sp_get_samples; - qss->samplers[i].unit = i; - qss->samplers[i].sp = softpipe; - qss->samplers[i].cache = softpipe->tex_cache[i]; - qss->samplers_list[i] = &qss->samplers[i]; - } - tgsi_exec_machine_init( &qss->machine ); return &qss->stage; |