1 module dcompute.driver.ocl.image; 2 3 import dcompute.driver.ocl; 4 struct Image 5 { 6 cl_mem raw; 7 8 enum ChannelOrder 9 { 10 r = 0x10B0, 11 a = 0x10B1, 12 rg = 0x10B2, 13 ra = 0x10B3, 14 rgb = 0x10B4, 15 rgba = 0x10B5, 16 bgra = 0x10B6, 17 argb = 0x10B7, 18 intesity = 0x10B8, 19 luminance = 0x10B9, 20 Rx = 0x10BA, 21 RGx = 0x10BB, 22 RGBx = 0x10BC, 23 depth = 0x10BD, 24 depthStencil = 0x10BE, 25 } 26 27 enum ChannelType 28 { 29 snormInt8 = 0x10D0, 30 snormInt16 = 0x10D1, 31 unormInt8 = 0x10D2, 32 unormInt16 = 0x10D3, 33 uormShort565 = 0x10D4, 34 uormShort555 = 0x10D5, 35 unormInt101010 = 0x10D6, 36 byte_ = 0x10D7, 37 short_ = 0x10D8, 38 int_ = 0x10D9, 39 ubyte_ = 0x10DA, 40 ushort_ = 0x10DB, 41 uint_ = 0x10DC, 42 half_ = 0x10DD, 43 float_ = 0x10DE, 44 unormInt24 = 0x10DF, 45 } 46 static struct Format 47 { 48 ChannelOrder order; 49 ChannelType type; 50 } 51 static struct Info 52 { 53 @(0x1110) Format format; 54 @(0x1111) size_t elementSize; 55 @(0x1112) size_t rowPitch; 56 @(0x1113) size_t slicePitch; 57 @(0x1114) size_t width; 58 @(0x1115) size_t height; 59 @(0x1116) size_t depth; 60 @(0x1117) size_t arraySize; 61 @(0x1118) Memory memory; 62 @(0x1119) uint mipLevels; 63 @(0x111A) uint samples; 64 65 // Extensions 66 //@(0x4016) D3D10_SUBRESOURCE_KHR 67 //@(0x401F) D3D11_SUBRESOURCE_KHR 68 //@(0x202A) DX9_MEDIA_PLANE_KHR 69 } 70 //mixin(generateGetInfo!(Info,clGetImageInfo)); 71 }