diff --git a/.gitignore b/.gitignore index 5c2e3d8..6083428 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -/build/ -/target/ +build/ +target/ conformance/*.xml conformance/*.qpa conformance/*.txt **/*.rs.bk +.vscode/ diff --git a/Makefile b/Makefile index cc4e0ba..a445852 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,10 @@ NATIVE_DIR=target/native TARGET=$(NATIVE_DIR)/test OBJECTS=$(NATIVE_DIR)/test.o $(NATIVE_DIR)/window.o LIB_EXTENSION= -TEST_LIST=conformance/deqp.txt +TEST_LIST=$(CURDIR)/conformance/deqp.txt TEST_LIST_SOURCE=$(CTS_DIR)/external/vulkancts/mustpass/1.0.2/vk-default.txt -DEQP=$(CTS_DIR)/build/external/vulkancts/modules/vulkan/deqp-vk +DEQP_DIR=$(CTS_DIR)/build/external/vulkancts/modules/vulkan/ +DEQP=cd $(DEQP_DIR) && LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) ./deqp-vk RUST_BACKTRACE:=1 BACKEND:=gl @@ -81,16 +82,16 @@ $(TEST_LIST): $(TEST_LIST_SOURCE) cat $(TEST_LIST_SOURCE) | grep -v -e ".event" -e "query" >$(TEST_LIST) cts: $(TARGET) $(TEST_LIST) - -LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) $(DEQP) --deqp-caselist-file=$(TEST_LIST) + ($(DEQP) --deqp-caselist-file=$(TEST_LIST)) python $(CTS_DIR)/scripts/log/log_to_xml.py TestResults.qpa conformance/last.xml mv TestResults.qpa conformance/last.qpa firefox conformance/last.xml cts-pick: $(TARGET) - -LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) $(DEQP) -n $(name) + ($(DEQP) -n $(name)) cts-debug: $(TARGET) - LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) $(DEBUGGER) $(DEQP) -n $(name) + (cd $(DEQP_DIR) && $(DEBUGGER) ./deqp-vk -n $(name)) clean: rm -f $(OBJECTS) $(TARGET) $(BINDING) diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index 536adf2..3f6de37 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -893,7 +893,7 @@ pub extern "C" fn gfxBindBufferMemory( let temp = unsafe { mem::zeroed() }; *buffer = match mem::replace(&mut *buffer, temp) { - Buffer::Buffer(_) => panic!("An non-sparse buffer can only be bound once!"), + Buffer::Buffer(_) => panic!("A non-sparse buffer can only be bound once!"), Buffer::Unbound(unbound) => { Buffer::Buffer( gpu.device @@ -2883,20 +2883,23 @@ pub extern "C" fn gfxCmdDrawIndexedIndirect( } #[inline] pub extern "C" fn gfxCmdDispatch( - _commandBuffer: VkCommandBuffer, - _groupCountX: u32, - _groupCountY: u32, - _groupCountZ: u32, + mut commandBuffer: VkCommandBuffer, + groupCountX: u32, + groupCountY: u32, + groupCountZ: u32, ) { - unimplemented!() + commandBuffer.dispatch([groupCountX, groupCountY, groupCountZ]) } #[inline] pub extern "C" fn gfxCmdDispatchIndirect( - _commandBuffer: VkCommandBuffer, - _buffer: VkBuffer, - _offset: VkDeviceSize, + mut commandBuffer: VkCommandBuffer, + buffer: VkBuffer, + offset: VkDeviceSize, ) { - unimplemented!() + match *buffer { + Buffer::Buffer(ref b) => commandBuffer.dispatch_indirect(b, offset), + Buffer::Unbound(_) => panic!("Bound buffer expected!"), + } } #[inline] pub extern "C" fn gfxCmdCopyBuffer(