tests: allow image tiling to be specified
authorChia-I Wu <olv@lunarg.com>
Fri, 24 Oct 2014 02:12:05 +0000 (10:12 +0800)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Fri, 31 Oct 2014 21:29:18 +0000 (15:29 -0600)
Add tiling to XglImage::init() with default value XGL_LINEAR_TILING.

tests/xglimage.cpp
tests/xglimage.h

index 105616c..55edcf8 100644 (file)
@@ -55,7 +55,8 @@ XglImage::~XglImage()
 }
 
 void XglImage::init(XGL_UINT32 w, XGL_UINT32 h,
-               XGL_FORMAT fmt, XGL_FLAGS usage)
+               XGL_FORMAT fmt, XGL_FLAGS usage,
+               XGL_IMAGE_TILING tiling)
 {
     XGL_RESULT err;
     XGL_UINT mipCount;
@@ -121,7 +122,7 @@ void XglImage::init(XGL_UINT32 w, XGL_UINT32 h,
     imageCreateInfo.extent.depth = 1;
     imageCreateInfo.mipLevels = mipCount;
     imageCreateInfo.samples = 1;
-    imageCreateInfo.tiling = XGL_LINEAR_TILING;
+    imageCreateInfo.tiling = tiling;
 
     // Image usage flags
     //    typedef enum _XGL_IMAGE_USAGE_FLAGS
index 8c0526b..76d2e07 100644 (file)
@@ -51,7 +51,8 @@ public:
     //    } XGL_IMAGE_USAGE_FLAGS;
 public:
     void init( XGL_UINT32 w, XGL_UINT32 h,
-               XGL_FORMAT fmt, XGL_FLAGS usage);
+                     XGL_FORMAT fmt, XGL_FLAGS usage,
+                     XGL_IMAGE_TILING tiling=XGL_LINEAR_TILING);
 
     //    void clear( CommandBuffer*, XGL_UINT[4] );
     //    void prepare( CommandBuffer*, XGL_IMAGE_STATE );