qir_ADD_dest(c, qir_reg(QFILE_TEX_S_DIRECT, 0),
indirect_offset,
- qir_uniform(c, QUNIFORM_UBO_ADDR, 0));
+ qir_uniform(c, QUNIFORM_UBO0_ADDR, 0));
c->num_texture_samples++;
static struct qreg
vc4_ubo_load(struct vc4_compile *c, nir_intrinsic_instr *intr)
{
- unsigned buffer_index = nir_src_as_uint(intr->src[0]);
+ int buffer_index = nir_src_as_uint(intr->src[0]);
assert(buffer_index == 1);
assert(c->stage == QSTAGE_FRAG);
qir_ADD_dest(c, qir_reg(QFILE_TEX_S_DIRECT, 0),
offset,
- qir_uniform(c, QUNIFORM_UBO_ADDR, buffer_index));
+ qir_uniform(c, QUNIFORM_UBO1_ADDR, 0));
c->num_texture_samples++;
data);
break;
- case QUNIFORM_UBO_ADDR:
- if (data == 0) {
- cl_aligned_reloc(job, &job->uniforms,
- &uniforms, ubo, 0);
- } else {
- struct pipe_constant_buffer *c =
- &cb->cb[data];
- struct vc4_resource *rsc =
- vc4_resource(c->buffer);
-
- cl_aligned_reloc(job, &job->uniforms,
- &uniforms,
- rsc->bo, c->buffer_offset);
- }
+ case QUNIFORM_UBO0_ADDR:
+ cl_aligned_reloc(job, &job->uniforms,
+ &uniforms, ubo, data);
break;
+ case QUNIFORM_UBO1_ADDR: {
+ struct vc4_resource *rsc =
+ vc4_resource(cb->cb[1].buffer);
+
+ cl_aligned_reloc(job, &job->uniforms,
+ &uniforms,
+ rsc->bo, cb->cb[1].buffer_offset);
+ break;
+ }
+
case QUNIFORM_TEXTURE_MSAA_ADDR:
write_texture_msaa_addr(job, &uniforms, texstate, data);
break;
case QUNIFORM_UNIFORMS_ADDRESS:
break;
case QUNIFORM_UNIFORM:
- case QUNIFORM_UBO_ADDR:
+ case QUNIFORM_UBO0_ADDR:
+ case QUNIFORM_UBO1_ADDR:
dirty |= VC4_DIRTY_CONSTBUF;
break;