[vdi] Refactor texture/surface reference support.

Change-Id: I8014d82aae7139ef5f95e4b50c4fc6da200dbc9d
Этот коммит содержится в:
Michael LIAO
2020-04-06 10:57:03 -04:00
коммит произвёл Michael Hong Bin Liao
родитель db70fc66b7
Коммит 16d9fe5e37
16 изменённых файлов: 241 добавлений и 69 удалений
-3
Просмотреть файл
@@ -28,9 +28,6 @@ THE SOFTWARE.
#define SIZE_W 12
#define TYPE_t float
#if __HIP__
__hip_pinned_shadow__
#endif
texture<TYPE_t, 2, hipReadModeElementType> tex;
// texture object is a kernel argument
-3
Просмотреть файл
@@ -32,9 +32,6 @@ THE SOFTWARE.
#define N 512
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, 1, hipReadModeElementType> tex;
__global__ void kernel(float *out) {
-12
Просмотреть файл
@@ -42,24 +42,12 @@ static float getNormalizedValue(const float value,
return value;
}
#if __HIP__
__hip_pinned_shadow__
#endif
texture<char, hipTextureType1D, hipReadModeNormalizedFloat> texc;
#if __HIP__
__hip_pinned_shadow__
#endif
texture<unsigned char, hipTextureType1D, hipReadModeNormalizedFloat> texuc;
#if __HIP__
__hip_pinned_shadow__
#endif
texture<short, hipTextureType1D, hipReadModeNormalizedFloat> texs;
#if __HIP__
__hip_pinned_shadow__
#endif
texture<unsigned short, hipTextureType1D, hipReadModeNormalizedFloat> texus;
+1 -3
Просмотреть файл
@@ -9,9 +9,7 @@
#include <hip/hip_runtime.h>
#include "test_common.h"
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, 2, hipReadModeElementType> tex;
__global__ void tex2DKernel(float* outputData,
-3
Просмотреть файл
@@ -30,9 +30,6 @@ THE SOFTWARE.
typedef float T;
// Texture reference for 2D Layered texture
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, hipTextureType2DLayered> tex2DL;
__global__ void simpleKernelLayeredArray(T* outputData,int width,int height,int layer)
-9
Просмотреть файл
@@ -31,19 +31,10 @@ THE SOFTWARE.
const char *sampleName = "simpleTexture3D";
// Texture reference for 3D texture
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, hipTextureType3D, hipReadModeElementType> texf;
#if __HIP__
__hip_pinned_shadow__
#endif
texture<int, hipTextureType3D, hipReadModeElementType> texi;
#if __HIP__
__hip_pinned_shadow__
#endif
texture<char, hipTextureType3D, hipReadModeElementType> texc;
template <typename T>