Lines Matching refs:pbo
191 if (!st->pbo.vs) { in st_pbo_draw()
192 st->pbo.vs = st_pbo_create_vs(st); in st_pbo_draw()
193 if (!st->pbo.vs) in st_pbo_draw()
197 if (addr->depth != 1 && st->pbo.use_gs && !st->pbo.gs) { in st_pbo_draw()
198 st->pbo.gs = st_pbo_create_gs(st); in st_pbo_draw()
199 if (!st->pbo.gs) in st_pbo_draw()
203 cso_set_vertex_shader_handle(cso, st->pbo.vs); in st_pbo_draw()
205 cso_set_geometry_shader_handle(cso, addr->depth != 1 ? st->pbo.gs : NULL); in st_pbo_draw()
271 cso_set_rasterizer(cso, &st->pbo.raster); in st_pbo_draw()
307 if (st->pbo.layers) { in st_pbo_create_vs()
314 if (st->pbo.use_gs) { in st_pbo_create_vs()
451 assert(st->pbo.layers); in create_fs()
607 STATIC_ASSERT(ARRAY_SIZE(st->pbo.upload_fs) == ST_NUM_PBO_CONVERSIONS); in st_pbo_get_upload_fs()
611 if (!st->pbo.upload_fs[conversion][need_layer]) in st_pbo_get_upload_fs()
612 …st->pbo.upload_fs[conversion][need_layer] = create_fs(st, false, 0, conversion, PIPE_FORMAT_NONE, … in st_pbo_get_upload_fs()
614 return st->pbo.upload_fs[conversion][need_layer]; in st_pbo_get_upload_fs()
623 STATIC_ASSERT(ARRAY_SIZE(st->pbo.download_fs) == ST_NUM_PBO_CONVERSIONS); in st_pbo_get_download_fs()
633 if (!formatless_store && !st->pbo.download_fs[conversion][target][need_layer]) in st_pbo_get_download_fs()
634 … st->pbo.download_fs[conversion][target][need_layer] = calloc(sizeof(void *), PIPE_FORMAT_COUNT); in st_pbo_get_download_fs()
637 if (!st->pbo.download_fs[conversion][target][need_layer]) in st_pbo_get_download_fs()
638 …st->pbo.download_fs[conversion][target][need_layer] = create_fs(st, true, target, conversion, PIPE… in st_pbo_get_download_fs()
639 return st->pbo.download_fs[conversion][target][need_layer]; in st_pbo_get_download_fs()
641 void **fs_array = (void **)st->pbo.download_fs[conversion][target][need_layer]; in st_pbo_get_download_fs()
653 st->pbo.upload_enabled = in st_init_pbo_helpers()
657 if (!st->pbo.upload_enabled) in st_init_pbo_helpers()
660 st->pbo.download_enabled = in st_init_pbo_helpers()
661 st->pbo.upload_enabled && in st_init_pbo_helpers()
667 st->pbo.rgba_only = in st_init_pbo_helpers()
672 st->pbo.layers = true; in st_init_pbo_helpers()
680 st->pbo.layers = true; in st_init_pbo_helpers()
681 st->pbo.use_gs = true; in st_init_pbo_helpers()
686 memset(&st->pbo.upload_blend, 0, sizeof(struct pipe_blend_state)); in st_init_pbo_helpers()
687 st->pbo.upload_blend.rt[0].colormask = PIPE_MASK_RGBA; in st_init_pbo_helpers()
690 memset(&st->pbo.raster, 0, sizeof(struct pipe_rasterizer_state)); in st_init_pbo_helpers()
691 st->pbo.raster.half_pixel_center = 1; in st_init_pbo_helpers()
694 st->pbo.shaders = _mesa_hash_table_create_u32_keys(NULL); in st_init_pbo_helpers()
704 for (i = 0; i < ARRAY_SIZE(st->pbo.upload_fs); ++i) { in st_destroy_pbo_helpers()
705 for (unsigned j = 0; j < ARRAY_SIZE(st->pbo.upload_fs[0]); j++) { in st_destroy_pbo_helpers()
706 if (st->pbo.upload_fs[i][j]) { in st_destroy_pbo_helpers()
707 st->pipe->delete_fs_state(st->pipe, st->pbo.upload_fs[i][j]); in st_destroy_pbo_helpers()
708 st->pbo.upload_fs[i][j] = NULL; in st_destroy_pbo_helpers()
713 for (i = 0; i < ARRAY_SIZE(st->pbo.download_fs); ++i) { in st_destroy_pbo_helpers()
714 for (unsigned j = 0; j < ARRAY_SIZE(st->pbo.download_fs[0]); ++j) { in st_destroy_pbo_helpers()
715 for (unsigned k = 0; k < ARRAY_SIZE(st->pbo.download_fs[0][0]); k++) { in st_destroy_pbo_helpers()
716 if (st->pbo.download_fs[i][j][k]) { in st_destroy_pbo_helpers()
718 st->pipe->delete_fs_state(st->pipe, st->pbo.download_fs[i][j][k]); in st_destroy_pbo_helpers()
720 void **fs_array = (void **)st->pbo.download_fs[i][j][k]; in st_destroy_pbo_helpers()
724 free(st->pbo.download_fs[i][j][k]); in st_destroy_pbo_helpers()
726 st->pbo.download_fs[i][j][k] = NULL; in st_destroy_pbo_helpers()
732 if (st->pbo.gs) { in st_destroy_pbo_helpers()
733 st->pipe->delete_gs_state(st->pipe, st->pbo.gs); in st_destroy_pbo_helpers()
734 st->pbo.gs = NULL; in st_destroy_pbo_helpers()
737 if (st->pbo.vs) { in st_destroy_pbo_helpers()
738 st->pipe->delete_vs_state(st->pipe, st->pbo.vs); in st_destroy_pbo_helpers()
739 st->pbo.vs = NULL; in st_destroy_pbo_helpers()
742 if (st->pbo.shaders) { in st_destroy_pbo_helpers()
743 hash_table_foreach(st->pbo.shaders, entry) in st_destroy_pbo_helpers()
745 _mesa_hash_table_destroy(st->pbo.shaders, NULL); in st_destroy_pbo_helpers()