Mesa (lp-binning): llvmpipe: Tell setup shader inputs.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Oct 9 15:18:58 UTC 2009


Module: Mesa
Branch: lp-binning
Commit: b0cd386e777912df115858d90f2eec31811c2d9c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b0cd386e777912df115858d90f2eec31811c2d9c

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Oct  9 16:18:03 2009 +0100

llvmpipe: Tell setup shader inputs.

---

 src/gallium/drivers/llvmpipe/lp_state_derived.c |   30 +++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index 00903c8..a18efcc 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -144,6 +144,36 @@ llvmpipe_get_vertex_info(struct llvmpipe_context *llvmpipe)
       }
 
       draw_compute_vertex_size(vinfo);
+
+      {
+         struct lp_shader_input inputs[PIPE_MAX_SHADER_INPUTS];
+
+         for (i = 0; i < lpfs->info.num_inputs; i++) {
+            switch (vinfo->attrib[i].interp_mode) {
+            case INTERP_CONSTANT:
+               inputs[i].interp = LP_INTERP_CONSTANT;
+               break;
+            case INTERP_LINEAR:
+               inputs[i].interp = LP_INTERP_LINEAR;
+               break;
+            case INTERP_PERSPECTIVE:
+               inputs[i].interp = LP_INTERP_PERSPECTIVE;
+               break;
+            case INTERP_POS:
+               inputs[i].interp = LP_INTERP_POSITION;
+               break;
+            default:
+               assert(0);
+            }
+
+            if (lpfs->info.input_semantic_name[i] == TGSI_SEMANTIC_FACE)
+               inputs[i].interp = LP_INTERP_FACING;
+
+            inputs[i].src_index = vinfo->attrib[i].src_index;
+         }
+
+         lp_setup_set_fs_inputs(llvmpipe->setup, inputs, lpfs->info.num_inputs);
+      }
    }
 
    return vinfo;




More information about the mesa-commit mailing list