<?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:OpenGL: cannot link SPIR-V shaders in GPU Compute Software</title>
    <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1504374#M950</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When moving the shader creation lines into the loop makes things work&amp;nbsp;so is this what you are supposed to do in OpenGL?  &lt;/P&gt;&lt;P&gt;Or, Are you supposed to be able to reuse the same ones over and over? If it is the former, then you can change your code and let us know so we can close the issue on our end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is the latter, could you please let us know, as it is a driver issue where we need to contact the driver team to make changes?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 13 Jul 2023 09:12:05 GMT</pubDate>
    <dc:creator>VarshaS_Intel</dc:creator>
    <dc:date>2023-07-13T09:12:05Z</dc:date>
    <item>
      <title>OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1502350#M936</link>
      <description>&lt;P&gt;Hello! I was redirected to this forum from &lt;A href="https://community.intel.com/t5/Graphics/OpenGL-SPIR-V-compiler-failed-to-link-shaders/m-p/1502037" target="_self"&gt;Intel's graphics product support one&lt;/A&gt;.&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;When I try to link SPIR-V binaries using glLinkProgram(), it works fine, but only for the first pair of shaders. With the next one it fails with an empty info log and weird message in OpenGL's debug callback:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;SHADER_ID_LINK error has been generated. GLSL link failed for program 5, "":&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I've added a minimal&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://github.com/kirill146/gl-spirv-intel-repro" target="_self" rel="nofollow noopener noreferrer"&gt;&lt;SPAN class=""&gt;repro on GitHub.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It's tested on ASUS ROG Strix G16 laptop with i7-13650HX and on a desktop computer with i5-7400 integrated graphics.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If it's not the right place to file a bug, please let me know where it is. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 15:29:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1502350#M936</guid>
      <dc:creator>kirill146</dc:creator>
      <dc:date>2023-07-06T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Re:OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1503714#M945</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please let us know the details of your OS, hardware, and Intel Products /Tools being used?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Also, Could you please let us know what steps you followed and which analysis are you trying to perform?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please provide us with the complete log or error you are facing?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Jul 2023 16:40:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1503714#M945</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-07-11T16:40:52Z</dc:date>
    </item>
    <item>
      <title>Re:OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1504374#M950</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When moving the shader creation lines into the loop makes things work&amp;nbsp;so is this what you are supposed to do in OpenGL?  &lt;/P&gt;&lt;P&gt;Or, Are you supposed to be able to reuse the same ones over and over? If it is the former, then you can change your code and let us know so we can close the issue on our end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is the latter, could you please let us know, as it is a driver issue where we need to contact the driver team to make changes?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Jul 2023 09:12:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1504374#M950</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-07-13T09:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Re:OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1504540#M951</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P data-unlink="true"&gt;It's definitely allowed to reuse the same shader objects in different program objects. &lt;A href="https://registry.khronos.org/OpenGL-Refpages/gl4/html/glAttachShader.xhtml" target="_self"&gt;OpenGL&amp;nbsp;specification&lt;/A&gt;&amp;nbsp;says&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;It is also permissible to attach a shader object to more than one program object.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Also I've just added a second example of shaders, which fail to link unconditionally (on the very first call to CreateProgram()).&lt;/P&gt;&lt;P&gt;So yeah, please contact the driver team.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 17:33:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1504540#M951</guid>
      <dc:creator>kirill146</dc:creator>
      <dc:date>2023-07-13T17:33:34Z</dc:date>
    </item>
    <item>
      <title>Re:OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1510346#M977</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are working on your issue internally. We will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Aug 2023 07:00:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1510346#M977</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-08-02T07:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1521102#M1041</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience. Apologies, for the delay in the response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There seems to be a problem in your code, please check this link for more &lt;A href="https://github.com/kirill146/gl-spirv-intel-repro/blob/6c47cb72b84d9ea405fda10a03265732625ad9c4/main.cpp#L122C1-L125C1" target="_blank" rel="noopener"&gt;details&lt;/A&gt;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;uint32_t CreateProgram(uint32_t vs, uint32_t ps) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;uint32_t program = glCreateProgram();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;program = glCreateProgram();&amp;nbsp;&amp;nbsp;&amp;lt;-- just stepped on program variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are attempting to destroy the program, which doesn't check if it's really done before re-using things that may not have been detached, See &lt;A href="https://registry.khronos.org/OpenGL-Refpages/gl4/html/glDeleteProgram.xhtml" target="_blank" rel="noopener"&gt;https://registry.khronos.org/OpenGL-Refpages/gl4/html/glDeleteProgram.xhtml&lt;/A&gt; for&amp;nbsp;&lt;/P&gt;
&lt;P&gt;glCreateProgram&lt;/P&gt;
&lt;P&gt;glCreateProgram (trashing the first one)&lt;/P&gt;
&lt;P&gt;glAttachShadder&lt;/P&gt;
&lt;P&gt;glAttachShader&lt;/P&gt;
&lt;P&gt;glLInkProgram&lt;/P&gt;
&lt;P&gt;glDeleteProgram(no check or wait...)&lt;/P&gt;
&lt;P&gt;glCreateProgram&lt;/P&gt;
&lt;P&gt;glClreateProgram&lt;/P&gt;
&lt;P&gt;glAttachShader (no check !)&lt;/P&gt;
&lt;P&gt;glAttachShader (no check!)&lt;/P&gt;
&lt;P&gt;glLinkProgram (fails..... )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 13:21:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1521102#M1041</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-09-06T13:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1521281#M1042</link>
      <description>&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;Thanks for your investigation.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;First of all, there is indeed a problem in my code: extra glCreateProgram() should be removed. Technically it's not an error from OpenGL's point of view, it's just about leaked resource. No idea how I didn't catch that, my bad, now it's fixed.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, the real problem is still there. I'm not sure if I understood you though: what do you mean by "not checking if it's really done before re-using things that may not have been detached"? As I said earlier, shader objects and program objects are kinda independent of one another. Correct me if I'm wrong, but&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;I can reuse the same shader objects in different program objects;&lt;/LI&gt;&lt;LI&gt;Shader objects are not deleted during deletion of program objects;&lt;/LI&gt;&lt;LI&gt;I don't have to manually detach shader objects before deleting a program object; glDeleteProgram() does it automatically;&lt;/LI&gt;&lt;LI&gt;There's no way to check if glDeleteProgram(progId) has actually finished since progId is invalid right after this call. If we called glUseProgram(progId) before, we would be able to request something like GL_DELETE_STATUS, but it also wouldn't tell much, since it's just indication whether or not glDeleteProgram() was called. So in this case, from the user's point of view, the program is deleted and shaders are detached at the moment when glDeleteProgram() returns;&lt;/LI&gt;&lt;LI&gt;In modern APIs like Vulkan I actually have to make sure that pipeline is not in use by any submitted commands when vkDestroyPipeline() is called. In OpenGL such things are in driver's responsibility.&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Also I've tried to insert&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;glFlush();
std::this_thread::sleep_for(std::chrono::seconds(1));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;after every GL call. It didn't change anything, so waiting isn't an option.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And what about the second example? It fails even before any of glDelete*() functions is called.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Sep 2023 20:29:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1521281#M1042</guid>
      <dc:creator>kirill146</dc:creator>
      <dc:date>2023-09-06T20:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1535040#M1123</link>
      <description>&lt;P&gt;Any new on this topic? This seems a problem of the Intel drivers with Spir-V&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 14:38:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1535040#M1123</guid>
      <dc:creator>Filoippo</dc:creator>
      <dc:date>2023-10-18T14:38:24Z</dc:date>
    </item>
    <item>
      <title>Re:OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1539613#M1144</link>
      <description>&lt;P&gt;Kirill - which Graphics Driver are you using?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Nov 2023 21:58:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1539613#M1144</guid>
      <dc:creator>Pamela_H_Intel</dc:creator>
      <dc:date>2023-11-01T21:58:40Z</dc:date>
    </item>
    <item>
      <title>Re:OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1539615#M1145</link>
      <description>&lt;P&gt;and did this work before for you? Or have you not tried using SPIRV shaders in this way before? If you did, which driver were you using?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I ask because I assume it's a regression . . . I have tracked down the correct driver team to address this issue to and their bug report app asks for very specific info. I can't submit the ticket without the info.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Nov 2023 22:04:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1539615#M1145</guid>
      <dc:creator>Pamela_H_Intel</dc:creator>
      <dc:date>2023-11-01T22:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1539794#M1148</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using driver&amp;nbsp;31.0.101.4900 which is the latest driver for the time being.&lt;/P&gt;&lt;P&gt;I haven't tried using SPIR-V shaders before July 2023 (when this issue was created), so I can't say anything about the older drivers.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 10:41:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1539794#M1148</guid>
      <dc:creator>kirill146</dc:creator>
      <dc:date>2023-11-02T10:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: OpenGL: cannot link SPIR-V shaders</title>
      <link>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1620381#M1523</link>
      <description>&lt;P&gt;I want to follow up here that I've been experiencing this same issue with OpenGL 4.6 support for &lt;U&gt;over a year&lt;/U&gt;&amp;nbsp;across various Intel driver versions. I only have one vertex shader and one fragment shader. I read in both SPIR-V shader binaries, but on `glLinkProgram()`, I get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;SHADER_ID_LINK error has been generated. GLSL link failed for program 3, "":&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently testing this on Intel Arc integrated graphics on an Intel Core Ultra 7 155H, but I have also tested this on Intel Iris graphics on a Core i5-12400 with the exact same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Driver Version: 31.0.101.5334&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is important to note that I have also tested this exact same codebase and project on AMD hardware and it does not exhibit this issue.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 23:03:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/GPU-Compute-Software/OpenGL-cannot-link-SPIR-V-shaders/m-p/1620381#M1523</guid>
      <dc:creator>shawnhatori</dc:creator>
      <dc:date>2024-08-02T23:03:18Z</dc:date>
    </item>
  </channel>
</rss>

