Austin Eng
36d82645c3
Add row pitch validation tests
2017-07-17 17:16:45 -04:00
Austin Eng
5ed02ee648
update existing unit tests with proper row pitch
2017-07-17 17:16:45 -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
3f47729df6
Add row pitch validation and default computation
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
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
deba8a4ea6
Add value type Align tests
2017-07-17 17:16:45 -04:00
Austin Eng
98b781527f
Add kTextureRowPitchAlignment and 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
66ff447216
Split Pipeline in Render and Compute, examples 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
e20c5ee9ff
Split Pipeline in Render and Compute, test 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
55ebc25c0f
NXTTest: Make GTest print the name of the backend
2017-07-17 13:48:17 -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
28684d93ed
Fix CMake OS dependent default options.
...
The defaults were setting local variables, while the "option" command
uses the values from the CMake cache. This made the CI not build the
D3D12 or Metal backend on their platforms.
2017-07-14 14:06:12 -04:00
Corentin Wallez
bcee1e5981
NXTTest: expose SwapBuffers to test to make it easy to RenderDoc
...
RenderDoc uses presents as the points to start and end a capture, so to
debug test we have to do the following:
TEST_F(...)
while(true) {
// All the test code
SwapBuffers();
}
}
2017-07-13 15:41:43 -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
4db6327f78
Use WIN32_LEAN_AND_MEAN on Windows
...
This makes Windows.h includes less headers that we don't want and will
help with compilation.
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
3df6441a8c
Group the target sources for the VS solution explorer
2017-07-11 13:59:15 -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
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
6fb3aebf0c
Better namespace CMake folders for Visual Studio
...
This helps Visual Studio users have less clutter in their solution
explorer. This also updates spirv-tools to a newer version that folders
itself. This also updates spirv-headers so that spirv-tools compiles.
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
f30dffa75f
Roll STB to fix a warning
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
Austin Eng
afdcf7d828
D3D12: Wait for GPU on device destruction
2017-07-10 16:45:28 -04:00
Austin Eng
f9c39d021e
Add device reference counting
2017-07-10 16:45:28 -04:00