Lines Matching refs:desc
70 vmw_surface_get_size_in_blocks(const SVGA3dSurfaceDesc *desc, in vmw_surface_get_size_in_blocks() argument
75 desc->blockSize.width); in vmw_surface_get_size_in_blocks()
77 desc->blockSize.height); in vmw_surface_get_size_in_blocks()
79 desc->blockSize.depth); in vmw_surface_get_size_in_blocks()
83 vmw_surface_is_planar_surface(const SVGA3dSurfaceDesc *desc) in vmw_surface_is_planar_surface() argument
85 return (desc->blockDesc & SVGA3DBLOCKDESC_PLANAR_YUV) != 0; in vmw_surface_is_planar_surface()
89 vmw_surface_calculate_pitch(const SVGA3dSurfaceDesc *desc, in vmw_surface_calculate_pitch() argument
95 vmw_surface_get_size_in_blocks(desc, size, &blocks); in vmw_surface_calculate_pitch()
97 pitch = blocks.width * desc->pitchBytesPerBlock; in vmw_surface_calculate_pitch()
114 vmw_surface_get_image_buffer_size(const SVGA3dSurfaceDesc *desc, in vmw_surface_get_image_buffer_size() argument
121 vmw_surface_get_size_in_blocks(desc, size, &image_blocks); in vmw_surface_get_image_buffer_size()
123 if (vmw_surface_is_planar_surface(desc)) { in vmw_surface_get_image_buffer_size()
127 total_size = clamped_umul32(total_size, desc->bytesPerBlock); in vmw_surface_get_image_buffer_size()
132 pitch = vmw_surface_calculate_pitch(desc, size); in vmw_surface_get_image_buffer_size()
149 const SVGA3dSurfaceDesc *desc = vmw_surface_get_desc(format); in vmw_surface_get_serialized_size() local
156 total_size += vmw_surface_get_image_buffer_size(desc, in vmw_surface_get_serialized_size()
196 const SVGA3dSurfaceDesc *desc = vmw_surface_get_desc(format); in vmw_surface_get_pixel_offset() local
197 const u32 bw = desc->blockSize.width, bh = desc->blockSize.height; in vmw_surface_get_pixel_offset()
198 const u32 bd = desc->blockSize.depth; in vmw_surface_get_pixel_offset()
200 desc->bytesPerBlock; in vmw_surface_get_pixel_offset()
204 x / bw * desc->bytesPerBlock); in vmw_surface_get_pixel_offset()
220 const SVGA3dSurfaceDesc *desc; in vmw_surface_get_image_offset() local
224 desc = vmw_surface_get_desc(format); in vmw_surface_get_image_offset()
230 bytes = vmw_surface_get_image_buffer_size(desc, &mipSize, 0); in vmw_surface_get_image_offset()
331 const SVGA3dSurfaceDesc *desc; member
385 const SVGA3dSurfaceDesc *desc; in vmw_surface_setup_cache() local
389 cache->desc = desc = vmw_surface_get_desc(format); in vmw_surface_setup_cache()
397 (desc, &mip->size, 0); in vmw_surface_setup_cache()
400 desc->blockSize.width) * in vmw_surface_setup_cache()
401 desc->bytesPerBlock * num_samples; in vmw_surface_setup_cache()
407 desc->blockSize.height) * in vmw_surface_setup_cache()
438 const SVGA3dSurfaceDesc *desc = cache->desc; in vmw_surface_get_loc() local
456 loc->z *= desc->blockSize.depth; in vmw_surface_get_loc()
459 loc->y *= desc->blockSize.height; in vmw_surface_get_loc()
460 loc->x = offset / desc->bytesPerBlock; in vmw_surface_get_loc()
461 loc->x *= desc->blockSize.width; in vmw_surface_get_loc()
480 const SVGA3dSurfaceDesc *desc = cache->desc; in vmw_surface_inc_loc() local
485 loc->x += desc->blockSize.width; in vmw_surface_inc_loc()
488 loc->y += desc->blockSize.height; in vmw_surface_inc_loc()
491 loc->z += desc->blockSize.depth; in vmw_surface_inc_loc()