Kai Ninomiya
c16a67ae52
Swap chains, part 2 ( #94 )
2017-07-27 18:30:57 -07:00
Corentin Wallez
3818e18c5c
Forward unhandled builder errors to the device
2017-07-27 21:08:12 -04:00
Austin Eng
ba6a36c974
D3D12: Enable better live object reporting and cleanup resources on device destruction
2017-07-27 15:15:28 -04:00
Austin Eng
439d963ccd
Point,Line,Triangle -> PointList,LineList,TriangleList
2017-07-27 10:19:30 -04:00
Austin Eng
c2def461a1
Add input primitive topology to D3D12 and Metal pipeline states
2017-07-27 10:19:30 -04:00
Austin Eng
d81fd82bde
Implement primitive topology in OpenGL, Metal, and D3D12 backends
2017-07-27 10:19:30 -04:00
Austin Eng
3e9e315636
Add primitive topology to NXT API
2017-07-27 10:19:30 -04:00
Austin Eng
ccf1fa2330
Remove DepthTestEnabled() and fix depth writes for depth function Always
2017-07-25 10:16:08 -04:00
Austin Eng
0506138567
D3D12: Add copy splitting for texture copies not 512-byte aligned
2017-07-25 09:40:54 -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
Corentin Wallez
86b2894103
ShaderModule: Validate the push_constant block size
2017-07-20 16:33:02 -04:00
Corentin Wallez
c8377da79b
Validate SetPushConstants is done inside subpass and compute passes
2017-07-20 16:33:02 -04:00
Kai Ninomiya
35bf424035
Swap chains, part 1 ( #87 )
...
Adds the swap chain interfaces to the API without changing the behavior
of anything else. This includes the C APIs for applications to provide
swap chain implementations. Also adds stub implementations on every
backend.
2017-07-19 15:41:17 -07:00
Austin Eng
3835edde10
Add validation for buffer offset
2017-07-18 16:03:51 -04:00
Corentin Wallez
ea1241af80
D3D12: Handle MapReadAsync offset
2017-07-18 11:06:54 -04:00
Corentin Wallez
d8e1a25cbc
Metal: Wait for GPU on device destruction
2017-07-18 11:06:54 -04:00
Austin Eng
33560ef015
Implement backend texture->buffer and buffer->texture copies with row pitch
2017-07-17 17:16:45 -04:00
Austin Eng
3f47729df6
Add row pitch validation and default computation
2017-07-17 17:16:45 -04:00
Austin Eng
359acd6e95
Add row pitch to Texture->Buffer and Buffer->Texture copy commands
2017-07-17 17:16:45 -04:00
Austin Eng
c100ca7b3f
Update BufferD3D12 to use Align helper
2017-07-17 17:16:45 -04:00
Austin Eng
8867e5d8df
Rename Align to AlignPtr
2017-07-17 17:16:45 -04:00
Corentin Wallez
0bcf0e8e74
Factor computation of inherited bindgroups in PipelineLayoutBase
2017-07-17 15:25:16 -04:00
Corentin Wallez
136cae5ee2
Split Pipeline in Render and Compute, D3D12 part
2017-07-17 15:25:16 -04:00
Corentin Wallez
b085eecb31
Split Pipeline in Render and Compute, OpenGL part
2017-07-17 15:25:16 -04:00
Corentin Wallez
494a157f66
Split Pipeline in Render and Compute, Metal part
2017-07-17 15:25:16 -04:00
Corentin Wallez
29ced285d4
Split Pipeline in Render and Compute, common part
2017-07-17 15:25:16 -04:00
Kai Ninomiya
00349e6e36
Default-initialize descriptor heaps to null ( #82 )
2017-07-17 15:14:01 -04:00
Corentin Wallez
23620b0dc7
OpenGL: Implement T->B copies
...
Also enable the basic end2end tests that are now passing.
InputStateTests isn't passing yet, for some reason the ReadPixels
returns pure black.
2017-07-17 13:48:17 -04:00
Corentin Wallez
0f9f747c8a
OpenGL: implement a synchronous MapReadAsync
...
Mapping OpenGL buffers persistently and unsynchronized isn't supported
on OSX's OpenGL version where we want to run tests.
2017-07-17 13:48:17 -04:00
Corentin Wallez
dab0638177
Fix using NXT_PLATFORM without including Platform.h
2017-07-17 13:48:17 -04:00
Corentin Wallez
9d4b9ab313
OpenGL: move buffer to its own file
2017-07-17 13:48:17 -04:00
Kai Ninomiya
fec8c58a97
Add depth-stencil textures and attachments ( #77 )
...
Related: #29
2017-07-17 12:03:16 -04:00
Corentin Wallez
11ce310de3
D3D12: make texture transition barrier on all subresources
...
This doesn't fix anything in particular and is just a drive-by
change.
2017-07-13 15:41:43 -04:00
Corentin Wallez
de4a3c4c3b
Fix framebuffer dimensions in InputStateTest
...
Also add validation that the framebuffer size matches its attachement
size and make a test for it.
2017-07-13 15:41:43 -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
a7bfc9d2ac
Metal: Fix Device::pendingCommands being freed under us
2017-07-13 14:55:23 -04:00
Austin Eng
77a29986b0
D3D12 Render Targets ( #72 )
...
Implements BeginRenderSubpass on the D3D12 backend. Descriptors for render target and depth stencil views are recorded in a descriptor heap for each framebuffer. For now, we still have the hack where no attachment renders to the backbuffer, so the CommandBuffer records those when necessary when it is submitted.
This PR also enables input states for D3D12 which are mostly working. One failure seems to be happening because our texture copies are not yet correct.
2017-07-12 17:36:36 -07:00
Kai Ninomiya
e66fcd8b0e
OpenGL backend: implement render passes ( #73 )
...
Probably not the most efficient implementation, but works.
Issues:
* Doesn't seem to render until the second frame. No clue why, yet.
* Hardcoded 640x480 in more places.
* Creates new FBOs for every subpass every frame. Should be done at Framebuffer build or CommandBuffer build time.
2017-07-11 17:49:20 -07: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
8fca4a21b7
Use UNREACHABLE in more places
2017-07-11 13:59:15 -04:00
Corentin Wallez
96acaef95e
Fix MSVC warnings on enum class switches
2017-07-11 13:59:15 -04:00
Corentin Wallez
fd589f3919
Add an internal ASSERT macro
...
This macro has some advantages over the standard library one:
- It prints the place where the macro was triggered
- It "references" the condition even in Release to avoid warnings
- In release, if possible, it gives compiler hints
It is basically is stripped down version of the ASSERT macros I wrote
for the Daemon engine in src/common/Assert.h
This commit also removes the stray "backend" namespaces for common/
code.
2017-07-10 19:35:21 -04:00
Corentin Wallez
bd0594bab8
Enable warnings on non-MSVC
2017-07-10 19:35:21 -04:00
Corentin Wallez
228ba88fe6
Remove unused Device::CopyBindGroup
2017-07-10 19:35:21 -04:00
Corentin Wallez
98c90d4faa
Fix clang/GCC warnings
2017-07-10 19:35:21 -04:00
Corentin Wallez
a52c23c553
Make one missed #include start from src/
2017-07-10 19:35:21 -04:00
Corentin Wallez
98614a02d3
Fix EnsureTextureUsage not using usage
2017-07-10 19:35:21 -04:00
Kai Ninomiya
296951df60
Introduce Begin/EndComputePass ( #70 )
2017-07-10 14:07:24 -07:00