compiler: int8/uint8 support

OpenCL kernels also have int8/uint8.

v2: remove changes in nir_search as Jason posted a patch for that

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
Karol Herbst
2018-01-25 07:59:06 -05:00
committed by Rob Clark
parent fcf267ba08
commit b617bfcccf
16 changed files with 128 additions and 0 deletions

View File

@@ -1117,6 +1117,8 @@ do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1)
case GLSL_TYPE_INT64:
case GLSL_TYPE_UINT16:
case GLSL_TYPE_INT16:
case GLSL_TYPE_UINT8:
case GLSL_TYPE_INT8:
return new(mem_ctx) ir_expression(operation, op0, op1);
case GLSL_TYPE_ARRAY: {

View File

@@ -344,6 +344,8 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
case GLSL_TYPE_INT64:
case GLSL_TYPE_UINT16:
case GLSL_TYPE_INT16:
case GLSL_TYPE_UINT8:
case GLSL_TYPE_INT8:
case GLSL_TYPE_SAMPLER:
case GLSL_TYPE_IMAGE:
return new(mem_ctx) ir_constant(this->type, &this->value);

View File

@@ -83,6 +83,8 @@ copy_constant_to_storage(union gl_constant_value *storage,
case GLSL_TYPE_ERROR:
case GLSL_TYPE_UINT16:
case GLSL_TYPE_INT16:
case GLSL_TYPE_UINT8:
case GLSL_TYPE_INT8:
case GLSL_TYPE_FLOAT16:
/* All other types should have already been filtered by other
* paths in the caller.