[Mesa-dev] [PATCH] tgsi: use X component of the second operand in exec_scalar_binary()
Roland Scheidegger
sroland at vmware.com
Tue Jul 9 13:32:56 PDT 2013
Am 09.07.2013 21:37, schrieb Brian Paul:
> The code happened to work in the past since the (scalar) src args
> effectively always have a swizzle of .xxxx, .yyyy, .zzzz, or .wwww so
> whether you grab the X or Y component doesn't really matter. Just
> fixing the code to make it look right.
> ---
> src/gallium/auxiliary/tgsi/tgsi_exec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
> index 4482c6b..e89fb77 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
> @@ -2521,7 +2521,7 @@ exec_scalar_binary(struct tgsi_exec_machine *mach,
> union tgsi_exec_channel dst;
>
> fetch_source(mach, &src[0], &inst->Src[0], TGSI_CHAN_X, src_datatype);
> - fetch_source(mach, &src[1], &inst->Src[1], TGSI_CHAN_Y, src_datatype);
> + fetch_source(mach, &src[1], &inst->Src[1], TGSI_CHAN_X, src_datatype);
> op(&dst, &src[0], &src[1]);
> for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
> if (inst->Dst[0].Register.WriteMask & (1 << chan)) {
>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
More information about the mesa-dev
mailing list