Module: Mesa Branch: master Commit: eb965719abfe740a09c839565a3f0d9f286be130 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb965719abfe740a09c839565a3f0d9f286be130
Author: Jason Ekstrand <[email protected]> Date: Tue Oct 6 12:40:45 2020 -0500 compiler/types: Allow images and samplers in get_explicit_type_for_size_align Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069> --- src/compiler/glsl_types.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp index b0c99e82ad0..a4755798744 100644 --- a/src/compiler/glsl_types.cpp +++ b/src/compiler/glsl_types.cpp @@ -2472,7 +2472,11 @@ const glsl_type * glsl_type::get_explicit_type_for_size_align(glsl_type_size_align_func type_info, unsigned *size, unsigned *alignment) const { - if (this->is_scalar()) { + if (this->is_image() || this->is_sampler()) { + type_info(this, size, alignment); + assert(*alignment > 0); + return this; + } else if (this->is_scalar()) { type_info(this, size, alignment); assert(*size == explicit_type_scalar_byte_size(this)); assert(*alignment == explicit_type_scalar_byte_size(this)); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
