DECL_TYPE(uimage2DMS, GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_MS, 0, 0, GLSL_TYPE_UINT)
DECL_TYPE(uimage2DMSArray, GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_MS, 0, 1, GLSL_TYPE_UINT)
+DECL_TYPE(subpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS,0, 0, GLSL_TYPE_FLOAT)
+
DECL_TYPE(atomic_uint, GL_UNSIGNED_INT_ATOMIC_COUNTER, GLSL_TYPE_ATOMIC_UINT, 1, 1)
STRUCT_TYPE(gl_DepthRangeParameters)
return error_type;
else
return samplerExternalOES_type;
+ case GLSL_SAMPLER_DIM_SUBPASS:
+ return error_type;
}
case GLSL_TYPE_INT:
if (shadow)
return (array ? isampler2DMSArray_type : isampler2DMS_type);
case GLSL_SAMPLER_DIM_EXTERNAL:
return error_type;
+ case GLSL_SAMPLER_DIM_SUBPASS:
+ return error_type;
}
case GLSL_TYPE_UINT:
if (shadow)
return (array ? usampler2DMSArray_type : usampler2DMS_type);
case GLSL_SAMPLER_DIM_EXTERNAL:
return error_type;
+ case GLSL_SAMPLER_DIM_SUBPASS:
+ return error_type;
}
default:
return error_type;
glsl_type::get_image_instance(enum glsl_sampler_dim dim,
bool array, glsl_base_type type)
{
+ if (dim == GLSL_SAMPLER_DIM_SUBPASS)
+ return subpassInput_type;
switch (type) {
case GLSL_TYPE_FLOAT:
switch (dim) {
case GLSL_SAMPLER_DIM_MS:
return (array ? image2DMSArray_type : image2DMS_type);
case GLSL_SAMPLER_DIM_EXTERNAL:
+ case GLSL_SAMPLER_DIM_SUBPASS:
return error_type;
}
case GLSL_TYPE_INT:
case GLSL_SAMPLER_DIM_MS:
return (array ? iimage2DMSArray_type : iimage2DMS_type);
case GLSL_SAMPLER_DIM_EXTERNAL:
+ case GLSL_SAMPLER_DIM_SUBPASS:
return error_type;
}
case GLSL_TYPE_UINT:
case GLSL_SAMPLER_DIM_MS:
return (array ? uimage2DMSArray_type : uimage2DMS_type);
case GLSL_SAMPLER_DIM_EXTERNAL:
+ case GLSL_SAMPLER_DIM_SUBPASS:
return error_type;
}
default:
case GLSL_SAMPLER_DIM_RECT:
case GLSL_SAMPLER_DIM_MS:
case GLSL_SAMPLER_DIM_EXTERNAL:
+ case GLSL_SAMPLER_DIM_SUBPASS:
size = 2;
break;
case GLSL_SAMPLER_DIM_3D:
GLSL_SAMPLER_DIM_RECT,
GLSL_SAMPLER_DIM_BUF,
GLSL_SAMPLER_DIM_EXTERNAL,
- GLSL_SAMPLER_DIM_MS
+ GLSL_SAMPLER_DIM_MS,
+ GLSL_SAMPLER_DIM_SUBPASS, /* for vulkan input attachments */
};
enum glsl_interface_packing {
GLenum gl_type;
glsl_base_type base_type;
- unsigned sampler_dimensionality:3; /**< \see glsl_sampler_dim */
+ unsigned sampler_dimensionality:4; /**< \see glsl_sampler_dim */
unsigned sampler_shadow:1;
unsigned sampler_array:1;
unsigned sampled_type:2; /**< Type of data returned using this
case GLSL_SAMPLER_DIM_MS:
case GLSL_SAMPLER_DIM_RECT:
case GLSL_SAMPLER_DIM_EXTERNAL:
+ case GLSL_SAMPLER_DIM_SUBPASS:
ret = 2;
break;
case GLSL_SAMPLER_DIM_3D:
case GLSL_SAMPLER_DIM_CUBE:
instr->coord_components = 3;
break;
+ case GLSL_SAMPLER_DIM_SUBPASS:
+ unreachable("can't reach");
}
unsigned src_number = 0;