Commit Graph

4303 Commits

Author SHA1 Message Date
Corentin Wallez be985c1aab Add nxt::ShaderStageBit::None 2017-07-20 16:33:02 -04:00
Corentin Wallez 240343f9db Add NXT_GENERATED_FLAGS using set_property 2017-07-20 16:33:02 -04:00
Corentin Wallez 2dfea9961a ValidationTest: Add helper to create a dummy renderpass 2017-07-20 16:33:02 -04:00
Austin Eng b343e8d920 Add texture copy tests 2017-07-20 13:07:36 -04:00
Austin Eng e5bd3e0ece Add Texture expectation macro and mip level parameter 2017-07-20 13:07:36 -04:00
Austin Eng 1b8c64d3e2 Print small buffers on test expectation failure 2017-07-20 13:07:36 -04:00
Austin Eng 4234c39a09 Add output string streams to NXT test expectation helpers 2017-07-20 13:07:36 -04: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
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
Corentin Wallez 1e66ab93fe end2end: Add BufferSetSubData tests
The test doing many small SetSubData freezes the Metal driver on a
MTLBuffer allocation. This is because we don't use a ringbuffer for
SetSubData and instead create one small upload buffer per call.

The same test is skipped on D3D12 as it is bound to have the same issue.

Also adds comments that were forgotten before every MapReadAsync test.
2017-07-18 17:24:54 -04:00
Corentin Wallez e1f16a25bf NXTTest: add other Is<Backend> methods 2017-07-18 17:24:54 -04:00
Austin Eng 3835edde10 Add validation for buffer offset 2017-07-18 16:03:51 -04:00
Corentin Wallez 8668fbacdd end2end: Add BufferMapReadAsync tests 2017-07-18 11:06:54 -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
Corentin Wallez 134e08005a Move USleep to utils/ 2017-07-18 11:06:54 -04:00
Austin Eng 2fbda87caf D3D12: Enable PureInstance test 2017-07-17 17:16:45 -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 51ff013ee2 Add automatic readback alignment and packing for texture expectations
Texture expectations copy into a buffer with a 256-byte aligned row
pitch. Then, the rows are packed into an array to check expectations
against.
2017-07-17 17:16:45 -04:00
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