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

False negative with fragmentStoresAndAtomics for readonly storage buffers #327

Closed
MaikKlein opened this issue Sep 12, 2018 · 6 comments
Closed
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@MaikKlein
Copy link

Object: [UNKNOWN] Unknown 0x0
Message ID: "UNASSIGNED-CoreValidation-Shader-FeatureNotEnabled"
Message: "Shader requires fragmentStoresAndAtomics but is not enabled on the device"

From the following fragment shader

#version 430
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable

layout (location = 0) in vec4 o_color;
layout (location = 0) out vec4 uFragColor;

layout(binding = 0 , set = 0) buffer readonly Color {
    vec4 color;
};

void main() {
    uFragColor = color;
}

NonWritable appears in the spv

OpMemberDecorate %Color 0 NonWritable

And the spec says

fragmentStoresAndAtomics specifies whether storage buffers and images support stores and atomic operations in the fragment shader stage. If this feature is not enabled, all storage image, storage texel buffers, and storage buffer variables used by the fragment stage in shader modules must be decorated with the NonWritable decoration (or the readonly memory qualifier in GLSL).

@jzulauf-lunarg jzulauf-lunarg added the Bug Something isn't working label Sep 12, 2018
@chrisforbes
Copy link
Contributor

@jzulauf-lunarg issue here is that SC doesn't consider member decorations at all -- it only cares about the block-level decoration. I don't have the free cycles to look at this right now, though.

@tobine tobine assigned mark-lunarg and unassigned chrisforbes Sep 12, 2018
@mark-lunarg
Copy link
Contributor

I am working on this as part of #20. Current plan is to run binaries through spirv-opt using flatten_decorations pass before we do any shader validation.

@chrisforbes
Copy link
Contributor

AFAIK that pass won't move decorations between members and full objects?

@hrydgard
Copy link
Contributor

Think this is a dupe of #73, no?

@chrisforbes
Copy link
Contributor

Yes, this is the same issue.

@hrydgard
Copy link
Contributor

Alright. Just ran into it...

@shannon-lunarg shannon-lunarg added this to the sdk-1.1.temp.0 milestone Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants