if (C == 0x0f)
C = 0x00 | MAX2(tgt.getArgCount(), 2); // guess DC src
- if (tgsi.getOpcode() == TGSI_OPCODE_TG4 &&
- tgt == TEX_TARGET_CUBE_ARRAY_SHADOW)
- shd = fetchSrc(1, 0);
+ if (tgt == TEX_TARGET_CUBE_ARRAY_SHADOW) {
+ switch (tgsi.getOpcode()) {
+ case TGSI_OPCODE_TG4: shd = fetchSrc(1, 0); break;
+ case TGSI_OPCODE_TEX2: shd = fetchSrc(1, 0); break;
+ case TGSI_OPCODE_TXB2: shd = fetchSrc(1, 1); break;
+ case TGSI_OPCODE_TXL2: shd = fetchSrc(1, 1); break;
+ default: assert(!"unexpected opcode with cube array shadow"); break;
+ }
+ }
else if (tgt.isShadow())
shd = fetchSrc(C >> 4, C & 3);
case PIPE_CAP_POINT_SIZE_FIXED:
case PIPE_CAP_TWO_SIDED_COLOR:
case PIPE_CAP_CLIP_PLANES:
+ case PIPE_CAP_TEXTURE_SHADOW_LOD:
return 1;
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return nouveau_screen(pscreen)->vram_domain & NOUVEAU_BO_VRAM ? 1 : 0;
case PIPE_CAP_FRONTEND_NOOP:
case PIPE_CAP_GL_SPIRV:
case PIPE_CAP_SHADER_SAMPLES_IDENTICAL:
- case PIPE_CAP_TEXTURE_SHADOW_LOD: /* should be possible */
return 0;
case PIPE_CAP_VENDOR_ID: