spirv: fix AtomicLoad/Store on images
OpAtomicLoad/Store should have pointer to images just like the rest of the
atomic operators. These couple of lines were poorly copied from the
ssbo/shared_vars cases (the only ones currently tests by the CTS).
Fixes 2afb950161
("spirv/nir: Add support for OpAtomicLoad/Store")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -1671,6 +1671,7 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
|
|||||||
case SpvOpAtomicIDecrement:
|
case SpvOpAtomicIDecrement:
|
||||||
case SpvOpAtomicIAdd:
|
case SpvOpAtomicIAdd:
|
||||||
case SpvOpAtomicISub:
|
case SpvOpAtomicISub:
|
||||||
|
case SpvOpAtomicLoad:
|
||||||
case SpvOpAtomicSMin:
|
case SpvOpAtomicSMin:
|
||||||
case SpvOpAtomicUMin:
|
case SpvOpAtomicUMin:
|
||||||
case SpvOpAtomicSMax:
|
case SpvOpAtomicSMax:
|
||||||
@@ -1681,17 +1682,9 @@ vtn_handle_image(struct vtn_builder *b, SpvOp opcode,
|
|||||||
image = *vtn_value(b, w[3], vtn_value_type_image_pointer)->image;
|
image = *vtn_value(b, w[3], vtn_value_type_image_pointer)->image;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SpvOpAtomicLoad: {
|
case SpvOpAtomicStore:
|
||||||
image.image =
|
image = *vtn_value(b, w[1], vtn_value_type_image_pointer)->image;
|
||||||
vtn_value(b, w[3], vtn_value_type_access_chain)->access_chain;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case SpvOpAtomicStore: {
|
|
||||||
image.image =
|
|
||||||
vtn_value(b, w[1], vtn_value_type_access_chain)->access_chain;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SpvOpImageQuerySize:
|
case SpvOpImageQuerySize:
|
||||||
image.image =
|
image.image =
|
||||||
|
Reference in New Issue
Block a user