Skip to content

Commit 59b1adf

Browse files
committed
Add the loads and also follow the example of texuture sampling
1 parent 22e4cd5 commit 59b1adf

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

vcc/include/shady.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,20 @@ 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_ivec2 imageSize(image2D img) __asm__("shady::pure_op::spirv.core::104::Invocation");
62-
void imageStore(image2D img,
63-
native_ivec2 coord,
64-
native_vec4 data) __asm__("shady::impure_op::spirv.core::99::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");
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");
69+
void imageStoreCube(imageCube, native_ivec3, native_vec4) __asm__("shady::impure_op::spirv.core::99::Invocation");
70+
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");
6575

6676
#if defined(__cplusplus)
6777
native_vec4 texture(const sampler1D, float) __asm__("shady::impure_op::spirv.core::87::Invocation");

0 commit comments

Comments
 (0)