aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda_rt/src/tests/buffer_mipmap.cu
diff options
context:
space:
mode:
Diffstat (limited to 'zluda_rt/src/tests/buffer_mipmap.cu')
-rw-r--r--zluda_rt/src/tests/buffer_mipmap.cu17
1 files changed, 17 insertions, 0 deletions
diff --git a/zluda_rt/src/tests/buffer_mipmap.cu b/zluda_rt/src/tests/buffer_mipmap.cu
new file mode 100644
index 0000000..e08cc8a
--- /dev/null
+++ b/zluda_rt/src/tests/buffer_mipmap.cu
@@ -0,0 +1,17 @@
+// nvcc buffer_id.cu -I"C:\dev\OptiX SDK 6.5.0\include" -ptx -x cu -dc
+#include <optix.h>
+#include <optixu/optixu_math_namespace.h>
+#include <optix_world.h>
+
+using namespace optix;
+
+rtDeclareVariable( uint, texture_id, , );
+rtBuffer<uint2, 1> output_buffer;
+
+RT_PROGRAM void start() {
+ bool isResident;
+ uint4 val0 = rtTex2DLodLoadOrRequest<uint4>( texture_id, 0, 0, 0, isResident );
+ output_buffer[0] = make_uint2(val0.x, val0.y);
+ uint4 val1 = rtTex2DLodLoadOrRequest<uint4>( texture_id, 0, 0, 1000, isResident );
+ output_buffer[1] = make_uint2(val1.x, val1.y);
+}