xgl: Add framebuffer-no-attachment support
authorMark Lobodzinski <mark@lunarg.com>
Tue, 27 Jan 2015 19:24:03 +0000 (13:24 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 5 Feb 2015 00:58:10 +0000 (17:58 -0700)
Add default values if no attachments are present, correctly handle
override values when attachments are present.  Bug# 13212, header
revision #36.

demos/cube.c
demos/tri.c
include/xgl.h

index b02e443..4ae8c01 100644 (file)
@@ -299,6 +299,9 @@ static void demo_draw_build_cmd(struct demo *demo)
          .pColorAttachments = (XGL_COLOR_ATTACHMENT_BIND_INFO*) &color_attachment,
          .pDepthStencilAttachment = (XGL_DEPTH_STENCIL_BIND_INFO*) &depth_stencil,
          .sampleCount = 1,
+         .width  = demo->width,
+         .height = demo->height,
+         .layers = 1,
     };
     XGL_RENDER_PASS_CREATE_INFO rp_info;
 
index 19a591b..bb5814f 100644 (file)
@@ -121,6 +121,9 @@ static void demo_draw_build_cmd(struct demo *demo)
          .pColorAttachments = (XGL_COLOR_ATTACHMENT_BIND_INFO*) &color_attachment,
          .pDepthStencilAttachment = (XGL_DEPTH_STENCIL_BIND_INFO*) &depth_stencil,
          .sampleCount = 1,
+         .width  = demo->width,
+         .height = demo->height,
+         .layers = 1,
     };
     XGL_RENDER_PASS_CREATE_INFO rp_info;
 
index 9520190..0dd4c5e 100644 (file)
@@ -2212,7 +2212,9 @@ typedef struct _XGL_FRAMEBUFFER_CREATE_INFO
     XGL_COLOR_ATTACHMENT_BIND_INFO*         pColorAttachments;
     XGL_DEPTH_STENCIL_BIND_INFO*            pDepthStencilAttachment;
     XGL_UINT                                sampleCount;
-
+    XGL_UINT                                width;
+    XGL_UINT                                height;
+    XGL_UINT                                layers;
 } XGL_FRAMEBUFFER_CREATE_INFO;
 
 typedef struct _XGL_DRAW_INDIRECT_CMD