Please avoid TGSI_SAT_MINUS_PLUS_ONE. Nobody uses it, hardly anybody implements it.
Marek On Thu, Jan 8, 2015 at 1:49 AM, Ilia Mirkin <[email protected]> wrote: > On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy <[email protected]> wrote: >> This is wine (and windows) behaviour. >> >> Signed-off-by: Axel Davy <[email protected]> >> >> Cc: "10.4" <[email protected]> >> --- >> src/gallium/state_trackers/nine/nine_shader.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/src/gallium/state_trackers/nine/nine_shader.c >> b/src/gallium/state_trackers/nine/nine_shader.c >> index 3fefce4..fb01408 100644 >> --- a/src/gallium/state_trackers/nine/nine_shader.c >> +++ b/src/gallium/state_trackers/nine/nine_shader.c >> @@ -854,6 +854,13 @@ tx_src_param(struct shader_translator *tx, const struct >> sm1_src_param *param) >> nine_info_mark_const_f_used(tx->info, param->idx); >> src = ureg_src_register(TGSI_FILE_CONSTANT, param->idx); >> } >> + if (!IS_VS && tx->version.major < 2) { >> + /* ps 1.X clamps constants */ >> + tmp = tx_scratch(tx); >> + ureg_MIN(ureg, tmp, src, ureg_imm1f(ureg, 1.0f)); >> + ureg_MAX(ureg, tmp, ureg_src(tmp), ureg_imm1f(ureg, -1.0f)); >> + src = ureg_src(tmp); > > FWIW there's a TGSI_SAT_MINUS_PLUS_ONE, which I guess is what you're > trying to do here. Not sure if any hw actually implements it as > something other than min/max as you have it. > >> + } >> break; >> case D3DSPR_CONST2: >> case D3DSPR_CONST3: >> -- >> 2.1.3 >> >> _______________________________________________ >> mesa-dev mailing list >> [email protected] >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ > mesa-dev mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
