Stephen White
e5ae3274a3
Make SetSubData take size in uint8_t not uint32_t.
...
Also change data pointer to uint8_t*.
Add a test for a non-aligned SetSubData().
Implemented on all backends.
2018-04-10 14:34:24 -04:00
Corentin Wallez
b91022dc23
SampleUtils: Flush the wire before getting preferred format
...
This makes sure that the swapchain has been created on the server side
and that the preferred swapchain format is correctly computed.
2018-01-29 14:35:58 -05:00
Corentin Wallez
52cbcb4e47
SampleUtils: print GLFW errors for debugging
2018-01-29 14:35:58 -05:00
Corentin Wallez
e98678f886
CHelloTriangle: Make the framebuffer use the preferred swapchain format
2018-01-29 14:35:58 -05:00
Corentin Wallez
d0d6e5cd20
Fix glTFViewer after shaderc update
...
Fragment shader outputs now require a location qualifier, that
glTFViewer was missing in its shaderc.
2018-01-15 19:13:01 -05:00
Corentin Wallez
b6fb5f3149
Roll shaderc
2017-12-12 01:02:35 -05:00
Corentin Wallez
2e31e8f0bf
Make binding expose the preferred format
2017-11-20 09:59:03 -05:00
Corentin Wallez
405dcd636a
Make the index format part of the pipeline state.
2017-11-20 09:59:03 -05:00
Corentin Wallez
715ac712c6
Document a bug in glTFViewer
2017-11-20 09:59:03 -05:00
Kai Ninomiya
921fb5e1ce
remove initialUsage from SwapChain::Configure
2017-09-15 14:02:02 -07:00
Kai Ninomiya
ee7b6b1b62
Update SwapChain to configure texture usage
...
Explicitly configure swap chain usage in bindings and examples
Fix missing case in switch
Make swap chain Present usage implicit
Author: Austin Eng <enga@google.com>
2017-09-15 14:02:02 -07:00
Austin Eng
dc6bb4a16c
Update ComputeBoids to use SSBOs as arrays
...
This is due to restrictions in HLSL. The size of RWStructuredBuffer<T> elements in Shader
Model 5.1 cannot be larger than 2048 bytes so we cannot use a
RWStructuredBuffer<Arr>, where Arr is a struct containing a large array.
2017-08-14 17:39:36 -04:00
Kai Ninomiya
b985431c82
Load operations ( #105 )
...
* load ops: design + implementation (all backends)
* Animometer/glTFViewer: use just one subpass per frame
2017-08-11 14:36:20 -07:00
Kai Ninomiya
3d1154786f
glTFViewer: replace default texture with an untextured shader ( #106 )
...
This fixes the issue where the default texture wasn't uploading
correctly (due to 3f47729
, changes in row pitch validation) by just
removing the broken texture entirely.
2017-08-09 11:44:48 -07:00
Kai Ninomiya
c16a67ae52
Swap chains, part 2 ( #94 )
2017-07-27 18:30:57 -07:00
Austin Eng
0c50889bfa
Fix HelloDepthStencil example
2017-07-25 10:16:08 -04:00
Kai Ninomiya
78c8b837ea
clang/gcc: enable a bunch more warnings ( #91 )
...
* clang/gcc: enable -pedantic warnings
* suppress a GCC-specific warning in stb_image
* And some clang-specific warnings
* -Wconversion (clang) -Wold-style-cast (clang+gcc)
and fix a few warnings that show up with these (and a few more with
-Wconversion on gcc, even though that's not enabled by default)
* bunch more warnings
* fixes
* remove merge error
2017-07-21 17:00:22 -07:00
Kai Ninomiya
59dc03f101
Correctly configure NXT_ENABLE_ASSERTS on multiconfiguration generators ( #88 )
...
And also set a default build type for single-configuration generators
2017-07-20 07:28:00 -07:00
Corentin Wallez
134e08005a
Move USleep to utils/
2017-07-18 11:06:54 -04:00
Austin Eng
972a1e59a7
Update tests and examples to follow copy row pitch alignment constraints
2017-07-17 17:16:45 -04:00
Austin Eng
c5f8e7ae77
Update usage of CopyBufferToTexture and CopyTextureToBuffer to include row pitch
2017-07-17 17:16:45 -04:00
Corentin Wallez
66ff447216
Split Pipeline in Render and Compute, examples part
2017-07-17 15:25:16 -04:00
Kai Ninomiya
fec8c58a97
Add depth-stencil textures and attachments ( #77 )
...
Related: #29
2017-07-17 12:03:16 -04:00
Corentin Wallez
0b186b1fda
Use feature detection macros everywhere
2017-07-13 14:55:23 -04:00
Corentin Wallez
275817a93a
Add proper defines for backend enablement
2017-07-13 14:55:23 -04:00
Corentin Wallez
0f833f30ed
Enable warnings on Windows
2017-07-11 13:59:15 -04:00
Corentin Wallez
83e779d8f2
Fix all Windows warnings
2017-07-11 13:59:15 -04:00
Corentin Wallez
bd0594bab8
Enable warnings on non-MSVC
2017-07-10 19:35:21 -04:00
Corentin Wallez
98c90d4faa
Fix clang/GCC warnings
2017-07-10 19:35:21 -04:00
Kai Ninomiya
296951df60
Introduce Begin/EndComputePass ( #70 )
2017-07-10 14:07:24 -07:00
Kai Ninomiya
cb2d6d8553
Freeze texture transitions while attached; consolidate OutputAttachment usage ( #67 )
...
* lock usages for attachments during subpasses
* refactor IsTextureTransitionPossible
* change attachment usages to OutputAttachment
* make SetBindGroup validation lazier
2017-07-07 16:06:14 -07:00
Kai Ninomiya
fa37f2239c
replace AdvanceSubpass with Begin/EndRenderSubpass
...
and replace subpassActive with VALIDATION_ASPECT_RENDER_SUBPASS
2017-07-07 11:19:42 -04:00
Corentin Wallez
fbf53ac773
Remove SpirvTest
2017-06-20 07:40:17 -07:00
Corentin Wallez
9347e8fcd1
Rename example/Utils to example/SampleUtils
2017-06-20 07:40:17 -07:00
Corentin Wallez
5ee7afdfbe
Split NXT helpers from example/Utils into src/utils
...
This will make it possible to use them in the test suites
2017-06-20 07:40:17 -07:00
Corentin Wallez
1bd219d8a8
Split BackendBinding from example/Utils into src/utils
...
This will make it possible to reuse the backend bindings for test suites
2017-06-20 07:40:17 -07:00
Corentin Wallez
931e6e82fd
Make CHelloTriangle in C++ to simplify Utils
...
The point of CHelloTriangle is to use the C version of NXT, so having
the code C++ is still ok.
2017-06-20 07:40:17 -07:00
Austin Eng
e44179ae4d
Move command list creation to the Device and indirectly reserve command allocators
2017-06-19 15:08:53 -04:00
Austin Eng
78f1619446
Use CommandAllocatorManager to create and track lifetimes of ID3D12CommandAllocators
2017-06-19 15:08:53 -04:00
Austin Eng
39c901d3dc
Change usage requirements for Buffer::SetSubData to require TransferDst
...
instead of MapWrite bit
2017-06-14 13:53:52 -04:00
Corentin Wallez
f45bdb89c6
Split Mapped usage in MapWrite and MapRead
...
Also make use of CreateFrozenBufferFromData where possible in the
example to make the renaming easier.
2017-06-09 15:26:26 -07:00
Austin Eng
81bc3ad23b
move frame resource transitions to D3D12Binding
2017-06-09 07:26:31 -07:00
Kai Ninomiya
39c1bce62d
Update glTFViewer for render passes and depth stencil state ( #39 )
2017-06-08 19:03:59 -07:00
Austin Eng
eb6d22242a
add D3D12Binding with swap chain
2017-06-07 16:23:10 -04:00
Austin Eng
fc2bac7e45
add null D3D12 backend
2017-06-07 16:23:10 -04:00
Corentin Wallez
ca9af201b5
Fix validation errors in Animometer's shader
2017-06-06 10:03:46 -07:00
Corentin Wallez
001c2ea98f
Fix some nits from depth-stencil PR
2017-06-05 14:43:06 -07:00
Austin Eng
58c76b3fe4
Simplify PersistentPipelineState and application of stencil states. Fix
...
stencil mask usage. D3D12 does not support separate front/back masks.
All APIs support separate read/write masks.
2017-06-02 12:13:39 -07:00
Austin Eng
5a67d196be
add buffer creation utility function
2017-06-02 12:13:39 -07:00
Austin Eng
1063439d5d
Refactor DepthStencilState. TODO: add validation tests
...
- defaults to depth and stencil tests off
- whether or not depth and stencil tests are enabled is inferred from the comparison functions and stencil operations
- only one stencil reference. D3D12 does not support separate references
- change SetDepthWriteMode to SetDepthWriteEnabled and use a bool instead of enum
- Create PersistentPipelineState class for OpenGL backend with simple state tracking
- Add validation so DepthStencilState properties are only set once
- Update API usage in HelloDepthStencil
- refactor tracking of the DepthStencilState in the Metal backend
- validate that compute pipeline does not have a depth stencil state
2017-06-02 12:13:39 -07:00