Corentin Wallez
8565e0056a
Rename "buffer map read status" to "buffer map async status"
...
This is in preparation of MapWriteAsync that will use the same status
enum.
2018-04-06 16:03:57 -04:00
Corentin Wallez
2da19d5d6b
Fix double MapReadCallback trigger when Unmapping in it.
...
When calling unmap on a mapped buffer for which the callback hasn't
fired yet, the callback should be called with UNKNOWN. The code marked
the callback as called only after calling it, causing problems with
re-entrancy where the callback would be called twice.
This could also get triggered by destroying the buffer inside the
callback.
Fix this in backend::Buffer and the WireClient and add test for both.
2018-04-06 16:03:57 -04:00
Stephen White
c25d376ac3
Use GL_RGBA8 as the internal format for GL_BGRA.
2018-04-06 15:05:05 -04:00
Corentin Wallez
bc360f7a79
Travis.yml: Fix pip and cache it on OSX
2018-04-04 16:57:25 -04:00
Corentin Wallez
32c0caab61
Enable BasicTests on the Vulkan backend
2018-03-02 15:26:19 -05:00
Corentin Wallez
8d541f3de9
Enable PrimitiveTopologyTests on Vulkan
2018-03-02 15:26:19 -05:00
Corentin Wallez
abcf982e09
Enable IndexFormatTests on Vulkan
...
This adds translation of the index format in the Vulkan backend. A test
is also added for an issue currently present in the Vulkan backend.
2018-03-02 15:26:19 -05:00
Corentin Wallez
cf0ac7570d
D3D12: Keep a reference to pipelines until unused
...
Previously we would remove the reference to pipelines in the destructor
of the d3d12::*Pipeline objects which could cause the D3D12 pipeline
state to be destroyed while still used by in-flight commands. Add a
global queue of ComPtrs to keep alive in the d3d12::Device to fix this.
2018-03-02 14:25:30 -05:00
Corentin Wallez
57f7bc750a
Add an end2end test for SetScissorRect
2018-03-02 14:22:50 -05:00
Corentin Wallez
3a2d9b9a13
Add validation test for dynamic state
...
This includes:
- SetScissorRect
- SetBlendColor
- SetStencilReference
2018-03-02 14:22:50 -05:00
Corentin Wallez
a3c89cc27a
Add and Implement CommandBuffer::SetScissorRect
2018-03-02 14:22:50 -05:00
Corentin Wallez
234111c379
Give up on formatting tests and examples
...
clang-format really doesn't like the builder pattern. We can re-enable
it when we get rid of it.
2018-02-12 15:19:11 -05:00
Corentin Wallez
1090a10d4f
Invert final blit in the OpenGL bindings
...
We want all of NXT to have the origin in the top left. OpenGL's origin
is the bottom left instead. We are doing a blit already to decouple
the NXT render targets from the OpenGL default framebuffer. Take
advantage of this and invert the blit to make the OpenGL's backend
origin be top left.
2018-02-12 15:19:11 -05:00
Corentin Wallez
54ab71b5ce
Add ViewportOrientation test
2018-02-12 15:19:11 -05:00
Corentin Wallez
a88ec74e60
Factor simple framebuffer creation in end2end tests
2018-02-12 15:19:11 -05:00
Corentin Wallez
0dbf74b068
Reduce the verbosity of MSBuild in AppVeyor
2018-02-08 15:04:42 -08:00
msiglreith
adb152bff1
dx12: Handle present texture in a specially
...
PRESENT is an exclusive flag in NXT and can't be combined with other flags. The existing implementation treats the D3D12_RESOURCE_STATE_PRESENT as flag which is confusing due to being 0.
2018-02-08 16:12:06 -05:00
Corentin Wallez
6569f9f0a4
D3D12: Move initialization of the device in the backend
2018-02-07 14:37:51 -05:00
Corentin Wallez
9b491437b1
D3D12: Move the NativeSwapChainImpl in the backend
2018-02-07 00:31:17 -05:00
Corentin Wallez
02d24d3c5e
D3D12: Add back flip_vert_y.
...
This fixes the InputStateTests and PrimitiveTopologyTests
2018-02-07 00:31:17 -05:00
Corentin Wallez
099656dc7a
D3D12: Fix swapchains after 921fb5e1ce
...
The Swapchain::Configure was changed to not require an initial usage
anymore. Previously the code was doing a transition to this usage
causing the code to now transition to <uninitialized data> usage.
Fix this by deleting code. Also make TextureD3D12 responsible for the
transition to PRESENT.
2018-02-07 00:31:17 -05:00
Corentin Wallez
eba7c027f9
Enable DepthStencilStateTests on Vulkan
2018-02-06 09:15:01 -05:00
Corentin Wallez
53604a11a5
Vulkan: Implement SetStencilReference
2018-02-06 09:15:01 -05:00
Corentin Wallez
08b3cbf5bf
Vulkan: Implement DepthStencilState
2018-02-06 09:15:01 -05:00
Corentin Wallez
6e01758dcd
TextureVk: Don't release swapchain-owned images
2018-02-06 09:15:01 -05:00
Corentin Wallez
27570bd5b4
Vulkan: Implement RenderPass LoadOp
2018-02-06 09:15:01 -05:00
Corentin Wallez
8b7564fb54
Vulkan: Remove stencil masks from dynamic state
...
In NXT the stencil read and write masks are part of the pipeline state
so they should be set by the pipeline and not dynamically.
2018-02-06 09:15:01 -05:00
Corentin Wallez
5000ee68d2
Enable BlendStateTest on the Vulkan backend
2018-02-05 13:27:47 -05:00
Corentin Wallez
54c11a8a55
Vulkan: Implement SetBindGroup
2018-02-05 13:27:47 -05:00
Corentin Wallez
14e0687f94
Vulkan: Implement BindGroups
...
For now only StorageBuffer and UniformBuffer bindings are supported as
we don't have samplers yet.
2018-02-05 13:27:47 -05:00
Corentin Wallez
e7362d0b1b
Vulkan: Implement BindGroupLayout
2018-02-05 13:27:47 -05:00
Corentin Wallez
8df4142870
Vulkan: Implement SetBlendColor
2018-02-05 13:27:47 -05:00
Corentin Wallez
5842c71e17
Vulkan: Implement BlendState
2018-02-05 13:27:47 -05:00
Corentin Wallez
b0ae792954
Vulkan: Don't implicitly transition texture already in output attachment
2018-02-05 13:27:47 -05:00
Corentin Wallez
9e59b4ddf1
Fixup some include guards to match the filename
2018-02-05 13:27:47 -05:00
Corentin Wallez
92baafc7a0
Vulkan: Initial implementation of a swapchain.
...
This is currently hardcoded to work on one specific HW/OS/driver
version. It also assumes that the graphics queue is the same as the
present queue.
2018-01-29 19:50:28 -05:00
Corentin Wallez
672d7f26e1
TextureVk: Fix not transitioning between queues
2018-01-29 19:50:28 -05:00
Corentin Wallez
75f5b8039b
Vulkan: Fix texture synchronization for present
2018-01-29 19:50:28 -05:00
Corentin Wallez
dd5ff104ec
Vulkan: support fenced deletion of swapchain objects
2018-01-29 19:50:28 -05:00
Corentin Wallez
eb45309722
vulkan_platform: Add a method to get the uint64_t handle
2018-01-29 19:50:28 -05:00
Corentin Wallez
37bead6fa5
Vulkan: transition attachments implicitly
2018-01-29 19:50:28 -05:00
Corentin Wallez
407233390b
Vulkan: support vktrace and renderdoc
2018-01-29 14:35:58 -05:00
Corentin Wallez
04d8567d31
VulkanInfo: Implement gathering of VkSurfaceKHR related info
2018-01-29 14:35:58 -05:00
Corentin Wallez
7648217f15
NXTTest: destroy the swapchain before the device
2018-01-29 14:35:58 -05:00
Corentin Wallez
b91022dc23
SampleUtils: Flush the wire before getting preferred format
...
This makes sure that the swapchain has been created on the server side
and that the preferred swapchain format is correctly computed.
2018-01-29 14:35:58 -05:00
Corentin Wallez
52cbcb4e47
SampleUtils: print GLFW errors for debugging
2018-01-29 14:35:58 -05:00
Corentin Wallez
e98678f886
CHelloTriangle: Make the framebuffer use the preferred swapchain format
2018-01-29 14:35:58 -05:00
Corentin Wallez
32fbde25ec
Fix Travis after LLVM APT repo change
...
After LLVM 6.0 was branched, the LLVM APT repositories changed so that
clang-format-7 is in the "latest" repo instead of 6.0. We cannot use
the LLVM-6.0 repo in Travis yet because it isn't in the repo whitelist.
Update travis.yml to use clang-format-7
2018-01-29 13:20:07 -05:00
Corentin Wallez
49588b0b8d
Vulkan: Split off and implement SwapChain
2018-01-18 16:17:28 -05:00
Corentin Wallez
0887236c81
nxtSwapChainNextTexture: make texture a union of ptr, u32, u64
...
Making all textures represented by pointers is a problem for Vulkan
where VkImage is a 64bit type and wouldn't fit in a pointer on 32bit
builds. Make texture contain on of each useful type so that each backend
can choose which one it wants to receive.
2018-01-18 16:17:28 -05:00