On Thu, Apr 7, 2016 at 4:35 PM, Kenneth Graunke wrote:
> Many shaders contain expression trees of the form:
>
> const_1 * (value * const_2)
>
> Reorganizing these to
>
> (const_1 * const_2) * value
>
> will allow constant folding to combine the constants. Sometimes, these
> constants are
On Fri, Apr 8, 2016 at 8:21 AM, Eduardo Lima Mitev wrote:
> On 04/08/2016 01:35 AM, Kenneth Graunke wrote:
>
>> Many shaders contain expression trees of the form:
>>
>> const_1 * (value * const_2)
>>
>> Reorganizing these to
>>
>> (const_1 * const_2) * value
>>
>> will allow constant fo
On 04/08/2016 01:35 AM, Kenneth Graunke wrote:
Many shaders contain expression trees of the form:
const_1 * (value * const_2)
Reorganizing these to
(const_1 * const_2) * value
will allow constant folding to combine the constants. Sometimes, these
constants are 2 and 0.5, so we can
Many shaders contain expression trees of the form:
const_1 * (value * const_2)
Reorganizing these to
(const_1 * const_2) * value
will allow constant folding to combine the constants. Sometimes, these
constants are 2 and 0.5, so we can remove a multiply altogether. Other
times, it can