Metal: Fix compilation of GLSL used in test cases.

Added imageStore for 1d textures.
This commit is contained in:
Jeroen Bakker 2023-01-31 08:42:33 +01:00
parent 57efef2635
commit 6b8fa899ca
1 changed files with 11 additions and 0 deletions

View File

@ -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,