Metal: Fix compilation of GLSL used in test cases.
Added imageStore for 1d textures.
This commit is contained in:
parent
57efef2635
commit
6b8fa899ca
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue