Skip to content

Commit 9b733ad

Browse files
committed
align and provide overloaded types for C++
1 parent ef4a9c7 commit 9b733ad

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

vcc/include/shady.h

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,41 @@ native_vec4 texture2D(const sampler2D, native_vec2) __asm__("shady::impure_o
5858
native_vec4 texture3D(const sampler3D, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
5959
native_vec4 textureCube(const samplerCube, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
6060

61-
native_vec4 imageLoad1D(const image1D, int) __asm__("shady::impure_op::spirv.core::98::Invocation");
62-
native_vec4 imageLoad2D(const image2D, native_ivec2) __asm__("shady::impure_op::spirv.core::98::Invocation");
63-
native_vec4 imageLoad3D(const image3D, native_ivec3) __asm__("shady::impure_op::spirv.core::98::Invocation");
61+
native_vec4 imageLoad1D(const image1D, int) __asm__("shady::impure_op::spirv.core::98::Invocation");
62+
native_vec4 imageLoad2D(const image2D, native_ivec2) __asm__("shady::impure_op::spirv.core::98::Invocation");
63+
native_vec4 imageLoad3D(const image3D, native_ivec3) __asm__("shady::impure_op::spirv.core::98::Invocation");
6464
native_vec4 imageLoadCube(const imageCube, native_ivec3) __asm__("shady::impure_op::spirv.core::98::Invocation");
6565

66-
void imageStore1D(image1D, int, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
67-
void imageStore2D(image2D, native_ivec2, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
68-
void imageStore3D(image3D, native_ivec3, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
66+
void imageStore1D(image1D, int, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
67+
void imageStore2D(image2D, native_ivec2, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
68+
void imageStore3D(image3D, native_ivec3, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
6969
void imageStoreCube(imageCube, native_ivec3, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
7070

71-
int imageSize1D(const image1D) __asm__("shady::pure_op::spirv.core::104::Invocation");
72-
native_ivec2 imageSize2D(const image2D) __asm__("shady::pure_op::spirv.core::104::Invocation");
73-
native_ivec3 imageSize3D(const image3D) __asm__("shady::pure_op::spirv.core::104::Invocation");
71+
int imageSize1D(const image1D) __asm__("shady::pure_op::spirv.core::104::Invocation");
72+
native_ivec2 imageSize2D(const image2D) __asm__("shady::pure_op::spirv.core::104::Invocation");
73+
native_ivec3 imageSize3D(const image3D) __asm__("shady::pure_op::spirv.core::104::Invocation");
7474
native_ivec3 imageSizeCube(const imageCube) __asm__("shady::pure_op::spirv.core::104::Invocation");
7575

7676
#if defined(__cplusplus)
7777
native_vec4 texture(const sampler1D, float) __asm__("shady::impure_op::spirv.core::87::Invocation");
7878
native_vec4 texture(const sampler2D, native_vec2) __asm__("shady::impure_op::spirv.core::87::Invocation");
7979
native_vec4 texture(const sampler3D, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
8080
native_vec4 texture(const samplerCube, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
81+
82+
native_vec4 imageLoad(const image1D, int) __asm__("shady::impure_op::spirv.core::98::Invocation");
83+
native_vec4 imageLoad(const image2D, native_ivec2) __asm__("shady::impure_op::spirv.core::98::Invocation");
84+
native_vec4 imageLoad(const image3D, native_ivec3) __asm__("shady::impure_op::spirv.core::98::Invocation");
85+
native_vec4 imageLoad(const imageCube, native_ivec3) __asm__("shady::impure_op::spirv.core::98::Invocation");
86+
87+
void imageStore(image1D, int, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
88+
void imageStore(image2D, native_ivec2, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
89+
void imageStore(image3D, native_ivec3, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
90+
void imageStore(imageCube, native_ivec3, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
91+
92+
int imageSize(const image1D) __asm__("shady::pure_op::spirv.core::104::Invocation");
93+
native_ivec2 imageSize(const image2D) __asm__("shady::pure_op::spirv.core::104::Invocation");
94+
native_ivec3 imageSize(const image3D) __asm__("shady::pure_op::spirv.core::104::Invocation");
95+
native_ivec3 imageSize(const imageCube) __asm__("shady::pure_op::spirv.core::104::Invocation");
8196
#endif
8297

8398
// builtins

0 commit comments

Comments
 (0)