aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-09-16 17:11:50 +1200
committerChris Forbes <chrisforbes@google.com>2016-09-19 08:54:42 +1200
commit5d3d3c8ff87cb1653af1844db31992033b35d80f (patch)
tree129641fd4a09c3233afbfa589d8ba42de352679a /layers/core_validation.cpp
parent94dc57621edf884264e2a08af8ca3e79f03a0fe7 (diff)
downloadusermoji-5d3d3c8ff87cb1653af1844db31992033b35d80f.tar.xz
layers: Get rid of old CBSTATUS-based dynamic viewport and scissor
These were superceded by the precise tracking of dynamic scissors and viewports. Fix up the tests to look for the precise errors, and get rid of the broken clearing of static scissors & viewports, which triggered other errors. Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 09f4bcb8..471237c1 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -2240,11 +2240,7 @@ static bool isDynamic(const PIPELINE_NODE *pPipeline, const VkDynamicState state
// Validate state stored as flags at time of draw call
static bool validate_draw_state_flags(layer_data *dev_data, GLOBAL_CB_NODE *pCB, const PIPELINE_NODE *pPipe, bool indexedDraw) {
- bool result;
- result = validate_status(dev_data, pCB, CBSTATUS_VIEWPORT_SET, VK_DEBUG_REPORT_ERROR_BIT_EXT, DRAWSTATE_VIEWPORT_NOT_BOUND,
- "Dynamic viewport state not set for this command buffer");
- result |= validate_status(dev_data, pCB, CBSTATUS_SCISSOR_SET, VK_DEBUG_REPORT_ERROR_BIT_EXT, DRAWSTATE_SCISSOR_NOT_BOUND,
- "Dynamic scissor state not set for this command buffer");
+ bool result = false;
if (pPipe->graphicsPipelineCI.pInputAssemblyState &&
((pPipe->graphicsPipelineCI.pInputAssemblyState->topology == VK_PRIMITIVE_TOPOLOGY_LINE_LIST) ||
(pPipe->graphicsPipelineCI.pInputAssemblyState->topology == VK_PRIMITIVE_TOPOLOGY_LINE_STRIP))) {
@@ -4073,12 +4069,6 @@ static void set_cb_pso_status(GLOBAL_CB_NODE *pCB, const PIPELINE_NODE *pPipe) {
CBStatusFlags psoDynStateMask = CBSTATUS_ALL;
for (uint32_t i = 0; i < pPipe->graphicsPipelineCI.pDynamicState->dynamicStateCount; i++) {
switch (pPipe->graphicsPipelineCI.pDynamicState->pDynamicStates[i]) {
- case VK_DYNAMIC_STATE_VIEWPORT:
- psoDynStateMask &= ~CBSTATUS_VIEWPORT_SET;
- break;
- case VK_DYNAMIC_STATE_SCISSOR:
- psoDynStateMask &= ~CBSTATUS_SCISSOR_SET;
- break;
case VK_DYNAMIC_STATE_LINE_WIDTH:
psoDynStateMask &= ~CBSTATUS_LINE_WIDTH_SET;
break;
@@ -7020,7 +7010,6 @@ CmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t v
GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer);
if (pCB) {
skip_call |= addCmd(dev_data, pCB, CMD_SETVIEWPORTSTATE, "vkCmdSetViewport()");
- pCB->status |= CBSTATUS_VIEWPORT_SET;
pCB->viewportMask |= ((1u<<viewportCount) - 1u) << firstViewport;
}
lock.unlock();
@@ -7036,7 +7025,6 @@ CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t sci
GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer);
if (pCB) {
skip_call |= addCmd(dev_data, pCB, CMD_SETSCISSORSTATE, "vkCmdSetScissor()");
- pCB->status |= CBSTATUS_SCISSOR_SET;
pCB->scissorMask |= ((1u<<scissorCount) - 1u) << firstScissor;
}
lock.unlock();