summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_lowering.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-09-29 09:59:27 -0400
committerRob Clark <[email protected]>2014-09-29 18:30:43 -0400
commit3541705816f18bce0f9f6794e9b1c409a81ed98e (patch)
tree0eef2628dafa5daed13d1f82985a87875cf77251 /src/gallium/drivers/freedreno/freedreno_lowering.h
parenta6746d11247cdd6f795c7e857019c3a4bd71e26a (diff)
freedreno: add texcoord clamp support to lowering
This is for hw that needs to emulate some texture wrap modes (like CLAMP) with some help from the shader. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_lowering.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_lowering.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_lowering.h b/src/gallium/drivers/freedreno/freedreno_lowering.h
index 2d36d8faf81..1b0daa96f0e 100644
--- a/src/gallium/drivers/freedreno/freedreno_lowering.h
+++ b/src/gallium/drivers/freedreno/freedreno_lowering.h
@@ -69,6 +69,16 @@ struct fd_lowering_config {
unsigned lower_DPH : 1;
unsigned lower_DP2 : 1;
unsigned lower_DP2A : 1;
+
+ /* To emulate certain texture wrap modes, this can be used
+ * to saturate the specified tex coord to [0.0, 1.0]. The
+ * bits are according to sampler #, ie. if, for example:
+ *
+ * (conf->saturate_s & (1 << n))
+ *
+ * is true, then the s coord for sampler n is saturated.
+ */
+ unsigned saturate_s, saturate_t, saturate_r;
};
const struct tgsi_token * fd_transform_lowering(