}
static void
-fd3_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type, boolean write,
+fd3_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type,
uint32_t regid, uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
uint32_t anum = align(num, 4);
for (i = 0; i < num; i++) {
if (prscs[i]) {
- if (write) {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- } else {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- }
+ OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
} else {
OUT_RING(ring, 0xbad00000 | (i << 16));
}
static void
emit_const_bo(struct fd_ringbuffer *ring,
- const struct ir3_shader_variant *v, bool write, uint32_t dst_offset,
+ const struct ir3_shader_variant *v, uint32_t dst_offset,
uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
/* TODO inline this */
assert(dst_offset + num < v->constlen * 4);
- fd3_emit_const_bo(ring, v->type, write, dst_offset, num, prscs, offsets);
+ fd3_emit_const_bo(ring, v->type, dst_offset, num, prscs, offsets);
}
#define VERT_TEX_OFF 0
}
static void
-fd4_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type, boolean write,
+fd4_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type,
uint32_t regid, uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
uint32_t anum = align(num, 4);
for (i = 0; i < num; i++) {
if (prscs[i]) {
- if (write) {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- } else {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- }
+ OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
} else {
OUT_RING(ring, 0xbad00000 | (i << 16));
}
static void
emit_const_bo(struct fd_ringbuffer *ring,
- const struct ir3_shader_variant *v, bool write, uint32_t dst_offset,
+ const struct ir3_shader_variant *v, uint32_t dst_offset,
uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
/* TODO inline this */
assert(dst_offset + num < v->constlen * 4);
- fd4_emit_const_bo(ring, v->type, write, dst_offset, num, prscs, offsets);
+ fd4_emit_const_bo(ring, v->type, dst_offset, num, prscs, offsets);
}
static void
}
static void
-fd5_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type, boolean write,
+fd5_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type,
uint32_t regid, uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
uint32_t anum = align(num, 2);
for (i = 0; i < num; i++) {
if (prscs[i]) {
- if (write) {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- } else {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- }
+ OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
} else {
OUT_RING(ring, 0xbad00000 | (i << 16));
OUT_RING(ring, 0xbad00000 | (i << 16));
static void
emit_const_bo(struct fd_ringbuffer *ring,
- const struct ir3_shader_variant *v, bool write, uint32_t dst_offset,
+ const struct ir3_shader_variant *v, uint32_t dst_offset,
uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
/* TODO inline this */
assert(dst_offset + num < v->constlen * 4);
- fd5_emit_const_bo(ring, v->type, write, dst_offset, num, prscs, offsets);
+ fd5_emit_const_bo(ring, v->type, dst_offset, num, prscs, offsets);
}
void
}
static void
-fd6_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type, boolean write,
+fd6_emit_const_bo(struct fd_ringbuffer *ring, gl_shader_stage type,
uint32_t regid, uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
uint32_t anum = align(num, 2);
for (i = 0; i < num; i++) {
if (prscs[i]) {
- if (write) {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- } else {
- OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
- }
+ OUT_RELOC(ring, fd_resource(prscs[i])->bo, offsets[i], 0, 0);
} else {
OUT_RING(ring, 0xbad00000 | (i << 16));
OUT_RING(ring, 0xbad00000 | (i << 16));
static void
emit_const_bo(struct fd_ringbuffer *ring,
- const struct ir3_shader_variant *v, bool write, uint32_t dst_offset,
+ const struct ir3_shader_variant *v, uint32_t dst_offset,
uint32_t num, struct pipe_resource **prscs, uint32_t *offsets)
{
/* TODO inline this */
assert(dst_offset + num < v->constlen * 4);
- fd6_emit_const_bo(ring, v->type, write, dst_offset, num, prscs, offsets);
+ fd6_emit_const_bo(ring, v->type, dst_offset, num, prscs, offsets);
}
static void
const void *user_buffer, struct pipe_resource *buffer);
static void emit_const_bo(struct fd_ringbuffer *ring,
- const struct ir3_shader_variant *v, bool write, uint32_t dst_offset,
+ const struct ir3_shader_variant *v, uint32_t dst_offset,
uint32_t num, struct pipe_resource **prscs, uint32_t *offsets);
assert(offset * 4 + params < v->constlen * 4);
- emit_const_bo(ring, v, false, offset * 4, params, prscs, offsets);
+ emit_const_bo(ring, v, offset * 4, params, prscs, offsets);
}
}
assert(offset * 4 + params < v->constlen * 4);
- emit_const_bo(ring, v, true, offset * 4, params, prscs, offsets);
+ emit_const_bo(ring, v, offset * 4, params, prscs, offsets);
}
}