diff options
author | Rob Clark <[email protected]> | 2014-09-29 09:59:27 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-09-29 18:30:43 -0400 |
commit | 3541705816f18bce0f9f6794e9b1c409a81ed98e (patch) | |
tree | 0eef2628dafa5daed13d1f82985a87875cf77251 /src/gallium/drivers/freedreno/freedreno_lowering.h | |
parent | a6746d11247cdd6f795c7e857019c3a4bd71e26a (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.h | 10 |
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( |