Lines Matching refs:rb
193 st_set_ws_renderbuffer_surface(struct gl_renderbuffer *rb,
196 pipe_surface_reference(&rb->surface_srgb, NULL);
197 pipe_surface_reference(&rb->surface_linear, NULL);
200 pipe_surface_reference(&rb->surface_srgb, surf);
202 pipe_surface_reference(&rb->surface_linear, surf);
204 rb->surface = surf; /* just assign, don't ref */
205 pipe_resource_reference(&rb->texture, surf->texture);
207 rb->Width = surf->width;
208 rb->Height = surf->height;
250 struct gl_renderbuffer *rb;
263 rb = stfb->Attachment[idx].Renderbuffer;
264 assert(rb);
265 if (rb->texture == textures[i] &&
266 rb->Width == textures[i]->width0 &&
267 rb->Height == textures[i]->height0) {
275 st_set_ws_renderbuffer_surface(rb, ps);
280 width = rb->Width;
281 height = rb->Height;
308 struct gl_renderbuffer *rb;
311 rb = stfb->Attachment[idx].Renderbuffer;
312 if (!rb || rb->software)
330 struct gl_renderbuffer *rb;
332 rb = CALLOC_STRUCT(gl_renderbuffer);
333 if (!rb) {
338 _mesa_init_renderbuffer(rb, 0);
339 rb->ClassID = 0x4242; /* just a unique value */
340 rb->NumSamples = samples;
341 rb->NumStorageSamples = samples;
342 rb->Format = st_pipe_format_to_mesa_format(format);
343 rb->_BaseFormat = _mesa_get_format_base_format(rb->Format);
344 rb->software = sw;
349 rb->InternalFormat = GL_RGB10_A2;
353 rb->InternalFormat = GL_RGB10;
358 rb->InternalFormat = GL_RGBA8;
364 rb->InternalFormat = GL_RGB8;
369 rb->InternalFormat = GL_SRGB8_ALPHA8;
374 rb->InternalFormat = GL_SRGB8;
377 rb->InternalFormat = GL_RGB5_A1;
380 rb->InternalFormat = GL_RGBA4;
383 rb->InternalFormat = GL_RGB565;
386 rb->InternalFormat = GL_DEPTH_COMPONENT16;
389 rb->InternalFormat = GL_DEPTH_COMPONENT32;
393 rb->InternalFormat = GL_DEPTH24_STENCIL8_EXT;
397 rb->InternalFormat = GL_DEPTH_COMPONENT24;
400 rb->InternalFormat = GL_STENCIL_INDEX8_EXT;
404 rb->InternalFormat = GL_RGBA16_SNORM;
407 rb->InternalFormat = GL_RGBA16;
410 rb->InternalFormat = GL_RGB16;
413 rb->InternalFormat = GL_R8;
416 rb->InternalFormat = GL_RG8;
419 rb->InternalFormat = GL_R16;
422 rb->InternalFormat = GL_RG16;
425 rb->InternalFormat = GL_RGBA32F;
429 rb->InternalFormat = GL_RGB32F;
432 rb->InternalFormat = GL_RGBA16F;
435 rb->InternalFormat = GL_RGB16F;
441 FREE(rb);
445 rb->surface = NULL;
447 return rb;
458 struct gl_renderbuffer *rb;
488 rb = st_new_renderbuffer_fb(format, stfb->iface->visual->samples, sw);
489 if (!rb)
493 _mesa_attach_and_own_rb(stfb, idx, rb);
499 _mesa_attach_and_own_rb(stfb, BUFFER_DEPTH, rb);
505 _mesa_attach_and_reference_rb(stfb, BUFFER_STENCIL, rb);
507 _mesa_attach_and_own_rb(stfb, BUFFER_STENCIL, rb);
1288 struct gl_renderbuffer *rb = NULL;
1303 rb = stfb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
1304 if (!rb) {
1307 rb = stfb->Attachment[BUFFER_BACK_LEFT].Renderbuffer;
1313 if (rb && rb->defined &&
1315 rb->defined = GL_FALSE;
1317 /* Trigger an update of rb->defined on next draw */