anv: Add support for shaderStorageImageWriteWithoutFormat
This allows shaders to write to storage images declared with unknown format if they are decorated with NonReadable ("writeonly" in GLSL). Previously an image view would always use a lowered format for its surface state, however when a shader declares a write-only image, we should use the real format. Since we don't know at view creation time whether it will be used with only write-only images in shaders, create two surface states using both the original format and the lowered format. When emitting the binding table, choose between the states based on whether the image is declared write-only in the shader. Tested on both Sascha Willems' computeshader sample (with the original shaders and ones modified to declare images writeonly and omit their format qualifiers) and on our own shaders for which we need support for this. Signed-off-by: Alex Smith <asmith@feralinteractive.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:

committed by
Jason Ekstrand

parent
94d48b7f9f
commit
924a8cbb40
@@ -128,6 +128,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
|
||||
.float64 = device->instance->physicalDevice.info.gen >= 8,
|
||||
.tessellation = true,
|
||||
.draw_parameters = true,
|
||||
.image_write_without_format = true,
|
||||
};
|
||||
|
||||
nir_function *entry_point =
|
||||
|
Reference in New Issue
Block a user