VirtualBox

Ignore:
Timestamp:
Jan 9, 2020 3:13:21 PM (5 years ago)
Author:
vboxsync
Message:

3D: Sampler index validation in ldl and ldd instructions, bugref:9613

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c

    r80547 r82700  
    32023202    if (shader_version < WINED3D_SHADER_VERSION(2,0)) sampler_idx = ins->dst[0].reg.idx;
    32033203    else sampler_idx = ins->src[1].reg.idx;
     3204
     3205    AssertReturnVoid(sampler_idx < RT_ELEMENTS(ins->ctx->reg_maps->sampler_type));
    32043206    sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
    32053207
     
    32973299
    32983300    sampler_idx = ins->src[1].reg.idx;
     3301    AssertReturnVoid(sampler_idx < RT_ELEMENTS(ins->ctx->reg_maps->sampler_type));
     3302
    32993303    sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
    33003304    if(deviceImpl->stateBlock->textures[sampler_idx] &&
     
    33253329
    33263330    sampler_idx = ins->src[1].reg.idx;
     3331    AssertReturnVoid(sampler_idx < RT_ELEMENTS(ins->ctx->reg_maps->sampler_type));
     3332
    33273333    sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
    33283334    if(deviceImpl->stateBlock->textures[sampler_idx] &&
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette