mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 07:18:17 +00:00
ra_d3d11: fix off by one check
This commit is contained in:
parent
1b28b94585
commit
df28e87ae9
@ -1930,7 +1930,7 @@ static void renderpass_run(struct ra *ra,
|
||||
int binding = pass->params.inputs[val->index].binding;
|
||||
switch (pass->params.inputs[val->index].type) {
|
||||
case RA_VARTYPE_BUF_RO:
|
||||
if (binding > MP_ARRAY_SIZE(ubos)) {
|
||||
if (binding >= MP_ARRAY_SIZE(ubos)) {
|
||||
MP_ERR(ra, "Too many constant buffers in pass\n");
|
||||
return;
|
||||
}
|
||||
@ -1952,7 +1952,7 @@ static void renderpass_run(struct ra *ra,
|
||||
uavs_len = MPMAX(uavs_len, binding + 1);
|
||||
break;
|
||||
case RA_VARTYPE_TEX:
|
||||
if (binding > MP_ARRAY_SIZE(samplers)) {
|
||||
if (binding >= MP_ARRAY_SIZE(samplers)) {
|
||||
MP_ERR(ra, "Too many textures in pass\n");
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user