gallivm: (trivial) fix linear aos sampling of 3d compressed formats
authorRoland Scheidegger <sroland@vmware.com>
Thu, 22 Aug 2013 01:28:11 +0000 (03:28 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 22 Aug 2013 17:05:52 +0000 (19:05 +0200)
block size depth is always 1 even for compressed formats (unless someone
invents true 3d compressed formats at least which we can't represent).
Nearest (and soa) path had it right.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c

index 2573cec2d1bb5873345815fd8c24c00346b11cae..b9227b52fb433d6f3eeb6a860e63458bb701d20f 100644 (file)
@@ -1141,7 +1141,7 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
 
    if (dims >= 3) {
       lp_build_sample_wrap_linear_int(bld,
-                                      bld->format_desc->block.height,
+                                      1, /* block length (depth) */
                                       r_ipart, &r_fpart, r_float,
                                       depth_vec, z_stride, offsets[2],
                                       bld->static_texture_state->pot_depth,
@@ -1233,7 +1233,7 @@ lp_build_sample_image_linear_afloat(struct lp_build_sample_context *bld,
 
       if (dims >= 3) {
          lp_build_sample_wrap_linear_float(bld,
-                                           bld->format_desc->block.height,
+                                           1, /* block length (depth) */
                                            r, depth_vec, offsets[2],
                                            bld->static_texture_state->pot_depth,
                                            bld->static_sampler_state->wrap_r,