<?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 GLSL: &amp;quot;restrict&amp;quot; keyword wrongly leads to syntax error in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/GLSL-quot-restrict-quot-keyword-wrongly-leads-to-syntax-error/m-p/1093897#M87448</link>
    <description>&lt;P&gt;Example:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;uniform writeonly image2D restrict dest;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Result:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;SHADER_ID_COMPILE error has been generated. GLSL compile failed for shader 2, "/$$rp/rpplugins/scattering/shader/eric_bruneton/transmittance.compute.glsl": ERROR: 0:34: 'restrict' : syntax error syntax error&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Since "restrict" is valid keyword, there's no problem should be.&lt;/P&gt;

&lt;P&gt;Windows 10, Intel HD 4600, latest drivers.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2016 11:41:41 GMT</pubDate>
    <dc:creator>Gerasimov_M_</dc:creator>
    <dc:date>2016-04-18T11:41:41Z</dc:date>
    <item>
      <title>GLSL: "restrict" keyword wrongly leads to syntax error</title>
      <link>https://community.intel.com/t5/Graphics/GLSL-quot-restrict-quot-keyword-wrongly-leads-to-syntax-error/m-p/1093897#M87448</link>
      <description>&lt;P&gt;Example:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;uniform writeonly image2D restrict dest;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Result:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;SHADER_ID_COMPILE error has been generated. GLSL compile failed for shader 2, "/$$rp/rpplugins/scattering/shader/eric_bruneton/transmittance.compute.glsl": ERROR: 0:34: 'restrict' : syntax error syntax error&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Since "restrict" is valid keyword, there's no problem should be.&lt;/P&gt;

&lt;P&gt;Windows 10, Intel HD 4600, latest drivers.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 11:41:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/GLSL-quot-restrict-quot-keyword-wrongly-leads-to-syntax-error/m-p/1093897#M87448</guid>
      <dc:creator>Gerasimov_M_</dc:creator>
      <dc:date>2016-04-18T11:41:41Z</dc:date>
    </item>
    <item>
      <title>Hi Gerasimov,</title>
      <link>https://community.intel.com/t5/Graphics/GLSL-quot-restrict-quot-keyword-wrongly-leads-to-syntax-error/m-p/1093898#M87449</link>
      <description>&lt;P&gt;Hi Gerasimov,&lt;/P&gt;

&lt;P&gt;Can you fill in the template below, this looks like it could be a driver problem. But I need more information, including reproduction &amp;nbsp;steps and a sample if you have one so I can investigate.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;-Michael&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;System Setup Information:&lt;BR /&gt;
	-----------------------------------------&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;System Used: (Manufacturer/Model)&lt;BR /&gt;
	CPU SKU: (i3, i5, Pentium, Celeron, etc.)&lt;BR /&gt;
	GPU SKU: (HD4400, HD5100, etc.)&lt;BR /&gt;
	Processor Line: (Y-Series, U-Series, etc.)&lt;BR /&gt;
	System BIOS Version:&lt;BR /&gt;
	CMOS settings:&lt;BR /&gt;
	Graphics Driver Version:&lt;BR /&gt;
	GOP/VBIOS Version:&lt;BR /&gt;
	Operating System:&lt;BR /&gt;
	OS Version:&lt;BR /&gt;
	API:&lt;BR /&gt;
	Occurs on non-Intel GPUs?:&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;Steps to Reproduce:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	1.&lt;BR /&gt;
	2.&lt;BR /&gt;
	3.&lt;BR /&gt;
	4.&lt;BR /&gt;
	5.&lt;BR /&gt;
	6.&lt;BR /&gt;
	7.&lt;BR /&gt;
	8.&lt;BR /&gt;
	9.&lt;BR /&gt;
	10.&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;Expected Results:&lt;BR /&gt;
	-------------------------------&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;Actual Results:&lt;BR /&gt;
	-------------------------------&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;Additional Information:&lt;BR /&gt;
	-------------------------------&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 17:18:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/GLSL-quot-restrict-quot-keyword-wrongly-leads-to-syntax-error/m-p/1093898#M87449</guid>
      <dc:creator>Michael_C_Intel2</dc:creator>
      <dc:date>2016-04-18T17:18:01Z</dc:date>
    </item>
    <item>
      <title>Hello! I faced problem while</title>
      <link>https://community.intel.com/t5/Graphics/GLSL-quot-restrict-quot-keyword-wrongly-leads-to-syntax-error/m-p/1093899#M87450</link>
      <description>&lt;P&gt;Hello! I faced problem while trying to run &lt;A href="https://github.com/tobspr/RenderPipeline"&gt;RenderPipeline&lt;/A&gt; project for &lt;A href="https://www.panda3d.org/"&gt;Panda3D&lt;/A&gt; game engine.&lt;/P&gt;

&lt;P&gt;Line "uniform writeonly image2D restrict dest;" is just part of GLSL-compute shader, it leads to syntax error. Here's shader &lt;A href="https://github.com/tobspr/RenderPipeline/blob/master/rpplugins/scattering/shader/eric_bruneton/transmittance.compute.glsl"&gt;source code&lt;/A&gt;. I think you can reproduce issue just running any shader containing this line on Intel HD graphics.&lt;/P&gt;

&lt;P&gt;Currently both problems have solutions:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;"restrict" should be placed before type - "uniform writeonly restrict image2D dest;"&lt;/LI&gt;
	&lt;LI&gt;"layout(rgba16f)" should be placed before "uniform" - "layout(rgba16f) uniform image3D dest;"&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You can read discussion &lt;A href="https://github.com/tobspr/RenderPipeline/issues/54"&gt;here&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;So, I don't know if it's actually a bug, but keywords order doesn't matter for NVIDIA GPU's, so shader written for it would work on it and fail on Intel HD.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;System Setup Information:&lt;BR /&gt;
	-----------------------------------------&lt;/P&gt;

&lt;P&gt;System Used: ASUS Z87-K&lt;BR /&gt;
	CPU SKU: i5-4440&lt;BR /&gt;
	GPU SKU: HD4600&lt;BR /&gt;
	Processor Line: Haswell&lt;BR /&gt;
	System BIOS Version: Ametican Megatrends Inc. 1103 01/02/2014&lt;BR /&gt;
	Graphics Driver Version: 20.19.15.4380&lt;BR /&gt;
	Operating System: Windows 10 x64&lt;BR /&gt;
	Occurs on non-Intel GPUs?: No, on NVIDIA cards given snippets wouldn't lead to problem.&lt;/P&gt;

&lt;P&gt;Steps to Reproduce:&lt;BR /&gt;
	-------------------------------&lt;/P&gt;

&lt;P&gt;Just execute some compute shader that contain "uniform writeonly image2D restrict dest;"&lt;/P&gt;

&lt;P&gt;Expected Results:&lt;BR /&gt;
	-------------------------------&lt;/P&gt;

&lt;P&gt;No errors.&lt;/P&gt;

&lt;P&gt;Actual Results:&lt;BR /&gt;
	-------------------------------&lt;/P&gt;

&lt;P&gt;Syntax error.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 18:42:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/GLSL-quot-restrict-quot-keyword-wrongly-leads-to-syntax-error/m-p/1093899#M87450</guid>
      <dc:creator>Gerasimov_M_</dc:creator>
      <dc:date>2016-04-18T18:42:12Z</dc:date>
    </item>
  </channel>
</rss>

