Warnings, compute pipelines, limits

This commit is contained in:
Dzmitry Malyshau 2018-04-26 17:55:06 -04:00
parent 9c1c1b7851
commit e73b22c0d0
5 changed files with 462 additions and 275 deletions

View file

@ -1,5 +1,6 @@
VULKAN_DIR=modules/vulkan-docs/src
CTS_DIR=../VK-GL-CTS
CHERRY_DIR=../cherry
BINDING=target/vulkan.rs
NATIVE_DIR=target/native
TARGET=$(NATIVE_DIR)/test
@ -41,10 +42,13 @@ FULL_LIBRARY_PATH=$(CURDIR)/target/debug
LIBRARY=target/debug/libportability.$(LIB_EXTENSION)
LIBRARY_FAST=target/release/libportability.$(LIB_EXTENSION)
.PHONY: all release binding run cts cts-pick cts-debug clean
.PHONY: all rebuild debug release binding run cts cts-pick cts-debug clean cherry
all: $(TARGET)
rebuild:
cargo build --manifest-path libportability/Cargo.toml --features $(BACKEND)
debug:
cargo build --manifest-path libportability/Cargo.toml --features "$(BACKEND) debug"
@ -91,3 +95,7 @@ cts-debug: $(TARGET)
clean:
rm -f $(OBJECTS) $(TARGET) $(BINDING)
cargo clean
cherry:
cd $(CHERRY_DIR)
LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) go run server.go

View file

@ -10,11 +10,15 @@ This is a prototype library implementing [Vulkan Portability Initiative](https:/
| -------- | ---- | ---- | --- | -- | - | ---- | - | - | - | - |
| *Vulkan* | 7759 | 2155 | 131 | 34 | 0 | 5439 | 0 | 0 | 0 | 0 |
| *DX12* | 3576 | 1258 | 70 | 0 | 0 | 2248 | 0 | 0 | 0 | 0 |
| *Metal* | 3538 | 1215 | 109 | 0 | 0 | 2214 | 0 | 0 | 0 | 0 |
| *Metal* | 7687 | 2072 | 112 | 39 | 0 | 5464 | 0 | 0 | 0 | 0 |
Vulkan is currently stopping on "dEQP-VK.api.command_buffers.render_pass_continue" (secondary render passes). DX12 and Metal - on the lack of `VkBufferView` implementations.
Current blockers:
- *Vulkan*: "api.command_buffers.render_pass_continue" (secondary render passes).
- *DX12*: lack of `VkBufferView` implementation.
- *Metal*: "api.buffer_view.access.suballocation.buffer_view_memory_test_complete" (missing R32Uint support).
Please visit [our wiki](https://github.com/gfx-rs/portability/wiki/Vulkan-CTS-status) for CTS hookup instructions. Once everything is set, you can generate the new results by calling `make cts` on Unix systems.
Please visit [our wiki](https://github.com/gfx-rs/portability/wiki/Vulkan-CTS-status) for CTS hookup instructions. Once everything is set, you can generate the new results by calling `make cts` on Unix systems. When investigating a particular failure, it's handy to do `make cts-debug name=<test_name>`, which runs a single test under system debugger (gdb/lldb).
## Check out
```

View file

@ -1,10 +1,30 @@
use hal::{buffer, command, error, format, image, memory, pass, pso, query, window};
use hal::{IndexType, PatchSize, Primitive};
use hal::{IndexType, Limits, PatchSize, Primitive};
use std::mem;
use super::*;
pub fn limits_from_hal(limits: Limits) -> VkPhysicalDeviceLimits {
VkPhysicalDeviceLimits {
maxImageDimension1D: limits.max_texture_size as _,
maxImageDimension2D: limits.max_texture_size as _,
maxImageDimension3D: limits.max_texture_size as _,
maxImageDimensionCube: limits.max_texture_size as _,
maxTessellationPatchSize: limits.max_patch_size as _,
maxViewports: limits.max_viewports as _,
maxComputeWorkGroupCount: limits.max_compute_group_count,
maxComputeWorkGroupSize: limits.max_compute_group_size,
optimalBufferCopyOffsetAlignment: limits.min_buffer_copy_offset_alignment,
optimalBufferCopyRowPitchAlignment: limits.min_buffer_copy_pitch_alignment,
minTexelBufferOffsetAlignment: limits.min_texel_buffer_offset_alignment,
minUniformBufferOffsetAlignment: limits.min_uniform_buffer_offset_alignment,
minStorageBufferOffsetAlignment: limits.min_storage_buffer_offset_alignment,
.. unsafe { mem::zeroed() } //TODO
}
}
pub fn format_from_hal(format: format::Format) -> VkFormat {
// HAL formats have the same numeric representation as Vulkan formats
unsafe { mem::transmute(format) }
@ -555,11 +575,11 @@ pub fn map_compare_op(op: VkCompareOp) -> pso::Comparison {
}
}
pub fn map_logic_op(op: VkLogicOp) -> pso::LogicOp {
pub fn map_logic_op(_op: VkLogicOp) -> pso::LogicOp {
unimplemented!()
}
pub fn map_stencil_op(op: VkStencilOp) -> pso::StencilOp {
pub fn map_stencil_op(_op: VkStencilOp) -> pso::StencilOp {
unimplemented!()
}
@ -647,7 +667,7 @@ pub fn map_wrap_mode(mode: VkSamplerAddressMode) -> image::WrapMode {
VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT => image::WrapMode::Mirror,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE => image::WrapMode::Clamp,
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER => image::WrapMode::Border,
other => {
_ => {
warn!("Non-covered sampler address mode: {:?}", mode);
image::WrapMode::Clamp
}

File diff suppressed because it is too large Load diff

View file

@ -55,6 +55,7 @@ pub type VkFence = Handle<<B as hal::Backend>::Fence>;
pub type VkRenderPass = Handle<<B as hal::Backend>::RenderPass>;
pub type VkFramebuffer = Handle<<B as hal::Backend>::Framebuffer>;
pub type VkPipeline = Handle<Pipeline<B>>;
pub type VkPipelineCache = Handle<()>;
pub type QueueFamilyIndex = u32;
@ -559,12 +560,6 @@ pub struct VkQueryPool_T {
_unused: [u8; 0],
}
pub type VkQueryPool = *mut VkQueryPool_T;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct VkPipelineCache_T {
_unused: [u8; 0],
}
pub type VkPipelineCache = *mut VkPipelineCache_T;
pub const VkPipelineCacheHeaderVersion_VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE:
VkPipelineCacheHeaderVersion =