• Home
  • Raw
  • Download

Lines Matching refs:rb

211 get_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb,  in get_z32_values()  argument
215 struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); in get_z32_values()
216 const GLint w = rb->Width, h = rb->Height; in get_z32_values()
217 const GLubyte *map = _swrast_pixel_address(rb, 0, 0); in get_z32_values()
220 if (rb->Format == MESA_FORMAT_Z32) { in get_z32_values()
229 const GLint bpp = _mesa_get_format_bytes(rb->Format); in get_z32_values()
234 _mesa_unpack_uint_z_row(rb->Format, 1, src, &zbuffer[i]); in get_z32_values()
246 put_z32_values(struct gl_context *ctx, struct gl_renderbuffer *rb, in put_z32_values() argument
250 struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); in put_z32_values()
251 const GLint w = rb->Width, h = rb->Height; in put_z32_values()
252 GLubyte *map = _swrast_pixel_address(rb, 0, 0); in put_z32_values()
255 if (rb->Format == MESA_FORMAT_Z32) { in put_z32_values()
265 gl_pack_uint_z_func packZ = _mesa_get_pack_uint_z_func(rb->Format); in put_z32_values()
266 const GLint bpp = _mesa_get_format_bytes(rb->Format); in put_z32_values()
286 struct gl_renderbuffer *rb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; in _swrast_depth_test_span() local
287 const GLint bpp = _mesa_get_format_bytes(rb->Format); in _swrast_depth_test_span()
295 GLuint zBits = _mesa_get_format_bits(rb->Format, GL_DEPTH_BITS); in _swrast_depth_test_span()
301 zStart = _swrast_pixel_address(rb, span->x, span->y); in _swrast_depth_test_span()
303 if (rb->Format == MESA_FORMAT_Z16 && !(span->arrayMask & SPAN_XY)) { in _swrast_depth_test_span()
308 else if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) { in _swrast_depth_test_span()
319 get_z32_values(ctx, rb, count, in _swrast_depth_test_span()
323 _mesa_unpack_uint_z_row(rb->Format, count, zStart, zBufferTemp); in _swrast_depth_test_span()
377 put_z32_values(ctx, rb, count, span->array->x, span->array->y, in _swrast_depth_test_span()
382 gl_pack_uint_z_func packZ = _mesa_get_pack_uint_z_func(rb->Format); in _swrast_depth_test_span()
414 struct gl_renderbuffer *rb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; in _swrast_depth_bounds_test() local
434 zStart = _swrast_pixel_address(rb, span->x, span->y); in _swrast_depth_bounds_test()
436 if (rb->Format == MESA_FORMAT_Z32 && !(span->arrayMask & SPAN_XY)) { in _swrast_depth_bounds_test()
443 get_z32_values(ctx, rb, count, span->array->x, span->array->y, in _swrast_depth_bounds_test()
447 _mesa_unpack_uint_z_row(rb->Format, count, zStart, zBufferTemp); in _swrast_depth_bounds_test()
482 struct gl_renderbuffer *rb, in _swrast_read_depth_span_float() argument
485 if (!rb) { in _swrast_read_depth_span_float()
491 if (y < 0 || y >= (GLint) rb->Height || in _swrast_read_depth_span_float()
492 x + n <= 0 || x >= (GLint) rb->Width) { in _swrast_read_depth_span_float()
507 if (x + n > (GLint) rb->Width) { in _swrast_read_depth_span_float()
508 GLint dx = x + n - (GLint) rb->Width; in _swrast_read_depth_span_float()
518 _mesa_unpack_float_z_row(rb->Format, n, _swrast_pixel_address(rb, x, y), in _swrast_read_depth_span_float()
530 struct gl_renderbuffer *rb = in _swrast_clear_depth_buffer() local
537 if (!rb || !ctx->Depth.Mask) { in _swrast_clear_depth_buffer()
549 if (rb->Format == MESA_FORMAT_S8_Z24 || in _swrast_clear_depth_buffer()
550 rb->Format == MESA_FORMAT_X8_Z24 || in _swrast_clear_depth_buffer()
551 rb->Format == MESA_FORMAT_Z24_S8 || in _swrast_clear_depth_buffer()
552 rb->Format == MESA_FORMAT_Z24_X8) { in _swrast_clear_depth_buffer()
556 ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, in _swrast_clear_depth_buffer()
563 switch (rb->Format) { in _swrast_clear_depth_buffer()
568 _mesa_pack_float_z_row(rb->Format, 1, &clear, &clearVal); in _swrast_clear_depth_buffer()
589 _mesa_pack_float_z_row(rb->Format, 1, &clear, &clearVal); in _swrast_clear_depth_buffer()
608 if (rb->Format == MESA_FORMAT_S8_Z24 || in _swrast_clear_depth_buffer()
609 rb->Format == MESA_FORMAT_X8_Z24) in _swrast_clear_depth_buffer()
614 _mesa_pack_float_z_row(rb->Format, 1, &clear, &clearVal); in _swrast_clear_depth_buffer()
641 _mesa_get_format_name(rb->Format)); in _swrast_clear_depth_buffer()
644 ctx->Driver.UnmapRenderbuffer(ctx, rb); in _swrast_clear_depth_buffer()
659 struct gl_renderbuffer *rb = in _swrast_clear_depth_stencil_buffer() local
667 assert(rb == ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Renderbuffer); in _swrast_clear_depth_stencil_buffer()
681 ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, in _swrast_clear_depth_stencil_buffer()
688 switch (rb->Format) { in _swrast_clear_depth_stencil_buffer()
695 _mesa_pack_float_z_row(rb->Format, 1, &zClear, &clear); in _swrast_clear_depth_stencil_buffer()
697 if (rb->Format == MESA_FORMAT_S8_Z24) { in _swrast_clear_depth_stencil_buffer()
751 _mesa_get_format_name(rb->Format)); in _swrast_clear_depth_stencil_buffer()
754 ctx->Driver.UnmapRenderbuffer(ctx, rb); in _swrast_clear_depth_stencil_buffer()