Skip to content

Commit 8e55570

Browse files
author
david.algis
committed
♻️ Remove useless function
1 parent 02f042a commit 8e55570

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

Plugin/SampleBasic/src/actionSampleTextureArray.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#include "unityPlugin.h"
44
#include "texture.h"
55

6-
7-
void kernelCallerWriteTextureArray(const dim3 dimGrid, const dim3 dimBlock, cudaSurfaceObject_t inputSurfaceObj, const float time, const int width, const int height, const int depth);
86
void kernelCallerWriteTexture(const dim3 dimGrid, const dim3 dimBlock, cudaSurfaceObject_t inputSurfaceObj, const float t, const int width, const int height);
97

108

Plugin/SampleBasic/src/main.cu

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,6 @@ __global__ void writeTex(cudaSurfaceObject_t surf, int width, int height, float
2121
}
2222

2323

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-
4524
__global__ void writeVertexBuffer(float4* pos, int size, float time)
4625
{
4726
unsigned int x = blockIdx.x * blockDim.x + threadIdx.x;
@@ -60,13 +39,6 @@ void kernelCallerWriteTexture(const dim3 dimGrid, const dim3 dimBlock, cudaSurfa
6039

6140
}
6241

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-
7042

7143
void kernelCallerWriteBuffer(const dim3 dimGrid, const dim3 dimBlock, float4* vertexPtr,const int size, const float time)
7244
{

0 commit comments

Comments
 (0)