Change tex_adr type to mjtSize.

Adds a test which verifies that we can index into the texture buffer at offsets larger than can be represented by a 32-bit signed int.

PiperOrigin-RevId: 868756646
Change-Id: Ibc1a2b269fce41aec370611b0aab77803837e7a8
This commit is contained in:
Adrian Collister
2026-02-11 11:06:21 -08:00
committed by Copybara-Service
parent 2b5afce4aa
commit d881e9e374
7 changed files with 34 additions and 7 deletions
+3 -2
View File
@@ -2163,9 +2163,10 @@ describe('MuJoCo WASM Bindings', () => {
try {
assertExists(model);
const t1 = model.tex('t1');
const texAdr = Number(model.tex_adr[t1.id]);
const expectedData = model.tex_data.slice(
model.tex_adr[t1.id],
model.tex_adr[t1.id] +
texAdr,
texAdr +
model.tex_height[t1.id] * model.tex_width[t1.id] *
model.tex_nchannel[t1.id]);