Commit Graph

84 Commits

Author SHA1 Message Date
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
Austin Eng 376f1c6a8e fix formatting 2017-06-02 12:13:39 -07:00
Austin Eng 084346bd5f Fix OpenGL stencil clear hack. Improve example stencil reflection 2017-06-02 12:13:39 -07:00
Austin Eng 4f5521e440 Remove StencilReferenceMode. Add SetStencilReference.
This moves the application of the stencil reference from the
DepthStencilState to Command::SetStencilReference
2017-06-02 12:13:39 -07:00
Austin Eng 3efcf2172d Add DepthStencilState
Add depth and stencil tests. This is currently only implemented for the
OpenGL API. HelloDepthStencil is a test using the depth and stencil
buffers to do reflections. Currently clearing / stencil clearing is not
working properly.
2017-06-02 12:13:39 -07:00
Corentin Wallez a0ad53b618 Enable format macros in glTFViewer
Without this compilation can fail in picojson.h because the PRId64 macro
isn't defined (it is used to print 64bit ints).
2017-05-30 15:55:34 -07:00
Corentin Wallez 583e9a8f3c Avoid name conflicts between Util and Windows function
GetWindow and SwapBuffers are function of Windows.h and using the same
name causes a compile error.

This commit also changes Util's GetProcTableAndDevice to CreateNXTDevice
because we might need to call NXT procs when creating the C++ device.
2017-05-30 10:48:32 -07:00
Corentin Wallez 26275d0a16 Make all libraries STATIC for now
For shared library to work on Windows to work, we need to add
declspec(export) and declspec(import) annotations to the symbols to
export. This fixes the problem by making all libraries static on
Windows, but we'll need to revisit and do proper symbol exports.
2017-05-30 10:48:32 -07:00
Corentin Wallez 79a62bf6e3 Create a Null backend.
This will be useful to run validation unittests without using the GPU.
2017-05-24 15:23:53 -04:00
Kai Ninomiya 68df8b0a3a Introduce render passes
* First API design (many features missing, including input attachments)
* Metal implementation (no OpenGL yet)
* Render-to-texture demo (a little broken until we have depth buffers)
* Update examples to use render passes
2017-05-22 10:53:19 -07:00
Corentin Wallez 4b410a33ca Implement the device error callback.
This adds support for "natively defined" API types like callbacks that
will have to be implemented manually for each target language. Also this
splits the concept of "native method" into a set of native methods per
language.

Removes the "Synchronous error" concept that was used to make builders
work in the maybe Monad, this will have to be reinroduced with builder
callbacks.
2017-05-11 11:31:54 +02:00
Corentin Wallez 682a8250b3 Plumb the server->client wire 2017-05-11 11:31:54 +02:00
Corentin Wallez 7f433a5b52 Add bufferOffset to CopyBufferToTexture. 2017-05-10 19:49:52 +02:00
Corentin Wallez f07e3bd4c9 Initial commit of all the NXT integration.
More like squashed history, contributors were:
 - Kai Ninomiya
 - Corentin Wallez
2017-04-20 14:38:20 -04:00