[Mesa-dev] [PATCH] spirv: mark SpvCapabilityStorageImageWriteWithoutFormat supported

Ilia Mirkin imirkin at alum.mit.edu
Fri Dec 30 05:01:46 UTC 2016


Well, maybe not, but

src/amd/vulkan/radv_device.c:
.shaderStorageImageWriteWithoutFormat     = true,
src/intel/vulkan/anv_device.c:
.shaderStorageImageWriteWithoutFormat     = true,

and from a brief look at the code, it seems like it should work -
image_format gets set to 0 (GL_NONE), which is exactly what happens in
the GLSL path. I noticed this when adding ImageReadWithoutFormat for
gen9+, but sadly there are no tests for either of those.

  -ilia

On Thu, Dec 29, 2016 at 11:57 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> I don't think we actually do...
>
> On Dec 29, 2016 9:34 PM, "Ilia Mirkin" <imirkin at alum.mit.edu> wrote:
>>
>> Both anv and radv support this.
>>
>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> ---
>>  src/compiler/spirv/spirv_to_nir.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/compiler/spirv/spirv_to_nir.c
>> b/src/compiler/spirv/spirv_to_nir.c
>> index 07980aa..22e14f6 100644
>> --- a/src/compiler/spirv/spirv_to_nir.c
>> +++ b/src/compiler/spirv/spirv_to_nir.c
>> @@ -2507,6 +2507,7 @@ vtn_handle_preamble_instruction(struct vtn_builder
>> *b, SpvOp opcode,
>>        case SpvCapabilityInputAttachment:
>>        case SpvCapabilityImageGatherExtended:
>>        case SpvCapabilityStorageImageExtendedFormats:
>> +      case SpvCapabilityStorageImageWriteWithoutFormat:
>>           break;
>>
>>        case SpvCapabilityGeometryStreams:
>> @@ -2528,7 +2529,6 @@ vtn_handle_preamble_instruction(struct vtn_builder
>> *b, SpvOp opcode,
>>        case SpvCapabilityMinLod:
>>        case SpvCapabilityTransformFeedback:
>>        case SpvCapabilityStorageImageReadWithoutFormat:
>> -      case SpvCapabilityStorageImageWriteWithoutFormat:
>>           vtn_warn("Unsupported SPIR-V capability: %s",
>>                    spirv_capability_to_string(cap));
>>           break;
>> --
>> 2.10.2
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list