struct pipe_framebuffer_state *state = NULL;
unsigned i;
+ rb_pipe->curr.nr_cbufs = 0;
+ memset(rb_pipe->curr.cbufs, 0, sizeof(rb_pipe->curr.cbufs));
+
/* unwrap the input state */
if (_state) {
memcpy(&unwrapped_state, _state, sizeof(unwrapped_state));
- for(i = 0; i < _state->nr_cbufs; i++)
+
+ rb_pipe->curr.nr_cbufs = _state->nr_cbufs;
+ for(i = 0; i < _state->nr_cbufs; i++) {
unwrapped_state.cbufs[i] = rbug_surface_unwrap(_state->cbufs[i]);
- for (; i < PIPE_MAX_COLOR_BUFS; i++)
- unwrapped_state.cbufs[i] = NULL;
+ if (_state->cbufs[i])
+ rb_pipe->curr.cbufs[i] = rbug_resource(_state->cbufs[i]->texture);
+ }
unwrapped_state.zsbuf = rbug_surface_unwrap(_state->zsbuf);
state = &unwrapped_state;
}
struct pipe_sampler_view **views = NULL;
unsigned i;
+ rb_pipe->curr.num_fs_views = 0;
+ memset(rb_pipe->curr.fs_views, 0, sizeof(rb_pipe->curr.fs_views));
+ memset(rb_pipe->curr.fs_texs, 0, sizeof(rb_pipe->curr.fs_texs));
+ memset(unwrapped_views, 0, sizeof(unwrapped_views));
+
if (_views) {
- for (i = 0; i < num; i++)
+ rb_pipe->curr.num_fs_views = num;
+ for (i = 0; i < num; i++) {
+ rb_pipe->curr.fs_views[i] = rbug_sampler_view(_views[i]);
+ rb_pipe->curr.fs_texs[i] = rbug_resource(_views[i] ? _views[i]->texture : NULL);
unwrapped_views[i] = rbug_sampler_view_unwrap(_views[i]);
- for (; i < PIPE_MAX_SAMPLERS; i++)
- unwrapped_views[i] = NULL;
-
+ }
views = unwrapped_views;
}
struct pipe_sampler_view **views = NULL;
unsigned i;
+ rb_pipe->curr.num_vs_views = 0;
+ memset(rb_pipe->curr.vs_views, 0, sizeof(rb_pipe->curr.vs_views));
+ memset(rb_pipe->curr.vs_texs, 0, sizeof(rb_pipe->curr.vs_texs));
+ memset(unwrapped_views, 0, sizeof(unwrapped_views));
+
if (_views) {
- for (i = 0; i < num; i++)
+ rb_pipe->curr.num_vs_views = num;
+ for (i = 0; i < num; i++) {
+ rb_pipe->curr.vs_views[i] = rbug_sampler_view(_views[i]);
+ rb_pipe->curr.vs_texs[i] = rbug_resource(_views[i]->texture);
unwrapped_views[i] = rbug_sampler_view_unwrap(_views[i]);
- for (; i < PIPE_MAX_VERTEX_SAMPLERS; i++)
- unwrapped_views[i] = NULL;
-
+ }
views = unwrapped_views;
}
struct rbug_shader *vs;
struct rbug_shader *gs;
- struct rbug_sampler_view *sampler_views[PIPE_MAX_SAMPLERS];
- unsigned num_sampler_views;
+ struct rbug_sampler_view *fs_views[PIPE_MAX_SAMPLERS];
+ struct rbug_resource *fs_texs[PIPE_MAX_SAMPLERS];
+ unsigned num_fs_views;
- struct rbug_sampler_view *vert_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
- unsigned num_vert_sampler_views;
+ struct rbug_sampler_view *vs_views[PIPE_MAX_VERTEX_SAMPLERS];
+ struct rbug_resource *vs_texs[PIPE_MAX_VERTEX_SAMPLERS];
+ unsigned num_vs_views;
unsigned nr_cbufs;
struct rbug_resource *cbufs[PIPE_MAX_COLOR_BUFS];
for (i = 0; i < rb_context->curr.nr_cbufs; i++)
cbufs[i] = VOID2U64(rb_context->curr.cbufs[i]);
- for (i = 0; i < rb_context->curr.num_sampler_views; i++)
- texs[i] = VOID2U64(rb_context->curr.sampler_views[i]);
+ for (i = 0; i < rb_context->curr.num_fs_views; i++)
+ texs[i] = VOID2U64(rb_context->curr.fs_texs[i]);
rbug_send_context_info_reply(tr_rbug->con, serial,
VOID2U64(rb_context->curr.vs), VOID2U64(rb_context->curr.fs),
- texs, rb_context->curr.num_sampler_views,
+ texs, rb_context->curr.num_fs_views,
cbufs, rb_context->curr.nr_cbufs,
VOID2U64(rb_context->curr.zsbuf),
rb_context->draw_blocker, rb_context->draw_blocked, NULL);