static inline void
nvc0_stage_sampler_states_bind(struct nvc0_context *nvc0,
unsigned s,
- unsigned nr, void **hwcso)
+ unsigned nr, void **hwcsos)
{
unsigned highest_found = 0;
unsigned i;
for (i = 0; i < nr; ++i) {
+ struct nv50_tsc_entry *hwcso = hwcsos ? nv50_tsc_entry(hwcsos[i]) : NULL;
struct nv50_tsc_entry *old = nvc0->samplers[s][i];
- if (hwcso[i])
+ if (hwcso)
highest_found = i;
- if (hwcso[i] == old)
+ if (hwcso == old)
continue;
nvc0->samplers_dirty[s] |= 1 << i;
- nvc0->samplers[s][i] = nv50_tsc_entry(hwcso[i]);
+ nvc0->samplers[s][i] = hwcso;
if (old)
nvc0_screen_tsc_unlock(nvc0->screen, old);
}
unsigned i;
for (i = 0; i < nr; ++i) {
+ struct pipe_sampler_view *view = views ? views[i] : NULL;
struct nv50_tic_entry *old = nv50_tic_entry(nvc0->textures[s][i]);
- if (views[i] == nvc0->textures[s][i])
+ if (view == nvc0->textures[s][i])
continue;
nvc0->textures_dirty[s] |= 1 << i;
- if (views[i] && views[i]->texture) {
- struct pipe_resource *res = views[i]->texture;
+ if (view && view->texture) {
+ struct pipe_resource *res = view->texture;
if (res->target == PIPE_BUFFER &&
(res->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT))
nvc0->textures_coherent[s] |= 1 << i;
nvc0_screen_tic_unlock(nvc0->screen, old);
}
- pipe_sampler_view_reference(&nvc0->textures[s][i], views[i]);
+ pipe_sampler_view_reference(&nvc0->textures[s][i], view);
}
for (i = nr; i < nvc0->num_textures[s]; ++i) {
break;
default:
assert(!"unsupported IR!");
+ free(prog);
return NULL;
}
break;
default:
assert(!"unsupported IR!");
+ free(prog);
return NULL;
}
static void
nvc0_set_window_rectangles(struct pipe_context *pipe,
- boolean include,
+ bool include,
unsigned num_rectangles,
const struct pipe_scissor_state *rectangles)
{
nvc0_set_shader_buffers(struct pipe_context *pipe,
enum pipe_shader_type shader,
unsigned start, unsigned nr,
- const struct pipe_shader_buffer *buffers)
+ const struct pipe_shader_buffer *buffers,
+ unsigned writable_bitmask)
{
const unsigned s = nvc0_shader_stage(shader);
if (!nvc0_bind_buffers_range(nvc0_context(pipe), s, start, nr, buffers))
if (nvc0->global_residents.size <= (end * sizeof(struct pipe_resource *))) {
const unsigned old_size = nvc0->global_residents.size;
- const unsigned req_size = end * sizeof(struct pipe_resource *);
- util_dynarray_resize(&nvc0->global_residents, req_size);
+ util_dynarray_resize(&nvc0->global_residents, struct pipe_resource *, end);
memset((uint8_t *)nvc0->global_residents.data + old_size, 0,
- req_size - old_size);
+ nvc0->global_residents.size - old_size);
}
if (resources) {