gallivm: fix a trivial txq issue for 2d shadow and cube shadow samplers
authorRoland Scheidegger <sroland@vmware.com>
Thu, 29 Nov 2012 03:00:35 +0000 (04:00 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 29 Nov 2012 14:31:46 +0000 (15:31 +0100)
untested (couldn't get the piglit test to run even with version overrides)
but seemed blatantly wrong.
In any case it would only affect an error case which when it would happen
probably all hope is lost anyway.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c

index b94e12cb77f83de197a03561ea87739cabc18e95..cdc784cf0df356d6e87d7fcffc4f3deee85582a5 100644 (file)
@@ -1408,13 +1408,13 @@ emit_txq( struct lp_build_tgsi_soa_context *bld,
    switch (inst->Texture.Texture) {
    case TGSI_TEXTURE_1D:
    case TGSI_TEXTURE_SHADOW1D:
-   case TGSI_TEXTURE_SHADOW2D:
-   case TGSI_TEXTURE_SHADOWCUBE:
       num_coords = 1;
       has_lod = 1;
       break;
    case TGSI_TEXTURE_2D:
+   case TGSI_TEXTURE_SHADOW2D:
    case TGSI_TEXTURE_CUBE:
+   case TGSI_TEXTURE_SHADOWCUBE:
    case TGSI_TEXTURE_1D_ARRAY:
    case TGSI_TEXTURE_SHADOW1D_ARRAY:
       num_coords = 2;