summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorDarius Goad <[email protected]>2014-08-07 22:51:48 +0200
committerRoland Scheidegger <[email protected]>2014-08-08 18:54:08 +0200
commit549229631849c0caa6826f2eb1170909f5e21c33 (patch)
treedf8d88bdfcf7ea1312938f97be1544342cc62a79 /src/gallium/auxiliary/gallivm
parent394ea139c7cf577fe00d38634e697c3a740d4ccd (diff)
gallivm: Handle MSAA textures in emit_fetch_texels
This support is preliminary due to the fact that MSAA is not actually implemented. However, this patch does fix the piglit test: spec/!OpenGL 3.2/glsl-resource-not-bound 2DMS (bug #79740). (v2 RS: don't emit 4th coord as explicit lod) Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index f54e85649c6..93c926ade94 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -2367,9 +2367,11 @@ emit_fetch_texels( struct lp_build_tgsi_soa_context *bld,
break;
case TGSI_TEXTURE_2D:
case TGSI_TEXTURE_RECT:
+ case TGSI_TEXTURE_2D_MSAA:
dims = 2;
break;
case TGSI_TEXTURE_2D_ARRAY:
+ case TGSI_TEXTURE_2D_ARRAY_MSAA:
layer_coord = 2;
dims = 2;
break;
@@ -2381,11 +2383,14 @@ emit_fetch_texels( struct lp_build_tgsi_soa_context *bld,
return;
}
- /* always have lod except for buffers ? */
- if (target != TGSI_TEXTURE_BUFFER) {
+ /* always have lod except for buffers and msaa targets ? */
+ if (target != TGSI_TEXTURE_BUFFER &&
+ target != TGSI_TEXTURE_2D_MSAA &&
+ target != TGSI_TEXTURE_2D_ARRAY_MSAA) {
explicit_lod = lp_build_emit_fetch(&bld->bld_base, inst, 0, 3);
lod_property = lp_build_lod_property(&bld->bld_base, inst, 0);
}
+ /* XXX: for real msaa support, the w component would be the sample index. */
for (i = 0; i < dims; i++) {
coords[i] = lp_build_emit_fetch(&bld->bld_base, inst, 0, i);