[Mesa-stable] [Mesa-dev] [PATCH 1/2] glsl: handle conversions to double when comparing param matches
Ilia Mirkin
imirkin at alum.mit.edu
Mon Jun 22 08:41:25 PDT 2015
http://patchwork.freedesktop.org/patch/52138/
I've already pushed this patch btw, Chris gave me a r-b over IRC. But
it seems I neglected to push the piglit patch, my bad.
On Mon, Jun 22, 2015 at 11:35 AM, Ian Romanick <idr at freedesktop.org> wrote:
> This seems believable... is there a piglit test?
>
> On 06/17/2015 12:15 PM, Ilia Mirkin wrote:
>> This allows mod(int, int) to become selected as float mod when doubles
>> are supported.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> Cc: "10.6" <mesa-stable at lists.freedesktop.org>
>> ---
>> src/glsl/ir_function.cpp | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp
>> index 2b2643c..1319443 100644
>> --- a/src/glsl/ir_function.cpp
>> +++ b/src/glsl/ir_function.cpp
>> @@ -148,9 +148,11 @@ get_parameter_match_type(const ir_variable *param,
>> if (from_type == to_type)
>> return PARAMETER_EXACT_MATCH;
>>
>> - /* XXX: When ARB_gpu_shader_fp64 support is added, check for float->double,
>> - * and int/uint->double conversions
>> - */
>> + if (to_type->base_type == GLSL_TYPE_DOUBLE) {
>> + if (from_type->base_type == GLSL_TYPE_FLOAT)
>> + return PARAMETER_FLOAT_TO_DOUBLE;
>> + return PARAMETER_INT_TO_DOUBLE;
>> + }
>>
>> if (to_type->base_type == GLSL_TYPE_FLOAT)
>> return PARAMETER_INT_TO_FLOAT;
>>
>
More information about the mesa-stable
mailing list