aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda/tests/kernel_texobj_2d.ptx
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-02-27 20:55:19 +0100
committerAndrzej Janik <[email protected]>2024-02-11 20:45:51 +0100
commit1b9ba2b2333746c5e2b05a2bf24fa6ec3828dcdf (patch)
tree0b77ca4a41d4f232bd181e2bddc886475c608784 /zluda/tests/kernel_texobj_2d.ptx
parent60d2124a16a7a2a1a6be3707247afe82892a4163 (diff)
downloadZLUDA-1b9ba2b2333746c5e2b05a2bf24fa6ec3828dcdf.tar.gz
ZLUDA-1b9ba2b2333746c5e2b05a2bf24fa6ec3828dcdf.zip
Nobody expects the Red Teamv3
Too many changes to list, but broadly: * Remove Intel GPU support from the compiler * Add AMD GPU support to the compiler * Remove Intel GPU host code * Add AMD GPU host code * More device instructions. From 40 to 68 * More host functions. From 48 to 184 * Add proof of concept implementation of OptiX framework * Add minimal support of cuDNN, cuBLAS, cuSPARSE, cuFFT, NCCL, NVML * Improve ZLUDA launcher for Windows
Diffstat (limited to 'zluda/tests/kernel_texobj_2d.ptx')
-rw-r--r--zluda/tests/kernel_texobj_2d.ptx34
1 files changed, 34 insertions, 0 deletions
diff --git a/zluda/tests/kernel_texobj_2d.ptx b/zluda/tests/kernel_texobj_2d.ptx
new file mode 100644
index 0000000..6b1d7db
--- /dev/null
+++ b/zluda/tests/kernel_texobj_2d.ptx
@@ -0,0 +1,34 @@
+.version 6.5
+.target sm_30
+.address_size 64
+
+.visible .entry texobj(
+ .param .f32 input_x,
+ .param .f32 input_y,
+ .param .u64 image_param,
+ .param .u64 output
+)
+{
+ .reg .u64 out_addr;
+ .reg .u64 temp;
+ .reg .u64 temp2;
+ .reg .u64 image;
+ .reg .f32 x;
+ .reg .f32 y;
+ .reg .s32 r;
+ .reg .s32 g;
+ .reg .s32 b;
+ .reg .s32 a;
+
+ ld.param.f32 x, [input_x];
+ ld.param.f32 y, [input_y];
+ ld.param.u64 image, [image_param];
+ ld.param.u64 out_addr, [output];
+
+ tex.2d.v4.s32.f32 {r, g, b, a}, [image, {x, y}];
+ st.b32 [out_addr], a;
+ st.b32 [out_addr+4], b;
+ st.b32 [out_addr+8], g;
+ st.b32 [out_addr+12], r;
+ ret;
+}