mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
[naga spv-out] Let write_checked_load
take AccessTypeAdjustment
.
Let `BlockContext::write_checked_load` take an `AccessTypeAdjustment` argument, so that the caller can choose what adjustment to apply to `pointer`.
This commit is contained in:
parent
26a95fd270
commit
475a716822
@ -1390,7 +1390,7 @@ impl<'w> BlockContext<'w> {
|
||||
}
|
||||
crate::Expression::LocalVariable(variable) => self.function.variables[&variable].id,
|
||||
crate::Expression::Load { pointer } => {
|
||||
self.write_checked_load(pointer, block, result_type_id)?
|
||||
self.write_checked_load(pointer, block, AccessTypeAdjustment::None, result_type_id)?
|
||||
}
|
||||
crate::Expression::FunctionArgument(index) => self.function.parameter_id(index),
|
||||
crate::Expression::CallResult(_)
|
||||
@ -1931,9 +1931,10 @@ impl<'w> BlockContext<'w> {
|
||||
&mut self,
|
||||
pointer: Handle<crate::Expression>,
|
||||
block: &mut Block,
|
||||
access_type_adjustment: AccessTypeAdjustment,
|
||||
result_type_id: Word,
|
||||
) -> Result<Word, Error> {
|
||||
match self.write_expression_pointer(pointer, block, AccessTypeAdjustment::None)? {
|
||||
match self.write_expression_pointer(pointer, block, access_type_adjustment)? {
|
||||
ExpressionPointer::Ready { pointer_id } => {
|
||||
let id = self.gen_id();
|
||||
let atomic_space =
|
||||
|
Loading…
Reference in New Issue
Block a user