[vdi] Refactor texture/surface reference support.
Change-Id: I8014d82aae7139ef5f95e4b50c4fc6da200dbc9d
Этот коммит содержится в:
коммит произвёл
Michael Hong Bin Liao
родитель
db70fc66b7
Коммит
16d9fe5e37
@@ -33,9 +33,6 @@ THE SOFTWARE.
|
||||
|
||||
#define fileName "tex2d_kernel.code"
|
||||
|
||||
#if __HIP__
|
||||
__hip_pinned_shadow__
|
||||
#endif
|
||||
texture<float, 2, hipReadModeElementType> tex;
|
||||
bool testResult = false;
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@ THE SOFTWARE.
|
||||
|
||||
#include "hip/hip_runtime.h"
|
||||
|
||||
#if __HIP__
|
||||
__hip_pinned_shadow__
|
||||
#endif
|
||||
extern texture<float, 2, hipReadModeElementType> tex;
|
||||
|
||||
extern "C" __global__ void tex2dKernel(float* outputData, int width, int height) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
Ссылка в новой задаче
Block a user