<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tools/render-test/render.cpp, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2018-06-28T18:14:48+00:00</updated>
<entry>
<title>Share graphics API layer between tests/examples (#603)</title>
<updated>2018-06-28T18:14:48+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-06-28T18:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=dfe13b54286b27dd15f591455bbb86b7798285c2'/>
<id>urn:sha1:dfe13b54286b27dd15f591455bbb86b7798285c2</id>
<content type='text'>
The `render-test` project has an in-progress graphics API abstraction layer, and it makes sense to share this code with our examples rather than write a bunch of redundant code between examples and tests.

Most of this change is just moving files from `tools/render-test/*` to a new library project at `tools/slang-graphics/`. The most complicated code change there is renaming from `render_test` to `slang_graphics`.

The existing `hello` example was ported to use the graphics API layer instead of raw D3D11 API calls. It is still hard-coded to use the D3D11 back-end and the `SLANG_DXBC` target, so more work is needed if we want to actually support multiple APIs in the examples.

I also went ahead and implemented an extremely rudimentary set of APIs to abstract over the Windows platform calls that were being made in the example, so that we could potentially run that same example on other platforms. I did *not* port `render-test` to use those APIs, and I also did not implement them for anything but Windows (my assumption is that for most other platforms we would just use SDL2, and require people to ensure it is installed to their machine before building Slang examples).</content>
</entry>
<entry>
<title>Fix atomic operations on RWBuffer (#593)</title>
<updated>2018-06-06T04:35:48+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-06-06T04:35:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1a698128c15bce0c05b0664bb1458842e1e55511'/>
<id>urn:sha1:1a698128c15bce0c05b0664bb1458842e1e55511</id>
<content type='text'>
* Fix atomic operations on RWBuffer

An earlier change added support for passing true pointers to `__ref` parameters to fix the global `Interlocked*()` functions when applied to `groupshared` variables or `RWStructureBuffer&lt;T&gt;` elements.
That change didn't apply to `RWBuffer&lt;T&gt;` or `RWTexture2D&lt;T&gt;`, etc. because those types had so far only declared `get` and `set` accessors, but not any `ref` accessors (which return a pointer).

The main fixes here are:

* Add `ref` accessors to the subscript oeprations on the `RW*` resource types

* Adjust the logic for emitting calls to subscript accessors so that we don't get quite as eager about invoking a `ref` accessor, and instead try to invoke just a `get` or `set` accessor when these will suffice. This is important for Vulkan cross-compilation, where we don't yet support the semantics of our `ref` accessors.

* Add a test case for atomics on a `RWBuffer`

* Fix up `render-test` so that we can specify a format for a buffer resource, which allows us to use things other than `*StructuredBuffer` and `*ByteAddressBuffer`. The work there is probably not complete; I just did what I could to get the test working.

* A bunch of files got whitespace edits thanks to the fact that I'm using editorconfig and others on the project seemingly arent...

* fixup: remove ifdefed-out code
</content>
</entry>
<entry>
<title>1st stage renderer binding refactor (#587)</title>
<updated>2018-06-01T14:41:13+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-06-01T14:41:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=698ba86962d10d927d7ac4eb781e05e33f08c9eb'/>
<id>urn:sha1:698ba86962d10d927d7ac4eb781e05e33f08c9eb</id>
<content type='text'>
* First pass at support for textures in vulkan.

* Binding state has first pass support for VkImageView VkSampler.

* Split out _calcImageViewType

* Fix bug in debug build around constant buffer being added but not part of the binding description for the test.

* Offset recalculated for vk texture construction just store the texture size for each mip level.

* When outputing a vector type with a size of 1 in GLSL, it needs to be output as the underlying type. For example vector&lt;float,1&gt; should be output as float in GLSL.

* Vulkan render-test produces right output for the test

tests/compute/textureSamplingTest.slang -slang -gcompute -o tests/compute/textureSamplingTest.slang.actual.txt -vk

* Small improvement around xml encoding a string.

* More generalized test synthesis.

* Fix image usage flags for Vulkan.

* Improvements to what gets synthesized vulkan tests.

* Do transition on all mip levels.

* Fixing problems appearing from vulkan debug layer.

* Disable Vulkan synthesized tests for now.

* Add Resource::Type member to Resource::DescBase.

* Removed the CompactIndexSlice from binding. Just bind the indices needed.

* BindingRegister -&gt; RegisterSet

* RegisterSet -&gt; RegisterRange

* Typo fix for debug build.

* Remove comment that no longer applied.
</content>
</entry>
<entry>
<title>Fixes based on review of vulkan-first-render PR #545 (#546)</title>
<updated>2018-05-03T21:17:05+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-05-03T21:17:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c216f00f1eaff368229cb8430422972fcac801b7'/>
<id>urn:sha1:c216f00f1eaff368229cb8430422972fcac801b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Feature/vulkan first render (#545)</title>
<updated>2018-05-03T18:25:13+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-05-03T18:25:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=367f3a78a40731da45ee12b9a18c94707f1d1429'/>
<id>urn:sha1:367f3a78a40731da45ee12b9a18c94707f1d1429</id>
<content type='text'>
* First pass at InputLayout for Vulkan
Add support for RGBA_Float32

* Use VulkanModule and VulkanApi to handle accessing Vulkan types.

* First pass at Vulkan swap chain/Device queue.

* Added VulkanUtil for generic function functions.

* Move more functionality to VulkanApi and VulkanUtil.
Make Buffer able to initialize itself.

* More tidy up around VulkanDeviceQueue

* First pass use of VulkanDeviceQueue in VkRenderer

* First pass use of VulkanSwapChain on VkRenderer

* Added depth formats.
Binding for constant and vertex buffers for Vulkan.

* Setting up VkImageView on backbuffers.

* First pass support for setting up vkRenderPass.

* Fixes to work around Vulkan swap chain/verification issues.

* Added support for Pipeline and a pipeline cache.

* Working without waiting - because use of pipeline cache.

* Added support for VkFramebuffer in Vulkan.

* First pass at creating Vulkan graphics pipeline.

* More efforts to get Vulkan to render.

* Small improvement for checking of Binding flags.

* Removed setConstantBuffers from the Renderer interface - so that all resource binding takes place through the BindingState.
To make this work required a 'hack' in render-test main.cpp - so that the constant buffer binding that is needed in some tests is only added when it doesn't clash.

* RendererID -&gt; unified into RendererType. Added getRendererType to Renderer interface.
Added ProjectionStyle, and function to get from RendererType.
Added getIdentityProjection to RendererUtil - to get projection that is the 'identity' - but hits the same pixels for all projection styles.

* Fix build problem on Win32 on Vulkan where should use VK_NULL_HANDLE.

* Improve naming, comments. Remove dead code.

* Remove unwanted comment.
</content>
</entry>
<entry>
<title>Fixes/improvements based on feature/render-binding-resource (#511)</title>
<updated>2018-04-20T18:59:17+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-04-20T18:59:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c73ccbc5616dff16ecacb9198f725f498a7e6c84'/>
<id>urn:sha1:c73ccbc5616dff16ecacb9198f725f498a7e6c84</id>
<content type='text'>
* Dx12 rendering works in test framework.

* Turn on dx12 render tests.

* Split out functions for construction or Renderer types into ShaderRendererUtil. Removed the serialization of buffers code into test-render

* Improvements in documentation and typename in BindingState types.

RegisterSet -&gt; CompactBindIndexSlice
RegisterList -&gt; BindIndexSlice
RegisterDesc -&gt; ShaderBindSet

* Fix debug build break.
</content>
</entry>
<entry>
<title>Separation of Binding/Resource construction on Renderer interface (#508)</title>
<updated>2018-04-19T21:47:04+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-04-19T21:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4c751df1680c30fac0369171a9b8dd4bb5bb5b9f'/>
<id>urn:sha1:4c751df1680c30fac0369171a9b8dd4bb5bb5b9f</id>
<content type='text'>
* Dx12 rendering works in test framework.

* Turn on dx12 render tests.

* First pass at Resource and TextureResource/BufferResource types.

* Fix bug in Dx11 impl for BufferResource.

* Dx12 supports TextureResource and binds using TextureResource type, and all tests pass.

* Added TextureBuffer::Size type to make handling mips a little simpler.

* Small improvements to Dx12 constant buffer binding
Removed k prefix on an enum

* First pass impl of dx11 createTextureResource
Added setDefaults to TextureResource::Desc and BufferResource::Desc to simplify setup
accessFlags -&gt; cpuAccessFlags
desc -&gt; srcDesc

* Split out generateTextureResource - can produce the texture using createTextureResource on the Renderer.

* Added support for read mapping to Dx11
accessFlags -&gt; cpuAccessFlags
First pass at using TextureResource/BufferResource on Dx11
Some tests fail with this checkin

* TextureResource working on all tests on dx11.

* Construct ResourceBuffers on Dx11 and Dx12 using utility function createInputBufferResource.

* First pass at OpenGl TextureResource

* Small fixes to dx12 and dx11 setup.
Gl working working using BufferResource and TextureResource

* Tidy up around the compareSampler - looks like the previous test was incorrect.

* Small documentation /naming improvements.

* Fix some more small documentation issues.

* First pass testing out construction of binding resources external to Renderer implementation.

* Moved some BindingState::Desc types to BindingState to make easier to use.

* First pass of binding using BindingState::Desc for Dx11.

* First pass at binding with dx12.

* Fixed issues around separating dx12 binding from ShaderInputLayout

* First pass at OpenGl state binding.

* BindingState::Desc::Binding::Type -&gt; BindingType

* Use Buffer to manage life of vk resources.
Construction of buffers handled by createBufferResource (BindingState doesn't have specialized logic)

* Remove InputLayout types from binding so can create a binding independent of it.

* Added upload buffer to BufferResource - could be used for write mapping.

* m_samplers -&gt; m_samplerDescs.
First pass at Vk binding with BindingState::Desc.
Small tidy/doc improvements.

* First pass with binding all taking place through BindingState::Desc. All tests pass.

* Removed support for creating BindingState from ShaderInputLayout

* Remove serializeOutput from Renderer interface and all implementations.
Implement map/unmap on vulkan
Implement serializeBindingOutput which uses map/unmap and BindingState::Desc to write result.

* Make implementation of BindingState use the BindingState::Desc for much of state - only hold api specific in BindingDetail per implementation.

* Use Glsl binding on vulkan (was using hlsl).

* BindingState::Desc::Binding -&gt; BindingState::Binding. Made possible by impls using 'BindingDetail' for their specific needs.

* Fix compile problems on win32.

* Fix a typo in name createBindingSetDesc -&gt; createBindingStateDesc
</content>
</entry>
<entry>
<title>Feature/renderer binding (#489)</title>
<updated>2018-04-17T20:59:03+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2018-04-17T20:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=00389a127af8db18a3ec8fe7ad2dd114a65ac024'/>
<id>urn:sha1:00389a127af8db18a3ec8fe7ad2dd114a65ac024</id>
<content type='text'>
* Dx12 rendering works in test framework.

* Turn on dx12 render tests.

* First pass at Resource and TextureResource/BufferResource types.

* Fix bug in Dx11 impl for BufferResource.

* Dx12 supports TextureResource and binds using TextureResource type, and all tests pass.

* Added TextureBuffer::Size type to make handling mips a little simpler.

* Small improvements to Dx12 constant buffer binding
Removed k prefix on an enum

* First pass impl of dx11 createTextureResource
Added setDefaults to TextureResource::Desc and BufferResource::Desc to simplify setup
accessFlags -&gt; cpuAccessFlags
desc -&gt; srcDesc

* Split out generateTextureResource - can produce the texture using createTextureResource on the Renderer.

* Added support for read mapping to Dx11
accessFlags -&gt; cpuAccessFlags
First pass at using TextureResource/BufferResource on Dx11
Some tests fail with this checkin

* TextureResource working on all tests on dx11.

* Construct ResourceBuffers on Dx11 and Dx12 using utility function createInputBufferResource.

* First pass at OpenGl TextureResource

* Small fixes to dx12 and dx11 setup.
Gl working working using BufferResource and TextureResource

* Tidy up around the compareSampler - looks like the previous test was incorrect.

* Small documentation /naming improvements.

* Fix some more small documentation issues.
</content>
</entry>
</feed>
