1617a3babSopenharmony_ci#version 450 core 2617a3babSopenharmony_ci 3617a3babSopenharmony_cilayout(binding = 1) uniform texture2D tex2D; 4617a3babSopenharmony_cilayout(binding = 1) uniform texture2DMS texMS; 5617a3babSopenharmony_cilayout(binding = 0) uniform textureBuffer buf; 6617a3babSopenharmony_ci 7617a3babSopenharmony_civoid testBad() 8617a3babSopenharmony_ci{ 9617a3babSopenharmony_ci vec4 tex2DFetch = texelFetch(tex2D, ivec2(0, 0), 0); 10617a3babSopenharmony_ci vec4 texMSFetch = texelFetch(texMS, ivec2(0, 0), 0); 11617a3babSopenharmony_ci 12617a3babSopenharmony_ci // Allowed by KHR_vulkan_glsl without the extension. All others should 13617a3babSopenharmony_ci // error. 14617a3babSopenharmony_ci vec4 bufFetch = texelFetch(buf, 0); 15617a3babSopenharmony_ci 16617a3babSopenharmony_ci vec4 tex2DFetchOffset = texelFetchOffset(tex2D, ivec2(0, 0), 0, ivec2(0, 0)); 17617a3babSopenharmony_ci 18617a3babSopenharmony_ci ivec2 tex2DSize = textureSize(tex2D, 0); 19617a3babSopenharmony_ci ivec2 texMSSize = textureSize(texMS); 20617a3babSopenharmony_ci int bufSize = textureSize(buf); 21617a3babSopenharmony_ci 22617a3babSopenharmony_ci int tex2DLevels = textureQueryLevels(tex2D); 23617a3babSopenharmony_ci 24617a3babSopenharmony_ci int texMSSamples = textureSamples(texMS); 25617a3babSopenharmony_ci} 26617a3babSopenharmony_ci 27617a3babSopenharmony_ci#extension GL_EXT_samplerless_texture_functions : enable 28617a3babSopenharmony_ci 29617a3babSopenharmony_civoid main() 30617a3babSopenharmony_ci{ 31617a3babSopenharmony_ci // These should all succeed. 32617a3babSopenharmony_ci 33617a3babSopenharmony_ci vec4 tex2DFetch = texelFetch(tex2D, ivec2(0, 0), 0); 34617a3babSopenharmony_ci vec4 texMSFetch = texelFetch(texMS, ivec2(0, 0), 0); 35617a3babSopenharmony_ci vec4 bufFetch = texelFetch(buf, 0); 36617a3babSopenharmony_ci 37617a3babSopenharmony_ci vec4 tex2DFetchOffset = texelFetchOffset(tex2D, ivec2(0, 0), 0, ivec2(0, 0)); 38617a3babSopenharmony_ci 39617a3babSopenharmony_ci ivec2 tex2DSize = textureSize(tex2D, 0); 40617a3babSopenharmony_ci ivec2 texMSSize = textureSize(texMS); 41617a3babSopenharmony_ci int bufSize = textureSize(buf); 42617a3babSopenharmony_ci 43617a3babSopenharmony_ci int tex2DLevels = textureQueryLevels(tex2D); 44617a3babSopenharmony_ci 45617a3babSopenharmony_ci int texMSSamples = textureSamples(texMS); 46617a3babSopenharmony_ci} 47