[Mesa-dev] [PATCH 20/59] glsl: Add 64-bit integer support to some operations.

Ian Romanick idr at freedesktop.org
Thu Oct 27 00:54:54 UTC 2016


On 10/26/2016 01:42 PM, Matt Turner wrote:
> On Tue, Oct 25, 2016 at 5:59 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> From: Dave Airlie <airlied at redhat.com>
>>
>> This adds 64-bit integer support to some AST and IR operations where
>> it is needed.
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>> ---
>>  src/compiler/glsl/ast_to_hir.cpp  | 12 ++++++------
>>  src/compiler/glsl/ir_validate.cpp |  4 ++--
>>  2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
>> index b43e4fa..8aec2ea 100644
>> --- a/src/compiler/glsl/ast_to_hir.cpp
>> +++ b/src/compiler/glsl/ast_to_hir.cpp
>> @@ -533,12 +533,12 @@ bit_logic_result_type(ir_rvalue * &value_a, ir_rvalue * &value_b,
>>      *     (|). The operands must be of type signed or unsigned integers or
>>      *     integer vectors."
>>      */
>> -   if (!type_a->is_integer()) {
>> +   if (!type_a->is_integer_32_64()) {
> 
> "is_integer()" doesn't imply to me "but not 64-bit". Presumably we
> decided that changing all existing uses of is_integer() was a bridge
> too far?
> 
> There really aren't *that* many (less than 40). Would we rather add
> 64-bit cases to is_integer() and add and use a new is_integer_32()
> method in place of existing is_integer() calls?

Dave and I had some discussion about this when he sent the patch out.
See https://patchwork.freedesktop.org/patch/94140/.  We basically
decided to punt on it until 8- and 16-bit support is added as that will
make things more messy... and probably invalidate whatever we decide to
do now.  We opted to be lazy and use what was already typed, but I don't
think either of us was married to that decision.



More information about the mesa-dev mailing list