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
98c90d4faa
Fix clang/GCC warnings
2017-07-10 19:35:21 -04:00
Kai Ninomiya
563e9e253e
Remove prints added in #67 and fix test broken in #64 ( #69 )
2017-07-10 10:23:27 -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
794d4faece
null backend: fix resource usage after cmdbuf transition ( #63 )
...
and test it.
2017-07-07 11:47:40 -07:00
Corentin Wallez
fffe6dfa16
Split backend/common in backend/ and common/
...
This directory used to contain both the state tracking code for the
backends, and the common utilities that could be used both by the
backends and the rest of the code. Things are now:
- src/common is utility code for the whole repo
- src/backend contains libNXT's code
- src/utils is utility code that we don't want in libNXT
This commit also changes all includes to use global paths from src/
bacause it had to touch a bunch of #include statements anyway.
2017-07-06 17:54:52 -04:00
Austin Eng
a9b2a9871c
Add Buffer->Texture->Buffer copy test
...
This does a Buffer->Buffer copy using a Texture as an intermediate
resource and checks if the resulting buffer data is the same
2017-07-06 16:57:54 -04:00
Austin Eng
49fe566d05
Add Buffer range expectation
2017-07-06 16:57:54 -04:00
Austin Eng
4502441604
Enable basic tests for D3D12
2017-07-06 16:57:54 -04:00
Corentin Wallez
59d55dc3ac
unittests: Add validation tests for InputState.
2017-07-06 11:34:31 -04:00
Corentin Wallez
0230a8dea0
end2end: Add InputStateTests
...
They test aspects of the input state but don't try all combinations of
formats like dEQP would do.
2017-07-06 11:34:31 -04:00
Corentin Wallez
4cd65f03b7
Add a readpixel test
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
492cbe4a43
ValidationTests: add B->T copy tests
2017-06-27 13:25:42 -04:00
Corentin Wallez
4b4922cdce
Allow empty B->T copies
...
This adds a test that empty copies are valid for B->B copies too. Tests
for B->T will come in a follow up commit.
2017-06-27 13:25:42 -04:00
Corentin Wallez
eaae746433
Introduce end2end tests.
...
This commit adds a test harness that handles instantiating tests on
multiple backends, and have deferred expectations on the content of
resources.
2017-06-22 09:56:30 -07:00
Corentin Wallez
702186e169
Add restrictions on usages allowed with MapRead/Write
2017-06-22 09:56:30 -07:00
Austin Eng
e480a0724c
add test for SerialQueue::FirstSerial
2017-06-19 17:32:26 -04:00
Corentin Wallez
38246eb51c
Introduce SerialQueue to track in flight resources
2017-06-15 15:37:48 -07:00
Corentin Wallez
dbb5729e64
Add Device::Tick for periodic work
2017-06-15 13:27:50 -07:00
Austin Eng
39c901d3dc
Change usage requirements for Buffer::SetSubData to require TransferDst
...
instead of MapWrite bit
2017-06-14 13:53:52 -04:00
Corentin Wallez
5c92537418
Add validation tests for B2B commands
2017-06-13 13:15:30 -07:00
Corentin Wallez
367cb3515c
Fix MapRead error callback being called with a valid pointer
...
This happened when a request resulted in an error while the buffer was
already mapped. Adds a test that catches the error.
2017-06-13 08:30:01 -07:00
Corentin Wallez
68358b5c23
Add Buffer::MapReadAsync validation tests.
...
This also expands the Buffer validation tests to cover more creation
code paths and SetSubData. It also introduces a mechanism for
ValidationTests to check for device errors.
2017-06-13 08:30:01 -07:00
Corentin Wallez
eca89c2989
WireTests for buffer read mapping
2017-06-13 08:30:01 -07:00
Kai Ninomiya
613eee30c3
Add validation for some null arguments and dangling render passes
...
And add tests for both
2017-06-09 12:11:06 -07:00
Corentin Wallez
4efaf32d1b
Don't check for vertex buffers in dispatch aspects
...
Recently started causing a crash because we stopped creating an empty
InputState for compute pipelines
2017-06-06 10:03:46 -07:00
Corentin Wallez
181e22b482
Rename validation tests to end in Tests
2017-06-06 10:03:46 -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
00176858b5
Add DepthStencilState validation unit tests
2017-06-02 12:13:39 -07:00
Corentin Wallez
7815d78044
Fix RefCountedTest not initializing deleted.
2017-05-30 10:48:32 -07:00
Corentin Wallez
5fbdff6888
Add ValidationTest and an example validation test.
...
Validation tests are tests of the backend state-tracking and validation
code that don't require a GPU as they are running on the null backend.
This commit adds a very simple (and almost useless) BufferValidationTest
as an example of a validation test.
2017-05-30 10:40:43 -07:00
Corentin Wallez
230daf56ad
Misc, noop cleanups
2017-05-30 10:40:43 -07:00
Corentin Wallez
2d641142b0
Add tests for ObjectBase's refcounting
2017-05-30 10:40:43 -07:00
Corentin Wallez
ca309db58a
Add wire tests for unknown and success error status
2017-05-19 10:41:36 +02:00
Corentin Wallez
75bbcec543
Add wire test for the maybe monad
2017-05-19 10:41:36 +02:00
Corentin Wallez
42f2d3c5f2
Add wire tests for *SetErrorCallback
2017-05-19 10:41:36 +02:00
Corentin Wallez
c85b5c0640
Add wire tests for passing arguments around
...
- Add test for passing value arguments as well as aarrays of them
- Add test for passing C string
- Rework Object array argument test to pass multiple objects
2017-05-19 10:41:36 +02:00
Corentin Wallez
1b7c5e3f70
Mock API: special case the SetErrorCallback procs.
...
Also add a suppression for these procs in wiretests, unless we are
specifically testing them.
2017-05-19 10:41:36 +02:00
Corentin Wallez
0a58812f34
Consolidate unittests in one binary
2017-05-19 10:41:36 +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