Commit Graph

24 Commits

Author SHA1 Message Date
Austin Eng 359acd6e95 Add row pitch to Texture->Buffer and Buffer->Texture copy commands 2017-07-17 17:16:45 -04:00
Corentin Wallez 29ced285d4 Split Pipeline in Render and Compute, common 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 228ba88fe6 Remove unused Device::CopyBindGroup 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 8859178703 Add nxt::VertexFormat::FloatR32 2017-07-06 11:34:31 -04:00
Corentin Wallez e9d347e89e Add T->B copies.
This implements T->B copies on the Metal backend only and while it adds
validation tests, end2end tests will be done in a follow-up commit.
2017-06-27 13:25:42 -04:00
Corentin Wallez 769b00fc23 Fix MapRead and MapWrite being the same bit 2017-06-22 09:56:30 -07:00
Corentin Wallez dbb5729e64 Add Device::Tick for periodic work 2017-06-15 13:27:50 -07:00
Corentin Wallez d84d107076 Add buffer to buffer copies 2017-06-13 13:15:30 -07:00
Corentin Wallez b1c19eeb4f Add Buffer::MapReadAsync state-tracking 2017-06-13 08:30:01 -07: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 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 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 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
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 7f96177289 Implement the builder error callback in the backends
This makes the Builder base class retain the error status, if any, and
call the callback on GetResult (or ~Builder, whichever comes first).
2017-05-11 11:31:54 +02: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 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