예제 #1
0
파일: si_blit.c 프로젝트: ifzz/mesa
static void si_decompress_textures(struct si_context *sctx, int shader_start,
                                   int shader_end)
{
	unsigned compressed_colortex_counter;

	if (sctx->blitter->running)
		return;

	/* Update the compressed_colortex_mask if necessary. */
	compressed_colortex_counter = p_atomic_read(&sctx->screen->b.compressed_colortex_counter);
	if (compressed_colortex_counter != sctx->b.last_compressed_colortex_counter) {
		sctx->b.last_compressed_colortex_counter = compressed_colortex_counter;
		si_update_compressed_colortex_masks(sctx);
	}

	/* Flush depth textures which need to be flushed. */
	for (int i = shader_start; i < shader_end; i++) {
		if (sctx->samplers[i].depth_texture_mask) {
			si_flush_depth_textures(sctx, &sctx->samplers[i]);
		}
		if (sctx->samplers[i].compressed_colortex_mask) {
			si_decompress_sampler_color_textures(sctx, &sctx->samplers[i]);
		}
		if (sctx->images[i].compressed_colortex_mask) {
			si_decompress_image_color_textures(sctx, &sctx->images[i]);
		}
	}
}
예제 #2
0
static void si_decompress_textures(struct si_context *sctx)
{
	if (!sctx->blitter->running) {
		/* Flush depth textures which need to be flushed. */
		for (int i = 0; i < SI_NUM_SHADERS; i++) {
			if (sctx->samplers[i].depth_texture_mask) {
				si_flush_depth_textures(sctx, &sctx->samplers[i]);
			}
			if (sctx->samplers[i].compressed_colortex_mask) {
				si_decompress_color_textures(sctx, &sctx->samplers[i]);
			}
		}
	}
}