70: Add dispatch, update gitignore and Makefile r=kvark a=grovesNL

- Implement dispatch
- Exclude subdirectory build directories and VSCode workspace settings
- Update Makefile to run CTS from the directory containing deqp - this fixes relative paths

Co-authored-by: Joshua Groves <josh@joshgroves.com>
This commit is contained in:
bors[bot] 2018-05-04 01:31:08 +00:00
commit d06c813fe4
3 changed files with 22 additions and 17 deletions

5
.gitignore vendored
View file

@ -1,6 +1,7 @@
/build/ build/
/target/ target/
conformance/*.xml conformance/*.xml
conformance/*.qpa conformance/*.qpa
conformance/*.txt conformance/*.txt
**/*.rs.bk **/*.rs.bk
.vscode/

View file

@ -6,9 +6,10 @@ NATIVE_DIR=target/native
TARGET=$(NATIVE_DIR)/test TARGET=$(NATIVE_DIR)/test
OBJECTS=$(NATIVE_DIR)/test.o $(NATIVE_DIR)/window.o OBJECTS=$(NATIVE_DIR)/test.o $(NATIVE_DIR)/window.o
LIB_EXTENSION= 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 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 RUST_BACKTRACE:=1
BACKEND:=gl BACKEND:=gl
@ -81,16 +82,16 @@ $(TEST_LIST): $(TEST_LIST_SOURCE)
cat $(TEST_LIST_SOURCE) | grep -v -e ".event" -e "query" >$(TEST_LIST) cat $(TEST_LIST_SOURCE) | grep -v -e ".event" -e "query" >$(TEST_LIST)
cts: $(TARGET) $(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 python $(CTS_DIR)/scripts/log/log_to_xml.py TestResults.qpa conformance/last.xml
mv TestResults.qpa conformance/last.qpa mv TestResults.qpa conformance/last.qpa
firefox conformance/last.xml firefox conformance/last.xml
cts-pick: $(TARGET) cts-pick: $(TARGET)
-LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) $(DEQP) -n $(name) ($(DEQP) -n $(name))
cts-debug: $(TARGET) cts-debug: $(TARGET)
LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) $(DEBUGGER) $(DEQP) -n $(name) (cd $(DEQP_DIR) && $(DEBUGGER) ./deqp-vk -n $(name))
clean: clean:
rm -f $(OBJECTS) $(TARGET) $(BINDING) rm -f $(OBJECTS) $(TARGET) $(BINDING)

View file

@ -893,7 +893,7 @@ pub extern "C" fn gfxBindBufferMemory(
let temp = unsafe { mem::zeroed() }; let temp = unsafe { mem::zeroed() };
*buffer = match mem::replace(&mut *buffer, temp) { *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::Unbound(unbound) => {
Buffer::Buffer( Buffer::Buffer(
gpu.device gpu.device
@ -2883,20 +2883,23 @@ pub extern "C" fn gfxCmdDrawIndexedIndirect(
} }
#[inline] #[inline]
pub extern "C" fn gfxCmdDispatch( pub extern "C" fn gfxCmdDispatch(
_commandBuffer: VkCommandBuffer, mut commandBuffer: VkCommandBuffer,
_groupCountX: u32, groupCountX: u32,
_groupCountY: u32, groupCountY: u32,
_groupCountZ: u32, groupCountZ: u32,
) { ) {
unimplemented!() commandBuffer.dispatch([groupCountX, groupCountY, groupCountZ])
} }
#[inline] #[inline]
pub extern "C" fn gfxCmdDispatchIndirect( pub extern "C" fn gfxCmdDispatchIndirect(
_commandBuffer: VkCommandBuffer, mut commandBuffer: VkCommandBuffer,
_buffer: VkBuffer, buffer: VkBuffer,
_offset: VkDeviceSize, offset: VkDeviceSize,
) { ) {
unimplemented!() match *buffer {
Buffer::Buffer(ref b) => commandBuffer.dispatch_indirect(b, offset),
Buffer::Unbound(_) => panic!("Bound buffer expected!"),
}
} }
#[inline] #[inline]
pub extern "C" fn gfxCmdCopyBuffer( pub extern "C" fn gfxCmdCopyBuffer(