Skip to content

Commit 9dd737b

Browse files
committed
nir: add glsl_type_is_integer() helper
Fixes: 1c9c42d ("nir: add varying component packing helpers") Reviewed-by: Jason Ekstrand <[email protected]>
1 parent 5526420 commit 9dd737b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/compiler/nir_types.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ glsl_type_is_boolean(const struct glsl_type *type)
301301
{
302302
return type->is_boolean();
303303
}
304+
bool
305+
glsl_type_is_integer(const struct glsl_type *type)
306+
{
307+
return type->is_integer();
308+
}
304309

305310
const glsl_type *
306311
glsl_void_type(void)

src/compiler/nir_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ bool glsl_type_is_image(const struct glsl_type *type);
142142
bool glsl_type_is_dual_slot(const struct glsl_type *type);
143143
bool glsl_type_is_numeric(const struct glsl_type *type);
144144
bool glsl_type_is_boolean(const struct glsl_type *type);
145+
bool glsl_type_is_integer(const struct glsl_type *type);
145146
bool glsl_sampler_type_is_shadow(const struct glsl_type *type);
146147
bool glsl_sampler_type_is_array(const struct glsl_type *type);
147148
bool glsl_contains_atomic(const struct glsl_type *type);

0 commit comments

Comments
 (0)