<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696962#M142935</link>
    <description>&lt;P class=""&gt;Hello.&lt;/P&gt;&lt;P class=""&gt;Thank you for your reply.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The target environment is vulkan1.0. glslangvalidator -v returns:&lt;/P&gt;&lt;PRE&gt;Glslang Version: 11:15.0.0
ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 15.0.0
GLSL Version: 4.60 glslang Khronos. 15.0.0
SPIR-V Version 0x00010600, Revision 1
GLSL.std.450 Version 100, Revision 1
Khronos Tool ID 8
SPIR-V Generator Version 11
GL_KHR_vulkan_glsl version 100
ARB_GL_gl_spirv version 100&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The texture is declared as a readonly RGBA8 image2D. Here is the full GLSL code for the compute shader (also available on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;MRS&lt;/A&gt;).&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#version 460&lt;/SPAN&gt;

&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(&lt;SPAN class=""&gt;local_size_x&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, &lt;SPAN class=""&gt;local_size_y&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, &lt;SPAN class=""&gt;local_size_z&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;) &lt;SPAN class=""&gt;in&lt;/SPAN&gt;;

&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(set = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;binding&lt;/SPAN&gt; = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;rgba8&lt;/SPAN&gt;) &lt;SPAN class=""&gt;uniform&lt;/SPAN&gt; &lt;SPAN class=""&gt;readonly&lt;/SPAN&gt; &lt;SPAN class=""&gt;image2D&lt;/SPAN&gt; image;
&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(set = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;binding&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;) &lt;SPAN class=""&gt;buffer&lt;/SPAN&gt; OutputBuffer {
	&lt;SPAN class=""&gt;uint&lt;/SPAN&gt; width;
	&lt;SPAN class=""&gt;uint&lt;/SPAN&gt; height;
} outputBuffer;

&lt;SPAN class=""&gt;void&lt;/SPAN&gt; main() {
	&lt;SPAN class=""&gt;uvec2&lt;/SPAN&gt; size = &lt;SPAN class=""&gt;uvec2&lt;/SPAN&gt;(&lt;SPAN class=""&gt;imageSize&lt;/SPAN&gt;(image));

	outputBuffer.width = size[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;];
	outputBuffer.height = size[&lt;SPAN class=""&gt;1&lt;/SPAN&gt;];
}&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I could not test with OpenGL &amp;lt; 4.6 because&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="OpenGL 4.6 at a glance" href="https://www.khronos.org/opengl" target="_blank" rel="noopener"&gt;SPIR-V support was added in that version&lt;/A&gt;. However I tried changing the GLSL version to 430, 440 and 450 and the issue was still there.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The image is bound like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;glBindImageTexture&lt;/SPAN&gt;(&lt;SPAN class=""&gt;0&lt;/SPAN&gt;, texture, &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, GL_FALSE, &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, GL_READ_ONLY, GL_RGBA8);&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I'm not using any intermediate tool/post-processing step in both the project in which I found the bug and the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;minimum reproducible sample&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The shader is successfully compiled and the program is successfully linked.&lt;/P&gt;&lt;P class=""&gt;No OpenGL errors are thrown (I have debug output enabled).&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have got the issue with driver versions before 31.0.101.4502, but I don't have the version numbers.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Regards,&lt;/P&gt;&lt;P class=""&gt;debaze&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jun 2025 08:10:02 GMT</pubDate>
    <dc:creator>debaze</dc:creator>
    <dc:date>2025-06-13T08:10:02Z</dc:date>
    <item>
      <title>SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696696#M142890</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I have a test application which copies the width and height of an image2D to a shader storage buffer. The shader I'm using is a SPIR-V compute shader generated from GLSL.&lt;/P&gt;&lt;P&gt;I'm using GLSL's imageSize&amp;nbsp;function to get the image dimensions, however it returns 0.&lt;/P&gt;&lt;P&gt;I've written an &lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;minimum reproducible sample&lt;/A&gt; to demonstrate the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Description&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an HP Victus (7L1J7EA) laptop with an Intel Core i5-12450H and Windows 11 Home 24H2.&lt;/P&gt;&lt;P&gt;I can reproduce the issue when every requirement below is met:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The graphics API is OpenGL 4.6&lt;/LI&gt;&lt;LI&gt;The GPU is Intel UHD Graphics for 12th Gen Intel Processors (Intel Graphics Driver 31.0.101.4502)&lt;/LI&gt;&lt;LI&gt;The shader code is a SPIR-V binary generated from GLSL&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I cannot reproduce the issue when at least one of the requirements below is not met:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The graphics API is Vulkan&lt;/LI&gt;&lt;LI&gt;The GPU is an AMD Radeon RX 7900 XTX&lt;/LI&gt;&lt;LI&gt;The GPU is an Intel UHD Graphics 770 (Intel Core i7-13700K)&lt;/LI&gt;&lt;LI&gt;The GPU is a Nvidia GeForce RTX 3050&lt;/LI&gt;&lt;LI&gt;The shader code is a GLSL string&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I've not found many issues about it but &lt;A title="OpenGL imageSize is always zero" href="https://stackoverflow.com/questions/38362596/opengl-imagesize-is-always-zero" target="_blank" rel="noopener"&gt;this&lt;/A&gt; may be related.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Steps to reproduce&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Install GLFW, glad and the Vulkan SDK.&lt;/LI&gt;&lt;LI&gt;Link GLFW and glad to the project.&lt;/LI&gt;&lt;LI&gt;Run&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ImageSize.bat&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to generate the SPIR-V binary.&lt;/LI&gt;&lt;LI&gt;Build and run the project.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Observations&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected console output:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;Using Intel(R) UHD Graphics
Width = 64
Height = 32&lt;/PRE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Actual console output:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;Using Intel(R) UHD Graphics
Width = 0
Height = 0&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is not a blocking issue since I can pass the dimensions as an uniform but it is still an invalid behavior.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jun 2025 13:25:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696696#M142890</guid>
      <dc:creator>debaze</dc:creator>
      <dc:date>2025-06-12T13:25:21Z</dc:date>
    </item>
    <item>
      <title>Re:SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696889#M142924</link>
      <description>&lt;P&gt;Hello&amp;nbsp;debaze,&lt;/P&gt;&lt;P&gt;Thank you for providing such a clear and detailed report, including a reproducible test case and hardware/software conditions. Your observations are highly valuable, and your investigative approach is commendable. I would like to know the following details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What target environment and version were specified during SPIR-V compilation?&lt;/LI&gt;&lt;LI&gt;Is the image2D declared with proper layout qualifiers (like binding, format)?&lt;/LI&gt;&lt;LI&gt;Are you using any intermediate tools or post-processing steps (e.g., SPIR-V optimizer, reflection tools) between GLSL and execution?&lt;/LI&gt;&lt;LI&gt;Can you confirm if the shader is successfully compiled and linked at runtime, and no OpenGL errors (e.g.,&lt;/LI&gt;&lt;LI&gt;GL_INVALID_OPERATION) are being thrown?&lt;/LI&gt;&lt;LI&gt;Does the issue occur with other driver versions (newer or older than 31.0.101.4502)?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Von M.&lt;/P&gt;&lt;P&gt;Intel Customer Support Technician&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Jun 2025 03:14:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696889#M142924</guid>
      <dc:creator>VonM_Intel</dc:creator>
      <dc:date>2025-06-13T03:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696951#M142931</link>
      <description>&lt;P&gt;Edit: My reply didn't appear on the discussion, so I copied it below.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 18:35:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696951#M142931</guid>
      <dc:creator>debaze</dc:creator>
      <dc:date>2025-06-13T18:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696962#M142935</link>
      <description>&lt;P class=""&gt;Hello.&lt;/P&gt;&lt;P class=""&gt;Thank you for your reply.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The target environment is vulkan1.0. glslangvalidator -v returns:&lt;/P&gt;&lt;PRE&gt;Glslang Version: 11:15.0.0
ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 15.0.0
GLSL Version: 4.60 glslang Khronos. 15.0.0
SPIR-V Version 0x00010600, Revision 1
GLSL.std.450 Version 100, Revision 1
Khronos Tool ID 8
SPIR-V Generator Version 11
GL_KHR_vulkan_glsl version 100
ARB_GL_gl_spirv version 100&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The texture is declared as a readonly RGBA8 image2D. Here is the full GLSL code for the compute shader (also available on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;MRS&lt;/A&gt;).&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#version 460&lt;/SPAN&gt;

&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(&lt;SPAN class=""&gt;local_size_x&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, &lt;SPAN class=""&gt;local_size_y&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, &lt;SPAN class=""&gt;local_size_z&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;) &lt;SPAN class=""&gt;in&lt;/SPAN&gt;;

&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(set = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;binding&lt;/SPAN&gt; = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;rgba8&lt;/SPAN&gt;) &lt;SPAN class=""&gt;uniform&lt;/SPAN&gt; &lt;SPAN class=""&gt;readonly&lt;/SPAN&gt; &lt;SPAN class=""&gt;image2D&lt;/SPAN&gt; image;
&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(set = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;binding&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;) &lt;SPAN class=""&gt;buffer&lt;/SPAN&gt; OutputBuffer {
	&lt;SPAN class=""&gt;uint&lt;/SPAN&gt; width;
	&lt;SPAN class=""&gt;uint&lt;/SPAN&gt; height;
} outputBuffer;

&lt;SPAN class=""&gt;void&lt;/SPAN&gt; main() {
	&lt;SPAN class=""&gt;uvec2&lt;/SPAN&gt; size = &lt;SPAN class=""&gt;uvec2&lt;/SPAN&gt;(&lt;SPAN class=""&gt;imageSize&lt;/SPAN&gt;(image));

	outputBuffer.width = size[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;];
	outputBuffer.height = size[&lt;SPAN class=""&gt;1&lt;/SPAN&gt;];
}&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I could not test with OpenGL &amp;lt; 4.6 because&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="OpenGL 4.6 at a glance" href="https://www.khronos.org/opengl" target="_blank" rel="noopener"&gt;SPIR-V support was added in that version&lt;/A&gt;. However I tried changing the GLSL version to 430, 440 and 450 and the issue was still there.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The image is bound like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;glBindImageTexture&lt;/SPAN&gt;(&lt;SPAN class=""&gt;0&lt;/SPAN&gt;, texture, &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, GL_FALSE, &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, GL_READ_ONLY, GL_RGBA8);&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I'm not using any intermediate tool/post-processing step in both the project in which I found the bug and the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;minimum reproducible sample&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The shader is successfully compiled and the program is successfully linked.&lt;/P&gt;&lt;P class=""&gt;No OpenGL errors are thrown (I have debug output enabled).&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have got the issue with driver versions before 31.0.101.4502, but I don't have the version numbers.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Regards,&lt;/P&gt;&lt;P class=""&gt;debaze&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 08:10:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696962#M142935</guid>
      <dc:creator>debaze</dc:creator>
      <dc:date>2025-06-13T08:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696979#M142939</link>
      <description>&lt;P class=""&gt;Hello.&lt;/P&gt;&lt;P class=""&gt;Thank you for your reply.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The target environment is vulkan1.0. glslangvalidator -v returns:&lt;/P&gt;&lt;PRE&gt;Glslang Version: 11:15.0.0
ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 15.0.0
GLSL Version: 4.60 glslang Khronos. 15.0.0
SPIR-V Version 0x00010600, Revision 1
GLSL.std.450 Version 100, Revision 1
Khronos Tool ID 8
SPIR-V Generator Version 11
GL_KHR_vulkan_glsl version 100
ARB_GL_gl_spirv version 100&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The texture is declared as a readonly RGBA8 image2D. Here is the full GLSL code for the compute shader (also available on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;MRS&lt;/A&gt;).&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#version 460&lt;/SPAN&gt;

&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(&lt;SPAN class=""&gt;local_size_x&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, &lt;SPAN class=""&gt;local_size_y&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, &lt;SPAN class=""&gt;local_size_z&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;) &lt;SPAN class=""&gt;in&lt;/SPAN&gt;;

&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(set = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;binding&lt;/SPAN&gt; = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;rgba8&lt;/SPAN&gt;) &lt;SPAN class=""&gt;uniform&lt;/SPAN&gt; &lt;SPAN class=""&gt;readonly&lt;/SPAN&gt; &lt;SPAN class=""&gt;image2D&lt;/SPAN&gt; image;
&lt;SPAN class=""&gt;layout&lt;/SPAN&gt;(set = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, &lt;SPAN class=""&gt;binding&lt;/SPAN&gt; = &lt;SPAN class=""&gt;1&lt;/SPAN&gt;) &lt;SPAN class=""&gt;buffer&lt;/SPAN&gt; OutputBuffer {
&lt;SPAN class=""&gt;    uint&lt;/SPAN&gt; width;
&lt;SPAN class=""&gt;    uint&lt;/SPAN&gt; height;
} outputBuffer;

&lt;SPAN class=""&gt;void&lt;/SPAN&gt; main() {
&lt;SPAN class=""&gt;    uvec2&lt;/SPAN&gt; size = &lt;SPAN class=""&gt;uvec2&lt;/SPAN&gt;(&lt;SPAN class=""&gt;imageSize&lt;/SPAN&gt;(image));

    outputBuffer.width = size[&lt;SPAN class=""&gt;0&lt;/SPAN&gt;];
    outputBuffer.height = size[&lt;SPAN class=""&gt;1&lt;/SPAN&gt;];
}&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I could not test with OpenGL &amp;lt; 4.6 because&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="OpenGL 4.6 at a glance" href="https://www.khronos.org/opengl" target="_blank" rel="noopener"&gt;SPIR-V support was added in that version&lt;/A&gt;. However I tried changing the GLSL version to 430, 440 and 450 and the issue was still there.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The image is bound like this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;glBindImageTexture&lt;/SPAN&gt;(&lt;SPAN class=""&gt;0&lt;/SPAN&gt;, texture, &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, GL_FALSE, &lt;SPAN class=""&gt;0&lt;/SPAN&gt;, GL_READ_ONLY, GL_RGBA8);&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I'm not using any intermediate tool/post-processing step in both the project in which I found the bug and the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;minimum reproducible sample&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The shader is successfully compiled and the program is successfully linked.&lt;/P&gt;&lt;P class=""&gt;No OpenGL errors are thrown (I have debug output enabled).&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I have got the issue with driver versions before 31.0.101.4502, but I don't have the version numbers.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Regards,&lt;/P&gt;&lt;P class=""&gt;debaze&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 09:24:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696979#M142939</guid>
      <dc:creator>debaze</dc:creator>
      <dc:date>2025-06-13T09:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696980#M142940</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The target environment is vulkan1.0. glslangvalidator -v returns:&lt;/P&gt;&lt;PRE&gt;Glslang Version: 11:15.0.0&lt;BR /&gt;ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 15.0.0&lt;BR /&gt;GLSL Version: 4.60 glslang Khronos. 15.0.0&lt;BR /&gt;SPIR-V Version 0x00010600, Revision 1&lt;BR /&gt;GLSL.std.450 Version 100, Revision 1&lt;BR /&gt;Khronos Tool ID 8&lt;BR /&gt;SPIR-V Generator Version 11&lt;BR /&gt;GL_KHR_vulkan_glsl version 100&lt;BR /&gt;ARB_GL_gl_spirv version 100&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The texture is declared as a readonly RGBA8 image2D. Here is the full GLSL code for the compute shader (also available on the &lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;MRS&lt;/A&gt;).&lt;/P&gt;&lt;PRE&gt;#version 460&lt;BR /&gt;&lt;BR /&gt;layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;&lt;BR /&gt;&lt;BR /&gt;layout(set = 0, binding = 0, rgba8) uniform readonly image2D image;&lt;BR /&gt;layout(set = 0, binding = 1) buffer OutputBuffer {&lt;BR /&gt;&lt;SPAN&gt;    uint width;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    uint height;&lt;/SPAN&gt;&lt;BR /&gt;} outputBuffer;&lt;BR /&gt;&lt;BR /&gt;void main() {&lt;BR /&gt;&lt;SPAN&gt;    uvec2 size = uvec2(imageSize(image));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;    outputBuffer.width = size[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;    outputBuffer.height = size[1];&lt;/SPAN&gt;&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not test with OpenGL &amp;lt; 4.6 because &lt;A title="OpenGL 4.6 at a glance" href="https://www.khronos.org/opengl" target="_blank" rel="noopener"&gt;SPIR-V support was added in that version&lt;/A&gt; (I didn't try with the pre-4.6 extension). However I tried changing the GLSL version to 430/440/450 and the issue was still there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The image is bound like this:&lt;/P&gt;&lt;PRE&gt;glBindImageTexture(0, texture, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGBA8);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not using any intermediate tool/post-processing step in both the project in which I found the bug and the &lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;minimum reproducible sample&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The shader is successfully compiled and the program is successfully linked.&lt;/P&gt;&lt;P&gt;No OpenGL errors are thrown (debug output is enabled).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got the issue with driver versions before 31.0.101.4502, but I don't remember the exact version numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;debaze&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 09:36:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1696980#M142940</guid>
      <dc:creator>debaze</dc:creator>
      <dc:date>2025-06-13T09:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1697399#M143012</link>
      <description>&lt;P&gt;Hey man, ...so while this might not be a deal breaker, it does look like a possible quirk or non-compliance on Intels side when it comes to handling SPIR-V in OpenGL .. yes specifically with how their driver interprets things Definitely feels like something under the hood isn’t playing nice. Here’s what Id suggest trying next,,,&lt;BR /&gt;Well, grab the latest Intel driver from their site or run the Intel® Driver &amp;amp; Support Assistant. There might’ve been SPIR-V-related fixes after version 31.0.101.4502 that patch this exact behavior. Try Skipping SPIR-V for Now-Since plain GLSL works, it’s clear this is isolated to SPIR-V usage. That’s a solid workaround for now... Double-Check Your Image Binding Setup-Make sure your image2D is correctly bound layout, format, binding point, and qualifiers. Intel’s OpenGL SPIR-V path might be more picky than others when it comes to exact declarations.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 04:58:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1697399#M143012</guid>
      <dc:creator>TheExpertGuy</dc:creator>
      <dc:date>2025-06-16T04:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1697401#M143013</link>
      <description>&lt;P&gt;Intel's OpenGL SPIR-V implementation on UHD Graphics for 12th Gen CPUs. The use of imageSize() in compute shaders via SPIR-V paths.&amp;nbsp;It is &lt;STRONG&gt;likely not an application bug&lt;/STRONG&gt;, but a low-level issue in the OpenGL SPIR-V front-end or image handling pipeline in the affected driver version.&amp;nbsp;&lt;/P&gt;&lt;P&gt;try these:&lt;/P&gt;&lt;P&gt;Confirm SPIR-V Compilation Details.&lt;/P&gt;&lt;P&gt;Make sure the image variable in GLSL has appropriate qualifiers (binding, format, and readonly/writeonly) to ensure correct layout in SPIR-V.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;glsl&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;layout (binding = 0, rgba8) uniform readonly image2D inputImage;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 05:03:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1697401#M143013</guid>
      <dc:creator>RedCapsicum9</dc:creator>
      <dc:date>2025-06-16T05:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics</title>
      <link>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1697458#M143027</link>
      <description>&lt;P&gt;Thank you for your replies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/403712"&gt;@TheExpertGuy&lt;/a&gt;: The driver is up-to-date at the time of writing (&lt;SPAN&gt;31.0.101.4502)&lt;/SPAN&gt;. Thank you for the workaround. This is not a blocking issue on my side (most of the time I'm testing on discrete GPUs but I figured I should also try the integrated one). I'm not really searching for a workaround, but to get Intel to fix it because as&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/406610"&gt;@RedCapsicum9&lt;/a&gt;&amp;nbsp;said it's likely not an application bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/406610"&gt;@RedCapsicum9&lt;/a&gt;: Here is how I'm creating + binding the texture in C++:&lt;/P&gt;&lt;PRE&gt;GLuint texture;&lt;BR /&gt;&lt;SPAN&gt;glGenTextures(1, &amp;amp;texture);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;glBindTexture(GL_TEXTURE_2D, texture);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;glBindImageTexture(0, texture, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGBA8);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 64, 32, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN&gt;So, it's an 8-bit RGBA 2D texture of size 64x32, and it is bound to location 0 in READ_ONLY mode.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;I declare it like this in GLSL:&lt;/DIV&gt;&lt;PRE&gt;layout(set = 0, binding = 0, rgba8) uniform readonly image2D image;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using this to generate SPIR-V:&lt;/DIV&gt;&lt;PRE&gt;glslangvalidator -V ImageSize.comp -o ImageSize.comp.spv&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You can find the full example code&amp;nbsp;&lt;A title="SPIR-V GLSL imageSize returns 0 on OpenGL 4.6 with Intel UHD Graphics (minimum reproducible sample)" href="https://github.com/debaze/glsl_imagesize_0_mrs" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;debaze&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Jun 2025 09:32:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/SPIR-V-GLSL-imageSize-returns-0-on-OpenGL-4-6-with-Intel-UHD/m-p/1697458#M143027</guid>
      <dc:creator>debaze</dc:creator>
      <dc:date>2025-06-16T09:32:10Z</dc:date>
    </item>
  </channel>
</rss>

