summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_tex_sample.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-09-27 15:05:29 -0600
committerBrian Paul <brianp@vmware.com>2010-09-27 15:06:23 -0600
commitde2dfce0d97aca1b6242eb4db5d6e4b78301bb49 (patch)
treeae1913f54ec024e41b8b837956169f6646a7c205 /src/gallium/drivers/softpipe/sp_tex_sample.c
parent3446af01798bd4bfcdb68f984a3ecd8f7ff9a4a4 (diff)
softpipe: fix swizzling of texture border color
We ask the texture tile cache to swizzle the color for us since that's where the view/swizzling info is available.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tex_sample.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 96ccf1da98..088e48f81f 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -656,7 +656,8 @@ get_texel_2d(const struct sp_sampler_varient *samp,
if (x < 0 || x >= (int) u_minify(texture->width0, level) ||
y < 0 || y >= (int) u_minify(texture->height0, level)) {
- return samp->sampler->border_color;
+ return sp_tex_tile_cache_border_color(samp->cache,
+ samp->sampler->border_color);
}
else {
return get_texel_2d_no_border( samp, addr, x, y );
@@ -750,7 +751,8 @@ get_texel_3d(const struct sp_sampler_varient *samp,
if (x < 0 || x >= (int) u_minify(texture->width0, level) ||
y < 0 || y >= (int) u_minify(texture->height0, level) ||
z < 0 || z >= (int) u_minify(texture->depth0, level)) {
- return samp->sampler->border_color;
+ return sp_tex_tile_cache_border_color(samp->cache,
+ samp->sampler->border_color);
}
else {
return get_texel_3d_no_border( samp, addr, x, y, z );