Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecesary warning regarding clearing. #1307

Closed
reduz opened this issue Oct 10, 2019 · 1 comment · Fixed by #1362
Closed

Unnecesary warning regarding clearing. #1307

reduz opened this issue Oct 10, 2019 · 1 comment · Fixed by #1362
Assignees
Labels
Enhancement New feature or request
Milestone

Comments

@reduz
Copy link

reduz commented Oct 10, 2019

I am trying to render to a region of a framebuffer, and only clearing this region of the framebuffer, as I intend the rest of the content to remain unmodified. As clearing a portion is not possible on Vulkan (I understand this is done for performance reasons, specially on mobile or for hzb, but for my specific use case I just intend to update an atlas with something simple, so it's fine), I use LOAD_OP_KEEP and then emit a clear option (vkCmdClearAttachments) on the region I intend to draw to (via vkCmdSetViewport).

However, I get this warning:

WARNING : PERFORMANCE - Message Id Number: 0 | Message Id Name: UNASSIGNED-CoreValidation-DrawState-ClearCmdBeforeDraw
	vkCmdClearAttachments() issued on command buffer object 0x6596ca0 prior to any Draw Cmds. It is recommended you use RenderPass LOAD_OP_CLEAR on Attachments prior to any Draw.

	Objects - 1
		Object[0] - VK_OBJECT_TYPE_COMMAND_BUFFER, Handle 0x6596ca0

I understand the spirit of it, but my use case is entirely valid. Maybe the validation layer should detect that I am only clearing a small region and not the entire framebuffer, hence not show this?

@mark-lunarg mark-lunarg self-assigned this Oct 10, 2019
@mark-lunarg mark-lunarg added the Enhancement New feature or request label Oct 10, 2019
@mark-lunarg mark-lunarg added this to the P1 milestone Oct 10, 2019
@mark-lunarg
Copy link
Contributor

@reduz, we're in the (slow) process of moving warnings out of the default operation of the validation layers, and into an opt-in validation state (Best Practices). I am adding this to the Best Practices tracking issue #24, and it will be added there and removed from corechecks. @camden-lunarg will address this as part of that issue. Thanks!

@shannon-lunarg shannon-lunarg modified the milestones: P1, sdk-1.1.126.0 Oct 30, 2019
camden-lunarg added a commit that referenced this issue Nov 6, 2019
resolves #1307 which was tracked in #24

Change-Id: If34c89c4fd40d75803ea2d38539a2050570cf374
camden-lunarg added a commit that referenced this issue Nov 8, 2019
resolves #1307 which was tracked in #24

Change-Id: If34c89c4fd40d75803ea2d38539a2050570cf374
camden-lunarg added a commit that referenced this issue Nov 14, 2019
resolves #1307 which was tracked in #24

Change-Id: If34c89c4fd40d75803ea2d38539a2050570cf374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants