summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-02-04 16:36:55 -0700
committerMichal Krol <[email protected]>2010-02-09 15:32:43 +0100
commitae4dde6598eacb64bf865037bdaea2041499aa27 (patch)
tree10196a57ade89156a1c58e5566277f7487f4a635 /src
parent4a9f1eed2ba02f2ae2bf92d16f89d10f09b2a21e (diff)
st/mesa: check for PROG_PARAM_BIT_CYL_WRAP flag
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c17
-rw-r--r--src/mesa/state_tracker/st_program.c10
2 files changed, 22 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 3eb4c1ccca7..06cf6d21c67 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -825,10 +825,19 @@ st_translate_mesa_program(
if (procType == TGSI_PROCESSOR_FRAGMENT) {
struct gl_fragment_program* fp = (struct gl_fragment_program*)program;
for (i = 0; i < numInputs; i++) {
- t->inputs[i] = ureg_DECL_fs_input(ureg,
- inputSemanticName[i],
- inputSemanticIndex[i],
- interpMode[i]);
+ if (program->InputFlags[0] & PROG_PARAM_BIT_CYL_WRAP) {
+ t->inputs[i] = ureg_DECL_fs_input_cyl(ureg,
+ inputSemanticName[i],
+ inputSemanticIndex[i],
+ interpMode[i],
+ TGSI_CYLINDRICAL_WRAP_X);
+ }
+ else {
+ t->inputs[i] = ureg_DECL_fs_input(ureg,
+ inputSemanticName[i],
+ inputSemanticIndex[i],
+ interpMode[i]);
+ }
}
if (program->InputsRead & FRAG_BIT_WPOS) {
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 21ad6fef2b4..e939ab38218 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -33,6 +33,7 @@
#include "main/imports.h"
#include "main/mtypes.h"
+#include "shader/prog_parameter.h"
#include "shader/prog_print.h"
#include "shader/programopt.h"
@@ -367,7 +368,14 @@ st_translate_fragment_program(struct st_context *st,
assert(attr >= FRAG_ATTRIB_TEX0);
stfp->input_semantic_index[slot] = (attr - FRAG_ATTRIB_TEX0);
stfp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
+
+ /* XXX this test is very temporary */
+ if (stfp->Base.Base.InputFlags[0] & PROG_PARAM_BIT_CYL_WRAP) {
+ interpMode[slot] = TGSI_INTERPOLATE_LINEAR;
+ }
+ else {
+ interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
+ }
break;
}
}