diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-11-18 23:33:51 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-11-18 23:55:28 +0000 |
commit | df28e87ae957193f6e64b7e147dd2c27c312c006 (patch) | |
tree | b18c879d8ac5af1eb9b0b5c361fb159c25532f52 /video/out | |
parent | 1b28b945850dfa7371967e8ade2c51141fffe624 (diff) | |
download | mpv-df28e87ae957193f6e64b7e147dd2c27c312c006.tar.bz2 mpv-df28e87ae957193f6e64b7e147dd2c27c312c006.tar.xz |
ra_d3d11: fix off by one check
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/d3d11/ra_d3d11.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/d3d11/ra_d3d11.c b/video/out/d3d11/ra_d3d11.c index e2a2b633b6..84fd004adc 100644 --- a/video/out/d3d11/ra_d3d11.c +++ b/video/out/d3d11/ra_d3d11.c @@ -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; } |