Commit: 6b8fa899ca60ef8b9bc5625bf1a52f3ffc1bc7f2 Author: Jeroen Bakker Date: Tue Jan 31 08:42:33 2023 +0100 Branches: master https://developer.blender.org/rB6b8fa899ca60ef8b9bc5625bf1a52f3ffc1bc7f2
Metal: Fix compilation of GLSL used in test cases. Added imageStore for 1d textures. =================================================================== M source/blender/gpu/shaders/metal/mtl_shader_defines.msl =================================================================== diff --git a/source/blender/gpu/shaders/metal/mtl_shader_defines.msl b/source/blender/gpu/shaders/metal/mtl_shader_defines.msl index f644f5a3722..8dff8982971 100644 --- a/source/blender/gpu/shaders/metal/mtl_shader_defines.msl +++ b/source/blender/gpu/shaders/metal/mtl_shader_defines.msl @@ -736,6 +736,17 @@ inline vec<T, 4> _texture_gather_internal( } /* Texture write support. */ +template<typename S, typename T, access A> +inline void _texture_write_internal(thread _mtl_combined_image_sampler_1d<S, A> tex, + T _coord, + vec<S, 4> value) +{ + float w = tex.texture->get_width(); + if (_coord >= 0 && _coord < w) { + tex.texture->write(value, uint(_coord)); + } +} + template<typename S, typename T, access A> inline void _texture_write_internal(thread _mtl_combined_image_sampler_2d<S, A> tex, T _coord, _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs