llvmpipe: Human friendlier sampler state dump.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 25 Oct 2009 12:27:14 +0000 (12:27 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 25 Oct 2009 12:27:14 +0000 (12:27 +0000)
src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c
src/gallium/drivers/llvmpipe/lp_state_fs.c

index 42e4ee6986d02c4901520c164c0c270e28331bd9..47b68b71e25ff5a6aae4255df93dd153ab2d0cf6 100644 (file)
@@ -35,6 +35,7 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
 #include "util/u_debug.h"
+#include "util/u_debug_dump.h"
 #include "util/u_memory.h"
 #include "util/u_math.h"
 #include "util/u_format.h"
@@ -171,7 +172,8 @@ lp_build_sample_wrap(struct lp_build_sample_context *bld,
    case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
    case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
       /* FIXME */
-      _debug_printf("warning: failed to translate texture wrap mode %u\n", wrap_mode);
+      _debug_printf("warning: failed to translate texture wrap mode %s\n",
+                    debug_dump_tex_wrap(wrap_mode, TRUE));
       coord = lp_build_max(int_coord_bld, coord, int_coord_bld->zero);
       coord = lp_build_min(int_coord_bld, coord, length_minus_one);
       break;
index 530a2d448c85b0486d4cd5681a87cc67dbe770b5..2e9aa9fffe377ac9abc972eef7b6c41761dea364 100644 (file)
@@ -423,15 +423,26 @@ generate_fragment(struct llvmpipe_context *lp,
    for(i = 0; i < PIPE_MAX_SAMPLERS; ++i) {
       if(key->sampler[i].format) {
          debug_printf("sampler[%u] = \n", i);
-         debug_printf("  .format = %s\n", pf_name(key->sampler[i].format));
-         debug_printf("  .target = %u\n", key->sampler[i].target);
-         debug_printf("  .pot = %u%u%u\n", key->sampler[i].pot_width, key->sampler[i].pot_height, key->sampler[i].pot_depth);
-         debug_printf("  .wrap = %u %u %u\n", key->sampler[i].wrap_s, key->sampler[i].wrap_t, key->sampler[i].wrap_r);
-         debug_printf("  .min_img_filter = %u\n", key->sampler[i].min_img_filter);
-         debug_printf("  .min_mip_filter = %u\n", key->sampler[i].min_mip_filter);
-         debug_printf("  .mag_img_filter = %u\n", key->sampler[i].mag_img_filter);
+         debug_printf("  .format = %s\n",
+                      pf_name(key->sampler[i].format));
+         debug_printf("  .target = %s\n",
+                      debug_dump_tex_target(key->sampler[i].target, TRUE));
+         debug_printf("  .pot = %u %u %u\n",
+                      key->sampler[i].pot_width,
+                      key->sampler[i].pot_height,
+                      key->sampler[i].pot_depth);
+         debug_printf("  .wrap = %s %s %s\n",
+                      debug_dump_tex_wrap(key->sampler[i].wrap_s, TRUE),
+                      debug_dump_tex_wrap(key->sampler[i].wrap_t, TRUE),
+                      debug_dump_tex_wrap(key->sampler[i].wrap_r, TRUE));
+         debug_printf("  .min_img_filter = %s\n",
+                      debug_dump_tex_filter(key->sampler[i].min_img_filter, TRUE));
+         debug_printf("  .min_mip_filter = %s\n",
+                      debug_dump_tex_mipfilter(key->sampler[i].min_mip_filter, TRUE));
+         debug_printf("  .mag_img_filter = %s\n",
+                      debug_dump_tex_filter(key->sampler[i].mag_img_filter, TRUE));
          if(key->sampler[i].compare_mode)
-            debug_printf("  .compare_mode = %s\n", debug_dump_blend_func(key->sampler[i].compare_func, TRUE));
+            debug_printf("  .compare_mode = %s\n", debug_dump_func(key->sampler[i].compare_func, TRUE));
          debug_printf("  .normalized_coords = %u\n", key->sampler[i].normalized_coords);
          debug_printf("  .prefilter = %u\n", key->sampler[i].prefilter);
       }