mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-26 00:34:12 +00:00
Apparently I pseudo-ADHD'd away from this comment in the middle of writing it and never came back to finish it
This commit is contained in:
parent
9697c22740
commit
bc003cf6a2
@ -539,10 +539,11 @@ fn dig_scalar_pointee_adt<'tcx>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handles #[spirv(storage_class="blah")]. Note this is only called in the scalar translation code, because this is only used for spooky builtin stuff, and we
|
/// Handles #[spirv(storage_class="blah")]. Note this is only called in the scalar translation code, because this is only
|
||||||
|
/// used for spooky builtin stuff, and we pinky promise to never have more than one pointer field in one of these.
|
||||||
|
// TODO: Enforce this is only used in spirv-std.
|
||||||
fn get_storage_class<'tcx>(cx: &CodegenCx<'tcx>, ty: TyAndLayout<'tcx>) -> Option<StorageClass> {
|
fn get_storage_class<'tcx>(cx: &CodegenCx<'tcx>, ty: TyAndLayout<'tcx>) -> Option<StorageClass> {
|
||||||
if let TyKind::Adt(adt, _substs) = ty.ty.kind() {
|
if let TyKind::Adt(adt, _substs) = ty.ty.kind() {
|
||||||
// TODO: Split out this attribute parsing
|
|
||||||
for attr in cx.tcx.get_attrs(adt.did) {
|
for attr in cx.tcx.get_attrs(adt.did) {
|
||||||
if let Some(SpirvAttribute::StorageClass(storage_class)) = parse_attr(cx, attr) {
|
if let Some(SpirvAttribute::StorageClass(storage_class)) = parse_attr(cx, attr) {
|
||||||
return Some(storage_class);
|
return Some(storage_class);
|
||||||
|
Loading…
Reference in New Issue
Block a user