aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda/tests/kernel_texobj_2d.ptx
blob: 6b1d7db8b705c5f4e3be985c8d372db4bc0b1dc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
}