struct {
struct gl_context *ctx;
struct pipe_vertex_state *state[VP_MODE_MAX];
- int private_refcount[VP_MODE_MAX];
+ int16_t private_refcount[VP_MODE_MAX];
GLbitfield enabled_attribs[VP_MODE_MAX];
struct pipe_draw_vertex_state_info info;
} gallium;
* possibly turn a million atomic increments into 1 add and 1 subtract
* atomic op over the whole lifetime of an app.
*/
- int * const private_refcount = (int*)&node->merged.gallium.private_refcount[mode];
+ int16_t * const private_refcount = (int16_t*)&node->merged.gallium.private_refcount[mode];
assert(*private_refcount >= 0);
if (unlikely(*private_refcount == 0)) {
* lists, so one display list can only increment it by
* INT_MAX / N.
*/
- const int add_refs = INT_MAX / 500000;
+ const int16_t add_refs = INT_MAX / 500000;
p_atomic_add(&state->reference.count, add_refs);
*private_refcount = add_refs;
}