}
/* viewport state: viewport matching window dims */
- cso_set_viewport_dims(cso, st->state.framebuffer.width,
- st->state.framebuffer.height,
+ cso_set_viewport_dims(cso, st->state.fb_width,
+ st->state.fb_height,
st->state.fb_orientation == Y_0_TOP);
cso_set_vertex_elements(cso, 3, st->util_velems);
{
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
- const float fb_width = (float) st->state.framebuffer.width;
- const float fb_height = (float) st->state.framebuffer.height;
+ const float fb_width = (float) st->state.fb_width;
+ const float fb_height = (float) st->state.fb_height;
const float x0 = (float) x;
const float x1 = (float) (x + width);
const float y0 = (float) y;
/* XXX if the bitmap is larger than the max texture size, break
* it up into chunks.
*/
- GLuint maxSize = 1 << (pipe->screen->get_param(pipe->screen,
- PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
+ GLuint MAYBE_UNUSED maxSize =
+ 1 << (pipe->screen->get_param(pipe->screen,
+ PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
assert(width <= (GLsizei) maxSize);
assert(height <= (GLsizei) maxSize);
}
/* convert Z from [0,1] to [-1,-1] to match viewport Z scale/bias */
const float z = ctx->Current.RasterPos[2] * 2.0f - 1.0f;
const float *color = ctx->Current.RasterColor;
- const float clip_x_scale = 2.0f / st->state.framebuffer.width;
- const float clip_y_scale = 2.0f / st->state.framebuffer.height;
+ const float clip_x_scale = 2.0f / st->state.fb_width;
+ const float clip_y_scale = 2.0f / st->state.fb_height;
const unsigned num_verts = count * 4;
const unsigned num_vert_bytes = num_verts * sizeof(struct st_util_vertex);
struct st_util_vertex *verts;
vb.stride = sizeof(struct st_util_vertex);
u_upload_alloc(pipe->stream_uploader, 0, num_vert_bytes, 4,
- &vb.buffer_offset, &vb.buffer, (void **) &verts);
+ &vb.buffer_offset, &vb.buffer.resource, (void **) &verts);
if (unlikely(!verts)) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCallLists(bitmap text)");
out:
restore_render_state(ctx);
- pipe_resource_reference(&vb.buffer, NULL);
+ pipe_resource_reference(&vb.buffer.resource, NULL);
pipe_sampler_view_reference(&sv, NULL);