From 831e5ef973e5d74527b2163ae343d3ca2b3c2eb5 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 24 Aug 2018 16:52:54 -0400 Subject: [PATCH] Texel elements update --- Cargo.lock | 28 ++++++++++++++-------------- Makefile | 17 ++++++++--------- libportability-gfx/src/conv.rs | 2 +- libportability-gfx/src/impls.rs | 10 +++++++--- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0564440..6392adf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ name = "backtrace-sys" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -69,7 +69,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cc" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -230,7 +230,7 @@ dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -297,7 +297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "gfx-backend-dx11" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#174a4ff59ca20f195ed438fd8cf89354db18f935" +source = "git+https://github.com/gfx-rs/gfx#513acbc7b4876bdf2499328ddf383a2e7f6d034f" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -314,7 +314,7 @@ dependencies = [ [[package]] name = "gfx-backend-dx12" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#174a4ff59ca20f195ed438fd8cf89354db18f935" +source = "git+https://github.com/gfx-rs/gfx#513acbc7b4876bdf2499328ddf383a2e7f6d034f" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -330,7 +330,7 @@ dependencies = [ [[package]] name = "gfx-backend-metal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#174a4ff59ca20f195ed438fd8cf89354db18f935" +source = "git+https://github.com/gfx-rs/gfx#513acbc7b4876bdf2499328ddf383a2e7f6d034f" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -351,7 +351,7 @@ dependencies = [ [[package]] name = "gfx-backend-vulkan" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#174a4ff59ca20f195ed438fd8cf89354db18f935" +source = "git+https://github.com/gfx-rs/gfx#513acbc7b4876bdf2499328ddf383a2e7f6d034f" dependencies = [ "ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -368,7 +368,7 @@ dependencies = [ [[package]] name = "gfx-hal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#174a4ff59ca20f195ed438fd8cf89354db18f935" +source = "git+https://github.com/gfx-rs/gfx#513acbc7b4876bdf2499328ddf383a2e7f6d034f" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -460,7 +460,7 @@ name = "libloading" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -529,7 +529,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -713,7 +713,7 @@ dependencies = [ [[package]] name = "regex" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -800,7 +800,7 @@ name = "spirv_cross" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1163,7 +1163,7 @@ dependencies = [ "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" "checksum byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8389c509ec62b9fe8eca58c502a0acaf017737355615243496cde4994f8fa4f9" -"checksum cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3cc738b39aea615873af94099619ed6915a82575880ed5cdfbf17b63307f1b14" +"checksum cc 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "4a6007c146fdd28d4512a794b07ffe9d8e89e6bf86e2e0c4ddff2e1fb54a0007" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "55e7ec0b74fe5897894cbc207092c577e87c52f8a59e8ca8d97ef37551f60a49" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" @@ -1231,7 +1231,7 @@ dependencies = [ "checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbbea44c5490a1e84357ff28b7d518b4619a159fed5d25f6c1de2d19cc42814" +"checksum regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d8c9f33201f46669484bacc312b00e7541bed6aaf296dffe2bb4e0ac6b8ce2a" "checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum renderdoc 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3aee9badfb4078c375d2d0479ed29c9c057b51ade78f94792ba2dcb11f343e7e" diff --git a/Makefile b/Makefile index 12c0049..0862d6a 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,7 @@ DEQP=cd $(DEQP_DIR) && RUST_LOG=debug LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) ./deq DOTA_DIR=../dota2/bin/osx64 DOTA_EXE=$(DOTA_DIR)/dota2.app/Contents/MacOS/dota2 #possible command lines are : -vulkan_disable_occlusion_queries -vulkan_scene_system_job_cost 2 +vulkan_batch_submits 1 +vulkan_batch_size 500 -DOTA_PARAMS_GFX=-vulkan_disable_occlusion_queries -DOTA_PARAMS_MOLTEN=-vulkan_disable_occlusion_queries +DOTA_PARAMS:= DOTA_DEMO_PHORONIX= "$(CURDIR)/../dota2/demos/dota2-pts-1971360796.dem" DOTA_BENCHMARK=+timedemoquit +timedemo $(DOTA_DEMO_PHORONIX) +timedemo_start 40000 +timedemo_end 50000 +fps_max 0 -novconsole -high -autoconfig_level 3 DOTA_BENCH_RESULTS=../dota2/dota/Source2Bench.csv @@ -73,26 +72,26 @@ version-release: dota-debug: version-debug $(DOTA_EXE) - DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS_GFX) + DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS) dota-debugger: version-debug $(DOTA_EXE) echo "env DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR)" >.lldbinit - DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DEBUGGER) $(DOTA_EXE) $(DOTA_PARAMS_GFX) + DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DEBUGGER) $(DOTA_EXE) $(DOTA_PARAMS) dota-release: version-release $(DOTA_EXE) - DYLD_LIBRARY_PATH=$(CURDIR)/target/release:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS_GFX) + DYLD_LIBRARY_PATH=$(CURDIR)/target/release:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS) dota-molten: $(DOTA_EXE) - DYLD_LIBRARY_PATH=$(CURDIR)/../MoltenVK/Package/Release/MoltenVK/macOS:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS_MOLTEN) + DYLD_LIBRARY_PATH=$(CURDIR)/../MoltenVK/Package/Release/MoltenVK/macOS:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS) dota-orig: $(DOTA_EXE) - DYLD_LIBRARY_PATH=$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS_MOLTEN) + DYLD_LIBRARY_PATH=$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS) dota-orig-gl: $(DOTA_EXE) DYLD_LIBRARY_PATH=$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) -gl dota-bench-gfx: version-release $(DOTA_EXE) - DYLD_LIBRARY_PATH=$(CURDIR)/target/release:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_BENCHMARK) $(DOTA_PARAMS_GFX) + DYLD_LIBRARY_PATH=$(CURDIR)/target/release:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_BENCHMARK) $(DOTA_PARAMS) dota-bench-orig: $(DOTA_EXE) - DYLD_LIBRARY_PATH=$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_BENCHMARK) $(DOTA_PARAMS_MOLTEN) + DYLD_LIBRARY_PATH=$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_BENCHMARK) $(DOTA_PARAMS) dota-bench-gl: $(DOTA_EXE) DYLD_LIBRARY_PATH=$(CURDIR)/target/release:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_BENCHMARK) -gl diff --git a/libportability-gfx/src/conv.rs b/libportability-gfx/src/conv.rs index 573da9a..e76ad3f 100644 --- a/libportability-gfx/src/conv.rs +++ b/libportability-gfx/src/conv.rs @@ -14,7 +14,7 @@ pub fn limits_from_hal(limits: Limits) -> VkPhysicalDeviceLimits { maxImageDimensionCube: limits.max_texture_size as _, maxFramebufferWidth: limits.max_texture_size as _, //TODO maxFramebufferHeight: limits.max_texture_size as _, //TODO - maxTexelBufferElements: limits.max_texture_size as _, //TODO + maxTexelBufferElements: limits.max_texel_elements as _, maxTessellationPatchSize: limits.max_patch_size as _, maxPushConstantsSize: 0x80, //TODO maxViewports: limits.max_viewports as _, diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index 5ca7f57..99c9871 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -293,7 +293,7 @@ pub extern "C" fn gfxGetPhysicalDeviceImageFormatProperties( *pImageFormatProperties = conv::image_format_properties_from_hal(props); VkResult::VK_SUCCESS }, - None => VkResult::VK_ERROR_FORMAT_NOT_SUPPORTED + None => VkResult::VK_ERROR_FORMAT_NOT_SUPPORTED, } } #[inline] @@ -1535,7 +1535,9 @@ pub extern "C" fn gfxCreateImage( ) -> VkResult { let info = unsafe { &*pCreateInfo }; assert_eq!(info.sharingMode, VkSharingMode::VK_SHARING_MODE_EXCLUSIVE); // TODO - assert_eq!(info.initialLayout, VkImageLayout::VK_IMAGE_LAYOUT_UNDEFINED); // TODO + if info.initialLayout != VkImageLayout::VK_IMAGE_LAYOUT_UNDEFINED { + warn!("unexpected initial layout: {:?}", info.initialLayout); + } let image = gpu.device .create_image( @@ -1884,7 +1886,9 @@ pub extern "C" fn gfxCreateGraphicsPipelines( .as_ref() .map(|_| unsafe { &*info.pTessellationState }); - assert_eq!(input_state.primitiveRestartEnable, VK_FALSE); // TODO + if input_state.primitiveRestartEnable != VK_FALSE { + warn!("Primitive restart may not work as expected!"); + } let primitive = match conv::map_primitive_topology( input_state.topology,