Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit

Permalink
[spv-out] fix writing result of Splat const-expression
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed May 10, 2023
1 parent d283938 commit 45c616a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/back/spv/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ impl Writer {
let value_id = self.write_constant_expr(value, ir_module, mod_info, false)?;
let component_ids = &[value_id; 4][..size as usize];

let ty = self.get_expression_lookup_type(&mod_info[value]);
let ty = self.get_expression_lookup_type(&mod_info[handle]);

if bypass_cache {
let id = self.id_gen.next();
Expand Down
2 changes: 1 addition & 1 deletion tests/out/spv/image.spvasm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ OpDecorate %368 Location 0
%39 = OpConstant %14 16
%40 = OpConstant %14 8
%41 = OpConstantComposite %13 %32 %34
%42 = OpConstantComposite %14 %32 %32
%42 = OpConstantComposite %13 %32 %32
%44 = OpTypePointer UniformConstant %3
%43 = OpVariable %44 UniformConstant
%46 = OpTypePointer UniformConstant %5
Expand Down

0 comments on commit 45c616a

Please # to comment.