Dave Airlie <airl...@gmail.com> writes: > Hi Eric, > > so I've been playing around with gallium/ubos a bit more, > > I noticed something I wasn't sure abuot between the i965 vs and fs backends > > FS does > ir_constant *offset = ir->operands[1]->as_constant(); > fs_inst *pull = emit(fs_inst(FS_OPCODE_PULL_CONSTANT_LOAD, > packed_consts, > surf_index, > fs_reg(offset->value.u[0]))); > > so it gets offset and derefs it later, > > ir_constant *const_offset_ir = ir->operands[1]->as_constant(); > unsigned const_offset = const_offset_ir ? const_offset_ir->value.u[0] : > 0; > > does a check around it. > > What are the different ways ubo_load can get used? I think I need to > create a tgsi IR equivalent of it, since I don't think I can resolve > the offset into the constant buffer at the glsl->tgsi translation > stage.
Ah, I understand the question now. Yeah, I think you need a TGSI equivalent because you need to be able to pass which ubo is being dereferenced from, even if you still decide to use the weird old ARL/offset+ADDR pattern for loading constants with a varying index.
pgp9jMoUUdAj2.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev