Skip to content

Commit

Permalink
Merge pull request #2320 from billhollings/fix-arg-buff-padding
Browse files Browse the repository at this point in the history
MSL: Fix argument buffer padding.
  • Loading branch information
billhollings authored May 6, 2024
2 parents 2ccc81f + 119bc52 commit e41d79f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spirv_msl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18291,11 +18291,14 @@ void CompilerMSL::analyze_argument_buffers()
default:
break;
}

// After padding, retrieve the resource again. It will either be more padding, or the actual resource.
rez_bind = get_argument_buffer_resource(desc_set, next_arg_buff_index);
}

// Adjust the number of slots consumed by current member itself.
// Use the count value from the app, instead of the shader, in case the
// shader is only accesing part, or even one element, of the array.
// shader is only accessing part, or even one element, of the array.
next_arg_buff_index += rez_bind.count;
}

Expand Down

0 comments on commit e41d79f

Please sign in to comment.