Skip to content

Commit 2fb2a1d

Browse files
committed
Merge branch 'main' of ssh://github.com/Kode/Kore
2 parents cd38963 + f227f8b commit 2fb2a1d

17 files changed

Lines changed: 47 additions & 6 deletions

File tree

includes/kore3/gpu/api.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,18 @@ typedef enum kore_gpu_api {
146146
#define KORE_GPU_CALL6(name, arg0, arg1, arg2, arg3, arg4, arg5) kore_webgpu_##name(arg0, arg1, arg2, arg3, arg4, arg5)
147147
#define KORE_GPU_CALL7(name, arg0, arg1, arg2, arg3, arg4, arg5, arg6) kore_webgpu_##name(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
148148

149+
#elif defined(KORE_CONSOLE)
150+
151+
#define KORE_GPU_IMPL(name) kore_console_##name console
152+
#define KORE_GPU_CALL(name) kore_console_##name()
153+
#define KORE_GPU_CALL1(name, arg0) kore_console_##name(arg0)
154+
#define KORE_GPU_CALL2(name, arg0, arg1) kore_console_##name(arg0, arg1)
155+
#define KORE_GPU_CALL3(name, arg0, arg1, arg2) kore_console_##name(arg0, arg1, arg2)
156+
#define KORE_GPU_CALL4(name, arg0, arg1, arg2, arg3) kore_console_##name(arg0, arg1, arg2, arg3)
157+
#define KORE_GPU_CALL5(name, arg0, arg1, arg2, arg3, arg4) kore_console_##name(arg0, arg1, arg2, arg3, arg4)
158+
#define KORE_GPU_CALL6(name, arg0, arg1, arg2, arg3, arg4, arg5) kore_console_##name(arg0, arg1, arg2, arg3, arg4, arg5)
159+
#define KORE_GPU_CALL7(name, arg0, arg1, arg2, arg3, arg4, arg5, arg6) kore_console_##name(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
160+
149161
#endif
150162

151163
#ifdef __cplusplus

includes/kore3/gpu/buffer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <kore3/vulkan/buffer_structs.h>
1818
#elif defined(KORE_WEBGPU)
1919
#include <kore3/webgpu/buffer_structs.h>
20+
#elif defined(KORE_CONSOLE)
21+
#include <kore3/console/buffer_structs.h>
2022
#else
2123
#error("Unknown GPU backend")
2224
#endif

includes/kore3/gpu/commandlist.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ typedef struct kore_gpu_compute_arguments {
123123
#include <kore3/vulkan/commandlist_structs.h>
124124
#elif defined(KORE_WEBGPU)
125125
#include <kore3/webgpu/commandlist_structs.h>
126+
#elif defined(KORE_CONSOLE)
127+
#include <kore3/console/commandlist_structs.h>
126128
#else
127129
#error("Unknown GPU backend")
128130
#endif

includes/kore3/gpu/device.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#include <kore3/vulkan/device_structs.h>
2626
#elif defined(KORE_WEBGPU)
2727
#include <kore3/webgpu/device_structs.h>
28+
#elif defined(KORE_CONSOLE)
29+
#include <kore3/console/device_structs.h>
2830
#else
2931
#error("Unknown GPU backend")
3032
#endif

includes/kore3/gpu/fence.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <kore3/vulkan/fence_structs.h>
1818
#elif defined(KORE_WEBGPU)
1919
#include <kore3/webgpu/fence_structs.h>
20+
#elif defined(KORE_CONSOLE)
21+
#include <kore3/console/fence_structs.h>
2022
#else
2123
#error("Unknown GPU backend")
2224
#endif

includes/kore3/gpu/raytracing.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <kore3/vulkan/raytracing_structs.h>
1818
#elif defined(KORE_WEBGPU)
1919
#include <kore3/webgpu/raytracing_structs.h>
20+
#elif defined(KORE_CONSOLE)
21+
#include <kore3/console/raytracing_structs.h>
2022
#else
2123
#error("Unknown GPU backend")
2224
#endif

includes/kore3/gpu/sampler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include <kore3/vulkan/sampler_structs.h>
1818
#elif defined(KORE_WEBGPU)
1919
#include <kore3/webgpu/sampler_structs.h>
20+
#elif defined(KORE_CONSOLE)
21+
#include <kore3/console/sampler_structs.h>
2022
#else
2123
#error("Unknown GPU backend")
2224
#endif

includes/kore3/gpu/texture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include <kore3/vulkan/texture_structs.h>
1919
#elif defined(KORE_WEBGPU)
2020
#include <kore3/webgpu/texture_structs.h>
21+
#elif defined(KORE_CONSOLE)
22+
#include <kore3/console/texture_structs.h>
2123
#else
2224
#error("Unknown GPU backend")
2325
#endif

includes/kore3/simd/int32x4.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static inline kore_int32x4 kore_int32x4_sub(kore_int32x4 a, kore_int32x4 b) {
6363
}
6464

6565
static inline kore_int32x4 kore_int32x4_mul(kore_int32x4 a, kore_int32x4 b) {
66-
#ifdef KORE_SSE4_1
66+
#if defined(KORE_SSE4_1) && !defined(KORE_SONY)
6767
return _mm_mullo_epi32(a, b);
6868
#else
6969
// via https://fgiesen.wordpress.com/2016/04/03/sse-mind-the-gap

includes/kore3/simd/uint32x4.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static inline kore_uint32x4 kore_uint32x4_sub(kore_uint32x4 a, kore_uint32x4 b)
6363
}
6464

6565
static inline kore_uint32x4 kore_uint32x4_mul(kore_uint32x4 a, kore_uint32x4 b) {
66-
#ifdef KORE_SSE4_1
66+
#if defined(KORE_SSE4_1) && !defined(KORE_SONY)
6767
return _mm_mullo_epi32(a, b);
6868
#else
6969
// via https://fgiesen.wordpress.com/2016/04/03/sse-mind-the-gap

0 commit comments

Comments
 (0)