Lines Matching refs:desc
752 svga3dsurface_get_size_in_blocks(const struct svga3d_surface_desc *desc, in svga3dsurface_get_size_in_blocks() argument
757 desc->block_size.width); in svga3dsurface_get_size_in_blocks()
759 desc->block_size.height); in svga3dsurface_get_size_in_blocks()
761 desc->block_size.depth); in svga3dsurface_get_size_in_blocks()
765 svga3dsurface_is_planar_surface(const struct svga3d_surface_desc *desc) in svga3dsurface_is_planar_surface() argument
767 return (desc->block_desc & SVGA3DBLOCKDESC_PLANAR_YUV) != 0; in svga3dsurface_is_planar_surface()
771 svga3dsurface_calculate_pitch(const struct svga3d_surface_desc *desc, in svga3dsurface_calculate_pitch() argument
777 svga3dsurface_get_size_in_blocks(desc, size, &blocks); in svga3dsurface_calculate_pitch()
779 pitch = blocks.width * desc->pitch_bytes_per_block; in svga3dsurface_calculate_pitch()
807 svga3dsurface_get_image_buffer_size(const struct svga3d_surface_desc *desc, in svga3dsurface_get_image_buffer_size() argument
814 svga3dsurface_get_size_in_blocks(desc, size, &image_blocks); in svga3dsurface_get_image_buffer_size()
816 if (svga3dsurface_is_planar_surface(desc)) { in svga3dsurface_get_image_buffer_size()
820 total_size = clamped_umul32(total_size, desc->bytes_per_block); in svga3dsurface_get_image_buffer_size()
825 pitch = svga3dsurface_calculate_pitch(desc, size); in svga3dsurface_get_image_buffer_size()
839 const struct svga3d_surface_desc *desc = svga3dsurface_get_desc(format); in svga3dsurface_get_serialized_size() local
846 total_size += svga3dsurface_get_image_buffer_size(desc, in svga3dsurface_get_serialized_size()
869 const struct svga3d_surface_desc *desc = svga3dsurface_get_desc(format); in svga3dsurface_get_pixel_offset() local
870 const u32 bw = desc->block_size.width, bh = desc->block_size.height; in svga3dsurface_get_pixel_offset()
871 const u32 bd = desc->block_size.depth; in svga3dsurface_get_pixel_offset()
872 const u32 rowstride = DIV_ROUND_UP(width, bw) * desc->bytes_per_block; in svga3dsurface_get_pixel_offset()
876 x / bw * desc->bytes_per_block); in svga3dsurface_get_pixel_offset()
893 const struct svga3d_surface_desc *desc; in svga3dsurface_get_image_offset() local
897 desc = svga3dsurface_get_desc(format); in svga3dsurface_get_image_offset()
903 bytes = svga3dsurface_get_image_buffer_size(desc, &mipSize, 0); in svga3dsurface_get_image_offset()