<?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 CopyResource from staging buffer to constant buffer not working in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/CopyResource-from-staging-buffer-to-constant-buffer-not-working/m-p/1138525#M87727</link>
    <description>&lt;P&gt;Calling CopyResource with a staging buffer as source and constant buffer as destination seems to not copy any data at all, leaving it with the initial data it was created with (either provided at buffer creation or garbage uninitialized data). So far it seems to only happen when the destination buffer has both DEFAULT usage and CONSTANT_BUFFER bind flags. The same operation works for buffers which have BIND_VERTEX_BUFFER and BIND_INDEX_BUFFER.&lt;/P&gt;

&lt;P&gt;System Used: (Manufacturer/Model)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Apple Inc., MacBookPro9,2&lt;BR /&gt;
	CPU SKU: (i3, i5, Pentium, Celeron, etc.)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz&lt;BR /&gt;
	GPU SKU: (HD4400, HD5100, etc.)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Intel(R) HD Graphics 4000&lt;BR /&gt;
	Processor Line: (Y-Series, U-Series, etc.)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; M&lt;BR /&gt;
	System BIOS Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; MBP91.88Z.00D9.B00.1802021100&lt;BR /&gt;
	CMOS settings:&lt;BR /&gt;
	Graphics Driver Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.18.10.4885&lt;BR /&gt;
	GOP/VBIOS Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; 2120 PC 14.34 08/03/2011 23:04:12&lt;BR /&gt;
	Operating System:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows 7&lt;BR /&gt;
	OS Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows 7 Professional SP1&lt;BR /&gt;
	API:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; DirectX 11&lt;BR /&gt;
	Occurs on non-Intel GPUs?:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; No&lt;/P&gt;

&lt;P&gt;Steps to Reproduce:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	1. Create and populate a buffer with `D3D11_USAGE_STAGING` flags and cpu read &amp;amp; write.&lt;BR /&gt;
	2. Create the destination buffer with `D3D11_USAGE_DEFAULT` and `D3D11_BIND_CONSTANT_BUFFER` flags.&lt;BR /&gt;
	3. Call `CopyResource` with the staging buffer as source and the constant buffer as destination.&lt;BR /&gt;
	4. Read from the constant buffer in any shader stage.&lt;/P&gt;

&lt;P&gt;Expected Results:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	The destination buffer of the CopyResource call gets updated with the contents of the source buffer and can be used in any shader stage.&lt;/P&gt;

&lt;P&gt;Actual Results:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	The destination buffer does not get updated with the contents of the source buffer (at least from within the shader). Writing out the contents of the buffer from within the VS shows garbage values (0xfefefefefe..)&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	Additional Information:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	Inspecting the contents of the buffer at the drawcall with both Intel GPA and RenderDoc shows the correct buffer contents.&lt;/P&gt;

&lt;P&gt;Following link contains a small application with the bug reproduced. The VS reads some values and should animate the triangle drawn. The constant buffer is updated via CopyResource as described above each frame: &lt;A href="https://drive.google.com/open?id=1kIc6eT-oXr-_UAI0NgDd0mqhMxA26q8Z"&gt;https://drive.google.com/open?id=1kIc6eT-oXr-_UAI0NgDd0mqhMxA26q8Z&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jun 2018 09:35:22 GMT</pubDate>
    <dc:creator>Kaaman__Felix</dc:creator>
    <dc:date>2018-06-11T09:35:22Z</dc:date>
    <item>
      <title>CopyResource from staging buffer to constant buffer not working</title>
      <link>https://community.intel.com/t5/Graphics/CopyResource-from-staging-buffer-to-constant-buffer-not-working/m-p/1138525#M87727</link>
      <description>&lt;P&gt;Calling CopyResource with a staging buffer as source and constant buffer as destination seems to not copy any data at all, leaving it with the initial data it was created with (either provided at buffer creation or garbage uninitialized data). So far it seems to only happen when the destination buffer has both DEFAULT usage and CONSTANT_BUFFER bind flags. The same operation works for buffers which have BIND_VERTEX_BUFFER and BIND_INDEX_BUFFER.&lt;/P&gt;

&lt;P&gt;System Used: (Manufacturer/Model)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Apple Inc., MacBookPro9,2&lt;BR /&gt;
	CPU SKU: (i3, i5, Pentium, Celeron, etc.)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz&lt;BR /&gt;
	GPU SKU: (HD4400, HD5100, etc.)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Intel(R) HD Graphics 4000&lt;BR /&gt;
	Processor Line: (Y-Series, U-Series, etc.)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; M&lt;BR /&gt;
	System BIOS Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; MBP91.88Z.00D9.B00.1802021100&lt;BR /&gt;
	CMOS settings:&lt;BR /&gt;
	Graphics Driver Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.18.10.4885&lt;BR /&gt;
	GOP/VBIOS Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; 2120 PC 14.34 08/03/2011 23:04:12&lt;BR /&gt;
	Operating System:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows 7&lt;BR /&gt;
	OS Version:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows 7 Professional SP1&lt;BR /&gt;
	API:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; DirectX 11&lt;BR /&gt;
	Occurs on non-Intel GPUs?:&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; No&lt;/P&gt;

&lt;P&gt;Steps to Reproduce:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	1. Create and populate a buffer with `D3D11_USAGE_STAGING` flags and cpu read &amp;amp; write.&lt;BR /&gt;
	2. Create the destination buffer with `D3D11_USAGE_DEFAULT` and `D3D11_BIND_CONSTANT_BUFFER` flags.&lt;BR /&gt;
	3. Call `CopyResource` with the staging buffer as source and the constant buffer as destination.&lt;BR /&gt;
	4. Read from the constant buffer in any shader stage.&lt;/P&gt;

&lt;P&gt;Expected Results:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	The destination buffer of the CopyResource call gets updated with the contents of the source buffer and can be used in any shader stage.&lt;/P&gt;

&lt;P&gt;Actual Results:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	The destination buffer does not get updated with the contents of the source buffer (at least from within the shader). Writing out the contents of the buffer from within the VS shows garbage values (0xfefefefefe..)&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	Additional Information:&lt;BR /&gt;
	-------------------------------&lt;BR /&gt;
	Inspecting the contents of the buffer at the drawcall with both Intel GPA and RenderDoc shows the correct buffer contents.&lt;/P&gt;

&lt;P&gt;Following link contains a small application with the bug reproduced. The VS reads some values and should animate the triangle drawn. The constant buffer is updated via CopyResource as described above each frame: &lt;A href="https://drive.google.com/open?id=1kIc6eT-oXr-_UAI0NgDd0mqhMxA26q8Z"&gt;https://drive.google.com/open?id=1kIc6eT-oXr-_UAI0NgDd0mqhMxA26q8Z&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 09:35:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/CopyResource-from-staging-buffer-to-constant-buffer-not-working/m-p/1138525#M87727</guid>
      <dc:creator>Kaaman__Felix</dc:creator>
      <dc:date>2018-06-11T09:35:22Z</dc:date>
    </item>
  </channel>
</rss>

