Skip to content

Commit d4407ab

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

File tree

1 file changed

+36
-21
lines changed

1 file changed

+36
-21
lines changed

vcc/include/shady.h

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,31 +53,46 @@ typedef __attribute__((address_space(0x1101))) struct __shady_builtin_image2D* i
5353
typedef __attribute__((address_space(0x1102))) struct __shady_builtin_image3D* image3D;
5454
typedef __attribute__((address_space(0x1103))) struct __shady_builtin_image3D* imageCube;
5555

56-
native_vec4 texture1D(const sampler1D, float) __asm__("shady::impure_op::spirv.core::87::Invocation");
57-
native_vec4 texture2D(const sampler2D, native_vec2) __asm__("shady::impure_op::spirv.core::87::Invocation");
58-
native_vec4 texture3D(const sampler3D, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
59-
native_vec4 textureCube(const samplerCube, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
60-
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");
64-
native_vec4 imageLoadCube(const imageCube, native_ivec3) __asm__("shady::impure_op::spirv.core::98::Invocation");
65-
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");
56+
native_vec4 texture1D(const sampler1D, float) __asm__("shady::impure_op::spirv.core::87::Invocation");
57+
native_vec4 texture2D(const sampler2D, native_vec2) __asm__("shady::impure_op::spirv.core::87::Invocation");
58+
native_vec4 texture3D(const sampler3D, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
59+
native_vec4 textureCube(const samplerCube, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
60+
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");
64+
native_vec4 imageLoadCube(const imageCube, native_ivec3) __asm__("shady::impure_op::spirv.core::98::Invocation");
65+
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");
74-
native_ivec3 imageSizeCube(const imageCube) __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");
74+
native_ivec3 imageSizeCube(const imageCube) __asm__("shady::pure_op::spirv.core::104::Invocation");
7575

7676
#if defined(__cplusplus)
77-
native_vec4 texture(const sampler1D, float) __asm__("shady::impure_op::spirv.core::87::Invocation");
78-
native_vec4 texture(const sampler2D, native_vec2) __asm__("shady::impure_op::spirv.core::87::Invocation");
79-
native_vec4 texture(const sampler3D, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
80-
native_vec4 texture(const samplerCube, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
77+
native_vec4 texture(const sampler1D, float) __asm__("shady::impure_op::spirv.core::87::Invocation");
78+
native_vec4 texture(const sampler2D, native_vec2) __asm__("shady::impure_op::spirv.core::87::Invocation");
79+
native_vec4 texture(const sampler3D, native_vec3) __asm__("shady::impure_op::spirv.core::87::Invocation");
80+
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)