@@ -21,27 +21,6 @@ __global__ void writeTex(cudaSurfaceObject_t surf, int width, int height, float
21
21
}
22
22
23
23
24
- __global__ void writeTexArray (cudaSurfaceObject_t surf, int width, int height, int depth, float time) {
25
- const unsigned int x = blockIdx .x * blockDim .x + threadIdx .x ;
26
- const unsigned int y = blockIdx .y * blockDim .y + threadIdx .y ;
27
-
28
- if (x < width && y < height) {
29
-
30
- uchar4 c;
31
- c.x = 0 ;
32
- c.y = (unsigned char )(time * 100 + 128 ) % 255 ;
33
- c.z = 0 ;
34
- c.w = 255 ;
35
-
36
- // this isn't optimize...
37
- for (int j = 0 ; j < depth; j++)
38
- {
39
- surf3Dwrite (c, surf, 4 * x, y, j);
40
- }
41
-
42
- }
43
- }
44
-
45
24
__global__ void writeVertexBuffer (float4 * pos, int size, float time)
46
25
{
47
26
unsigned int x = blockIdx .x * blockDim .x + threadIdx .x ;
@@ -60,13 +39,6 @@ void kernelCallerWriteTexture(const dim3 dimGrid, const dim3 dimBlock, cudaSurfa
60
39
61
40
}
62
41
63
- void kernelCallerWriteTextureArray (const dim3 dimGrid, const dim3 dimBlock, cudaSurfaceObject_t inputSurfaceObj, const float time, const int width, const int height, const int depth)
64
- {
65
- writeTexArray << <dimGrid, dimBlock >> > (inputSurfaceObj, width, height, depth, time);
66
-
67
- }
68
-
69
-
70
42
71
43
void kernelCallerWriteBuffer (const dim3 dimGrid, const dim3 dimBlock, float4 * vertexPtr,const int size, const float time)
72
44
{
0 commit comments