Lines Matching refs:spr
102 struct swr_resource *spr = swr_resource(resource); in swr_transfer_map() local
121 if (spr->status) { in swr_transfer_map()
140 pt->stride = spr->swr.pitch; in swr_transfer_map()
141 pt->layer_stride = spr->swr.qpitch * spr->swr.pitch; in swr_transfer_map()
146 if (usage & PIPE_MAP_READ && spr->has_depth && spr->has_stencil) { in swr_transfer_map()
149 zbase = (z * spr->swr.qpitch + box->y) * spr->swr.pitch + in swr_transfer_map()
150 spr->mip_offsets[level]; in swr_transfer_map()
151 sbase = (z * spr->secondary.qpitch + box->y) * spr->secondary.pitch + in swr_transfer_map()
152 spr->secondary_mip_offsets[level]; in swr_transfer_map()
154 if (spr->base.format == PIPE_FORMAT_Z24_UNORM_S8_UINT) { in swr_transfer_map()
156 ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 4 * x + 3] = in swr_transfer_map()
157 ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x]; in swr_transfer_map()
158 } else if (spr->base.format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) { in swr_transfer_map()
160 ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 8 * x + 4] = in swr_transfer_map()
161 ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x]; in swr_transfer_map()
163 zbase += spr->swr.pitch; in swr_transfer_map()
164 sbase += spr->secondary.pitch; in swr_transfer_map()
175 return (void*)(spr->swr.xpBaseAddress + offset + spr->mip_offsets[level]); in swr_transfer_map()
186 struct swr_resource *spr = swr_resource(transfer->resource); in swr_transfer_flush_region() local
187 if (!spr->has_depth || !spr->has_stencil) in swr_transfer_flush_region()
196 zbase = (z * spr->swr.qpitch + box.y) * spr->swr.pitch + in swr_transfer_flush_region()
197 spr->mip_offsets[transfer->level]; in swr_transfer_flush_region()
198 sbase = (z * spr->secondary.qpitch + box.y) * spr->secondary.pitch + in swr_transfer_flush_region()
199 spr->secondary_mip_offsets[transfer->level]; in swr_transfer_flush_region()
201 if (spr->base.format == PIPE_FORMAT_Z24_UNORM_S8_UINT) { in swr_transfer_flush_region()
203 ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x] = in swr_transfer_flush_region()
204 ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 4 * x + 3]; in swr_transfer_flush_region()
205 } else if (spr->base.format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) { in swr_transfer_flush_region()
207 ((uint8_t*)(spr->secondary.xpBaseAddress))[sbase + x] = in swr_transfer_flush_region()
208 ((uint8_t*)(spr->swr.xpBaseAddress))[zbase + 8 * x + 4]; in swr_transfer_flush_region()
210 zbase += spr->swr.pitch; in swr_transfer_flush_region()
211 sbase += spr->secondary.pitch; in swr_transfer_flush_region()
221 struct swr_resource *spr = swr_resource(transfer->resource); in swr_transfer_unmap() local
227 spr->has_depth && spr->has_stencil) { in swr_transfer_unmap()