shader: Fix memory corruption with matrix array shader inputs
Fixes #1788
This commit is contained in:
parent
04e5cbe706
commit
f123cb142d
|
|
@ -742,7 +742,7 @@ cp_add_mat_spec(ShaderMatSpec &spec) {
|
|||
spec._cache_offset[p] = offset + begin[p] * size;
|
||||
}
|
||||
if (spec._func == SMF_shader_input_ptr) {
|
||||
_mat_scratch_size = std::max(_mat_scratch_size, spec._array_count);
|
||||
_mat_scratch_size = std::max(_mat_scratch_size, spec._array_count * ((spec._num_components + 3) / 4));
|
||||
|
||||
// We specify SSD_frame because a PTA may be modified by the app from
|
||||
// frame to frame, and we have no way to know. So, we must respecify a
|
||||
|
|
|
|||
Loading…
Reference in New Issue