<?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 DX11 bug with TextureCubeArray SRV in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/DX11-bug-with-TextureCubeArray-SRV/m-p/1132455#M87702</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am experiencing a bug when trying to create shader resource views for a TextureCubeArray in DirectX 11. I am creating a shader resource view for each cubemap of the array like this:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;     UINT slices = tex2DarraySize / 6;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // independent cubemaps
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (UINT i = 0; i &amp;lt; slices; ++i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBEARRAY;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.First2DArrayFace = i * 6;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.NumCubes = 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.MostDetailedMip = 0; //from most detailed...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.MipLevels = -1; //...to least detailed

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pTexture-&amp;gt;additionalSRVs_DX11.push_back(nullptr);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hr = device-&amp;gt;CreateShaderResourceView(pTexture-&amp;gt;texture2D_DX11, &amp;amp;shaderResourceViewDesc, &amp;amp;pTexture-&amp;gt;additionalSRVs_DX11&lt;I&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;assert(SUCCEEDED(hr) &amp;amp;&amp;amp; "RenderTargetView Creation failed!");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is with the First2DArrayFace = i * 6;​ piece, as it seems not to index slices of a Texture2DArray which is the base resource type, but like it was a cubearray. So if I write First2DArrayFace = I; then the results are good. Unfortunately this workaround is not good because other GPUs, like Nvidia behave differently and comply with the first case. The name of the field also suggest that we should refer to the 2D array slice as does the documentation on MSDN. This bug occurs to me with an Intel HD 620 laptop integrated GPU. I hope I could provide good feedback.&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;/P&gt;

&lt;P&gt;Janos&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2018 10:16:20 GMT</pubDate>
    <dc:creator>Turanszki__Janos</dc:creator>
    <dc:date>2018-02-02T10:16:20Z</dc:date>
    <item>
      <title>DX11 bug with TextureCubeArray SRV</title>
      <link>https://community.intel.com/t5/Graphics/DX11-bug-with-TextureCubeArray-SRV/m-p/1132455#M87702</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am experiencing a bug when trying to create shader resource views for a TextureCubeArray in DirectX 11. I am creating a shader resource view for each cubemap of the array like this:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;     UINT slices = tex2DarraySize / 6;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // independent cubemaps
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (UINT i = 0; i &amp;lt; slices; ++i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBEARRAY;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.First2DArrayFace = i * 6;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.NumCubes = 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.MostDetailedMip = 0; //from most detailed...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shaderResourceViewDesc.TextureCubeArray.MipLevels = -1; //...to least detailed

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pTexture-&amp;gt;additionalSRVs_DX11.push_back(nullptr);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hr = device-&amp;gt;CreateShaderResourceView(pTexture-&amp;gt;texture2D_DX11, &amp;amp;shaderResourceViewDesc, &amp;amp;pTexture-&amp;gt;additionalSRVs_DX11&lt;I&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;assert(SUCCEEDED(hr) &amp;amp;&amp;amp; "RenderTargetView Creation failed!");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is with the First2DArrayFace = i * 6;​ piece, as it seems not to index slices of a Texture2DArray which is the base resource type, but like it was a cubearray. So if I write First2DArrayFace = I; then the results are good. Unfortunately this workaround is not good because other GPUs, like Nvidia behave differently and comply with the first case. The name of the field also suggest that we should refer to the 2D array slice as does the documentation on MSDN. This bug occurs to me with an Intel HD 620 laptop integrated GPU. I hope I could provide good feedback.&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;/P&gt;

&lt;P&gt;Janos&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 10:16:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/DX11-bug-with-TextureCubeArray-SRV/m-p/1132455#M87702</guid>
      <dc:creator>Turanszki__Janos</dc:creator>
      <dc:date>2018-02-02T10:16:20Z</dc:date>
    </item>
  </channel>
</rss>

