aboutsummaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/cube.c9
-rw-r--r--demos/tri.c11
2 files changed, 15 insertions, 5 deletions
diff --git a/demos/cube.c b/demos/cube.c
index 42a95709..1e961a78 100644
--- a/demos/cube.c
+++ b/demos/cube.c
@@ -1142,7 +1142,6 @@ static void demo_prepare_pipeline(struct demo *demo)
memset(&vp, 0, sizeof(vp));
vp.sType = XGL_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO;
- vp.scissorEnable = XGL_FALSE;
memset(&ds, 0, sizeof(ds));
ds.sType = XGL_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO;
@@ -1201,13 +1200,19 @@ static void demo_prepare_dynamic_states(struct demo *demo)
memset(&viewport_create, 0, sizeof(viewport_create));
viewport_create.sType = XGL_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO;
- viewport_create.viewportCount = 1;
+ viewport_create.viewportAndScissorCount = 1;
XGL_VIEWPORT viewport;
+ XGL_RECT scissor;
viewport.height = (float) demo->height;
viewport.width = (float) demo->width;
viewport.minDepth = (float) 0.0f;
viewport.maxDepth = (float) 1.0f;
+ scissor.extent.width = demo->width;
+ scissor.extent.height = demo->height;
+ scissor.offset.x = 0;
+ scissor.offset.y = 0;
viewport_create.pViewports = &viewport;
+ viewport_create.pScissors = &scissor;
memset(&raster, 0, sizeof(raster));
raster.sType = XGL_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO;
diff --git a/demos/tri.c b/demos/tri.c
index 74ba8951..3cfb86d9 100644
--- a/demos/tri.c
+++ b/demos/tri.c
@@ -757,7 +757,6 @@ static void demo_prepare_pipeline(struct demo *demo)
memset(&vp, 0, sizeof(vp));
vp.sType = XGL_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO;
- vp.scissorEnable = XGL_FALSE;
memset(&ds, 0, sizeof(ds));
@@ -817,14 +816,20 @@ static void demo_prepare_dynamic_states(struct demo *demo)
memset(&viewport_create, 0, sizeof(viewport_create));
viewport_create.sType = XGL_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO;
- viewport_create.viewportCount = 1;
+ viewport_create.viewportAndScissorCount = 1;
XGL_VIEWPORT viewport;
+ XGL_RECT scissor;
memset(&viewport, 0, sizeof(viewport));
- viewport.width = (float) demo->width;
viewport.height = (float) demo->height;
+ viewport.width = (float) demo->width;
viewport.minDepth = (float) 0.0f;
viewport.maxDepth = (float) 1.0f;
+ scissor.extent.width = demo->width;
+ scissor.extent.height = demo->height;
+ scissor.offset.x = 0;
+ scissor.offset.y = 0;
viewport_create.pViewports = &viewport;
+ viewport_create.pScissors = &scissor;
memset(&raster, 0, sizeof(raster));
raster.sType = XGL_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO;