Browse Source

Merge branch 'master' into filename-merge

Jeroen van Rijn 3 years ago
parent
commit
b68ab0dd6d

+ 3 - 8
.github/workflows/ci.yml

@@ -39,9 +39,7 @@ jobs:
           make
         timeout-minutes: 10
       - name: Odin issues tests
-        run: |
-          cd tests/issues
-          ./run.sh
+        run: tests/issues/run.sh
         timeout-minutes: 10
       - name: Odin check examples/all for Linux i386
         run: ./odin check examples/all -vet -strict-style -target:linux_i386
@@ -93,9 +91,7 @@ jobs:
           make
         timeout-minutes: 10
       - name: Odin issues tests
-        run: |
-          cd tests/issues
-          ./run.sh
+        run: tests/issues/run.sh
         timeout-minutes: 10
       - name: Odin check examples/all for Darwin arm64
         run: ./odin check examples/all -vet -strict-style -target:darwin_arm64
@@ -167,8 +163,7 @@ jobs:
         shell: cmd
         run: |
           call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
-          cd tests\issues
-          call run.bat
+          call tests\issues\run.bat
         timeout-minutes: 10
       - name: Odin check examples/all for Windows 32bits
         shell: cmd

+ 0 - 1
core/crypto/util/util.odin

@@ -11,7 +11,6 @@ package util
 */
 
 import "core:mem"
-_ :: mem
 
 // @note(bp): this can replace the other two
 cast_slice :: #force_inline proc "contextless" ($D: typeid/[]$DE, src: $S/[]$SE) -> D {

+ 3 - 3
core/math/linalg/specific.odin

@@ -479,21 +479,21 @@ angle_from_quaternion_f16 :: proc(q: Quaternionf16) -> f16 {
 		return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2
 	}
 
-	return math.cos(q.x) * 2
+	return math.acos(q.w) * 2
 }
 angle_from_quaternion_f32 :: proc(q: Quaternionf32) -> f32 {
 	if abs(q.w) > math.SQRT_THREE*0.5 {
 		return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2
 	}
 
-	return math.cos(q.x) * 2
+	return math.acos(q.w) * 2
 }
 angle_from_quaternion_f64 :: proc(q: Quaternionf64) -> f64 {
 	if abs(q.w) > math.SQRT_THREE*0.5 {
 		return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2
 	}
 
-	return math.cos(q.x) * 2
+	return math.acos(q.w) * 2
 }
 angle_from_quaternion :: proc{
 	angle_from_quaternion_f16,

+ 1 - 1
core/mem/virtual/virtual.odin

@@ -120,7 +120,7 @@ alloc_from_memory_block :: proc(block: ^Memory_Block, min_size, alignment: int)
 	do_commit_if_necessary :: proc(block: ^Memory_Block, size: uint) -> (err: Allocator_Error) {
 		if block.committed - block.used < size {
 			pmblock := (^Platform_Memory_Block)(block)
-			base_offset := uint(uintptr(block) - uintptr(pmblock))
+			base_offset := uint(uintptr(pmblock.block.base) - uintptr(pmblock))
 			platform_total_commit := base_offset + block.used + size
 
 			assert(pmblock.committed <= pmblock.reserved)

+ 3 - 0
vendor/vulkan/_gen/create_vulkan_odin_wrapper.py

@@ -626,6 +626,9 @@ with open("../core.odin", 'w', encoding='utf-8') as f:
     f.write(BASE)
     f.write("""
 API_VERSION_1_0 :: (1<<22) | (0<<12) | (0)
+API_VERSION_1_1 :: (1<<22) | (1<<12) | (0)
+API_VERSION_1_2 :: (1<<22) | (2<<12) | (0)
+API_VERSION_1_3 :: (1<<22) | (3<<12) | (0)
 
 MAKE_VERSION :: proc(major, minor, patch: u32) -> u32 {
     return (major<<22) | (minor<<12) | (patch)

+ 3 - 0
vendor/vulkan/core.odin

@@ -3,6 +3,9 @@
 //
 package vulkan
 API_VERSION_1_0 :: (1<<22) | (0<<12) | (0)
+API_VERSION_1_1 :: (1<<22) | (1<<12) | (0)
+API_VERSION_1_2 :: (1<<22) | (2<<12) | (0)
+API_VERSION_1_3 :: (1<<22) | (3<<12) | (0)
 
 MAKE_VERSION :: proc(major, minor, patch: u32) -> u32 {
     return (major<<22) | (minor<<12) | (patch)