Commit Graph

10718 Commits

Author SHA1 Message Date
Austin Eng d568bdad99 Add primitive topology tests 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 c275f7cf9f end2end: Add depth stencil state tests 2017-07-25 10:16:08 -04:00
Austin Eng 0c50889bfa Fix HelloDepthStencil example 2017-07-25 10:16:08 -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 cc8d2d529d D3D12: Enabled copy tests with non-aligned buffer offsets 2017-07-25 09:40:54 -04:00
Austin Eng 04499576d9 D3D12: Add copy splitter unit tests 2017-07-25 09:40:54 -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
Kai Ninomiya 159bade5f5 x_DISABLED -> DISABLED_x 2017-07-20 16:33:02 -04:00
Kai Ninomiya d9af452ceb refactorign -> refactoring 2017-07-20 16:33:02 -04:00
Corentin Wallez a18200e6af unittests: Add tests for push constants 2017-07-20 16:33:02 -04: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
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