本文整理汇总了C++中pipe_sampler_view_reference函数的典型用法代码示例。如果您正苦于以下问题:C++ pipe_sampler_view_reference函数的具体用法?C++ pipe_sampler_view_reference怎么用?C++ pipe_sampler_view_reference使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pipe_sampler_view_reference函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: save_sampler_views
static void
save_sampler_views(struct cso_context *ctx,
struct sampler_info *info)
{
uint i;
info->nr_views_saved = info->nr_views;
for (i = 0; i < info->nr_views; i++) {
assert(!info->views_saved[i]);
pipe_sampler_view_reference(&info->views_saved[i], info->views[i]);
}
}
开发者ID:nikai3d,项目名称:mesa,代码行数:13,代码来源:cso_context.c
示例2: cso_save_fragment_sampler_views
static void
cso_save_fragment_sampler_views(struct cso_context *ctx)
{
unsigned i;
ctx->nr_fragment_views_saved = ctx->nr_fragment_views;
for (i = 0; i < ctx->nr_fragment_views; i++) {
assert(!ctx->fragment_views_saved[i]);
pipe_sampler_view_reference(&ctx->fragment_views_saved[i],
ctx->fragment_views[i]);
}
}
开发者ID:BNieuwenhuizen,项目名称:mesa,代码行数:13,代码来源:cso_context.c
示例3: nv30_fragtex_set_sampler_views
static void
nv30_fragtex_set_sampler_views(struct pipe_context *pipe, unsigned nr,
struct pipe_sampler_view **views)
{
struct nv30_context *nv30 = nv30_context(pipe);
unsigned i;
for (i = 0; i < nr; i++) {
nouveau_bufctx_reset(nv30->bufctx, BUFCTX_FRAGTEX(i));
pipe_sampler_view_reference(&nv30->fragprog.textures[i], views[i]);
nv30->fragprog.dirty_samplers |= (1 << i);
}
for (; i < nv30->fragprog.num_textures; i++) {
nouveau_bufctx_reset(nv30->bufctx, BUFCTX_FRAGTEX(i));
pipe_sampler_view_reference(&nv30->fragprog.textures[i], NULL);
nv30->fragprog.dirty_samplers |= (1 << i);
}
nv30->fragprog.num_textures = nr;
nv30->dirty |= NV30_NEW_FRAGTEX;
}
开发者ID:FASTCHIP,项目名称:kernel_3.4.67_lenovo_s939_mtk6592,代码行数:22,代码来源:nv30_fragtex.c
示例4: cso_save_sampler_views
void
cso_save_sampler_views(struct cso_context *ctx, unsigned shader_stage)
{
struct sampler_info *info = &ctx->samplers[shader_stage];
unsigned i;
info->nr_views_saved = info->nr_views;
for (i = 0; i < info->nr_views; i++) {
assert(!info->views_saved[i]);
pipe_sampler_view_reference(&info->views_saved[i], info->views[i]);
}
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:13,代码来源:cso_context.c
示例5: r600_copy_first_sample
static void r600_copy_first_sample(struct pipe_context *ctx,
const struct pipe_resolve_info *info)
{
struct r600_context *rctx = (struct r600_context *)ctx;
struct r600_texture *rsrc = (struct r600_texture*)info->src.res;
struct pipe_surface *dst_view, dst_templ;
struct pipe_sampler_view src_templ, *src_view;
struct pipe_box box;
if (rsrc->is_depth && !rsrc->is_flushing_texture) {
if (!r600_init_flushed_depth_texture(ctx, info->src.res, NULL))
return; /* error */
/* Decompress the first sample only. */
r600_blit_decompress_depth(ctx, rsrc, NULL,
0, 0,
info->src.layer, info->src.layer,
0, 0);
}
if (rctx->chip_class != CAYMAN && rsrc->fmask_size && rsrc->cmask_size) {
r600_blit_decompress_color(ctx, rsrc,
0, 0,
info->src.layer, info->src.layer);
}
/* this is correct for upside-down blits too */
u_box_2d(info->src.x0,
info->src.y0,
info->src.x1 - info->src.x0,
info->src.y1 - info->src.y0, &box);
/* Initialize the surface. */
util_blitter_default_dst_texture(&dst_templ, info->dst.res,
info->dst.level, info->dst.layer, &box);
dst_view = ctx->create_surface(ctx, info->dst.res, &dst_templ);
/* Initialize the sampler view. */
util_blitter_default_src_texture(&src_templ, info->src.res, 0);
src_view = ctx->create_sampler_view(ctx, info->src.res, &src_templ);
/* Copy the first sample into dst. */
r600_blitter_begin(ctx, R600_COPY_TEXTURE);
util_blitter_copy_texture_view(rctx->blitter, dst_view, ~0, info->dst.x0,
info->dst.y0, src_view, 0, &box,
info->src.res->width0, info->src.res->height0,
info->mask);
r600_blitter_end(ctx);
pipe_surface_reference(&dst_view, NULL);
pipe_sampler_view_reference(&src_view, NULL);
}
开发者ID:josephharding,项目名称:gluttest,代码行数:51,代码来源:r600_blit.c
示例6: st_flush_bitmap_cache
/**
* If there's anything in the bitmap cache, draw/flush it now.
*/
void
st_flush_bitmap_cache(struct st_context *st)
{
if (!st->bitmap.cache->empty) {
struct bitmap_cache *cache = st->bitmap.cache;
if (st->ctx->DrawBuffer) {
struct pipe_context *pipe = st->pipe;
struct pipe_sampler_view *sv;
assert(cache->xmin <= cache->xmax);
/* printf("flush size %d x %d at %d, %d\n",
cache->xmax - cache->xmin,
cache->ymax - cache->ymin,
cache->xpos, cache->ypos);
*/
/* The texture transfer has been mapped until now.
* So unmap and release the texture transfer before drawing.
*/
if (cache->trans) {
if (0)
print_cache(cache);
pipe_transfer_unmap(pipe, cache->trans);
cache->buffer = NULL;
pipe->transfer_destroy(pipe, cache->trans);
cache->trans = NULL;
}
sv = st_create_texture_sampler_view(st->pipe, cache->texture);
if (sv) {
draw_bitmap_quad(st->ctx,
cache->xpos,
cache->ypos,
cache->zpos,
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
sv,
cache->color);
pipe_sampler_view_reference(&sv, NULL);
}
}
/* release/free the texture */
pipe_resource_reference(&cache->texture, NULL);
reset_cache(st);
}
}
开发者ID:iquiw,项目名称:xsrc,代码行数:54,代码来源:st_cb_bitmap.c
示例7: vl_zscan_init_buffer
bool
vl_zscan_init_buffer(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer,
struct pipe_sampler_view *src, struct pipe_surface *dst)
{
struct pipe_resource res_tmpl, *res;
struct pipe_sampler_view sv_tmpl;
assert(zscan && buffer);
memset(buffer, 0, sizeof(struct vl_zscan_buffer));
pipe_sampler_view_reference(&buffer->src, src);
buffer->viewport.scale[0] = dst->width;
buffer->viewport.scale[1] = dst->height;
buffer->viewport.scale[2] = 1;
buffer->viewport.scale[3] = 1;
buffer->viewport.translate[0] = 0;
buffer->viewport.translate[1] = 0;
buffer->viewport.translate[2] = 0;
buffer->viewport.translate[3] = 0;
buffer->fb_state.width = dst->width;
buffer->fb_state.height = dst->height;
buffer->fb_state.nr_cbufs = 1;
pipe_surface_reference(&buffer->fb_state.cbufs[0], dst);
memset(&res_tmpl, 0, sizeof(res_tmpl));
res_tmpl.target = PIPE_TEXTURE_3D;
res_tmpl.format = PIPE_FORMAT_R8_UNORM;
res_tmpl.width0 = VL_BLOCK_WIDTH * zscan->blocks_per_line;
res_tmpl.height0 = VL_BLOCK_HEIGHT;
res_tmpl.depth0 = 2;
res_tmpl.array_size = 1;
res_tmpl.usage = PIPE_USAGE_IMMUTABLE;
res_tmpl.bind = PIPE_BIND_SAMPLER_VIEW;
res = zscan->pipe->screen->resource_create(zscan->pipe->screen, &res_tmpl);
if (!res)
return false;
memset(&sv_tmpl, 0, sizeof(sv_tmpl));
u_sampler_view_default_template(&sv_tmpl, res, res->format);
sv_tmpl.swizzle_r = sv_tmpl.swizzle_g = sv_tmpl.swizzle_b = sv_tmpl.swizzle_a = TGSI_SWIZZLE_X;
buffer->quant = zscan->pipe->create_sampler_view(zscan->pipe, res, &sv_tmpl);
pipe_resource_reference(&res, NULL);
if (!buffer->quant)
return false;
return true;
}
开发者ID:DirectFB,项目名称:mesa,代码行数:51,代码来源:vl_zscan.c
示例8: restore_sampler_views
static void
restore_sampler_views(struct cso_context *ctx,
struct sampler_info *info,
void (*set_views)(struct pipe_context *,
unsigned num_views,
struct pipe_sampler_view **))
{
uint i;
for (i = 0; i < info->nr_views_saved; i++) {
pipe_sampler_view_reference(&info->views[i], info->views_saved[i]);
pipe_sampler_view_reference(&info->views_saved[i], NULL);
}
for (; i < info->nr_views; i++) {
pipe_sampler_view_reference(&info->views[i], NULL);
}
/* bind the old/saved sampler views */
set_views(ctx->pipe, info->nr_views_saved, info->views);
info->nr_views = info->nr_views_saved;
info->nr_views_saved = 0;
}
开发者ID:nikai3d,项目名称:mesa,代码行数:23,代码来源:cso_context.c
示例9: vl_idct_init_buffer
bool
vl_idct_init_buffer(struct vl_idct *idct, struct vl_idct_buffer *buffer,
struct pipe_sampler_view *source,
struct pipe_sampler_view *intermediate)
{
assert(buffer && idct);
assert(source && intermediate);
memset(buffer, 0, sizeof(struct vl_idct_buffer));
pipe_sampler_view_reference(&buffer->sampler_views.individual.matrix, idct->matrix);
pipe_sampler_view_reference(&buffer->sampler_views.individual.source, source);
pipe_sampler_view_reference(&buffer->sampler_views.individual.transpose, idct->transpose);
pipe_sampler_view_reference(&buffer->sampler_views.individual.intermediate, intermediate);
if (!init_source(idct, buffer))
return false;
if (!init_intermediate(idct, buffer))
return false;
return true;
}
开发者ID:kallisti5,项目名称:mesa,代码行数:23,代码来源:vl_idct.c
示例10: ilo_state_vector_cleanup
void
ilo_state_vector_cleanup(struct ilo_state_vector *vec)
{
unsigned i, sh;
for (i = 0; i < Elements(vec->vb.states); i++) {
if (vec->vb.enabled_mask & (1 << i))
pipe_resource_reference(&vec->vb.states[i].buffer, NULL);
}
pipe_resource_reference(&vec->ib.buffer, NULL);
pipe_resource_reference(&vec->ib.hw_resource, NULL);
for (i = 0; i < vec->so.count; i++)
pipe_so_target_reference(&vec->so.states[i], NULL);
for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) {
for (i = 0; i < vec->view[sh].count; i++) {
struct pipe_sampler_view *view = vec->view[sh].states[i];
pipe_sampler_view_reference(&view, NULL);
}
for (i = 0; i < Elements(vec->cbuf[sh].cso); i++) {
struct ilo_cbuf_cso *cbuf = &vec->cbuf[sh].cso[i];
pipe_resource_reference(&cbuf->resource, NULL);
}
}
for (i = 0; i < vec->resource.count; i++)
pipe_surface_reference(&vec->resource.states[i], NULL);
for (i = 0; i < vec->fb.state.nr_cbufs; i++)
pipe_surface_reference(&vec->fb.state.cbufs[i], NULL);
if (vec->fb.state.zsbuf)
pipe_surface_reference(&vec->fb.state.zsbuf, NULL);
for (i = 0; i < vec->cs_resource.count; i++)
pipe_surface_reference(&vec->cs_resource.states[i], NULL);
for (i = 0; i < vec->global_binding.count; i++) {
struct ilo_global_binding_cso *cso =
util_dynarray_element(&vec->global_binding.bindings,
struct ilo_global_binding_cso, i);
pipe_resource_reference(&cso->resource, NULL);
}
util_dynarray_fini(&vec->global_binding.bindings);
}
开发者ID:John-Gee,项目名称:Mesa-3D,代码行数:49,代码来源:ilo_state.c
示例11: st_vdpau_unmap_surface
static void
st_vdpau_unmap_surface(struct gl_context *ctx, GLenum target, GLenum access,
GLboolean output, struct gl_texture_object *texObj,
struct gl_texture_image *texImage,
const GLvoid *vdpSurface, GLuint index)
{
struct st_texture_object *stObj = st_texture_object(texObj);
struct st_texture_image *stImage = st_texture_image(texImage);
pipe_resource_reference(&stObj->pt, NULL);
pipe_sampler_view_reference(&stObj->sampler_view, NULL);
pipe_resource_reference(&stImage->pt, NULL);
_mesa_dirty_texobj(ctx, texObj);
}
开发者ID:MaikuMori,项目名称:mesa,代码行数:15,代码来源:st_vdpau.c
示例12: st_texture_release_sampler_view
void
st_texture_release_sampler_view(struct st_context *st,
struct st_texture_object *stObj)
{
GLuint i;
for (i = 0; i < stObj->num_sampler_views; ++i) {
struct pipe_sampler_view **sv = &stObj->sampler_views[i];
if (*sv && (*sv)->context == st->pipe) {
pipe_sampler_view_reference(sv, NULL);
break;
}
}
}
开发者ID:chrisforbes,项目名称:mesa,代码行数:15,代码来源:st_texture.c
示例13: cso_set_sampler_views
void
cso_set_sampler_views(struct cso_context *ctx,
unsigned shader_stage,
unsigned count,
struct pipe_sampler_view **views)
{
struct sampler_info *info = &ctx->samplers[shader_stage];
unsigned i;
/* reference new views */
for (i = 0; i < count; i++) {
pipe_sampler_view_reference(&info->views[i], views[i]);
}
/* unref extra old views, if any */
for (; i < info->nr_views; i++) {
pipe_sampler_view_reference(&info->views[i], NULL);
}
info->nr_views = count;
/* bind the new sampler views */
ctx->pipe->set_sampler_views(ctx->pipe, shader_stage, 0, count,
info->views);
}
开发者ID:Haifen,项目名称:Mesa-3D,代码行数:24,代码来源:cso_context.c
示例14: st_Bitmap
/**
* Called via ctx->Driver.Bitmap()
*/
static void
st_Bitmap(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap )
{
struct st_context *st = st_context(ctx);
struct pipe_resource *pt;
if (width == 0 || height == 0)
return;
st_validate_state(st);
if (!st->bitmap.vs) {
/* create pass-through vertex shader now */
const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
TGSI_SEMANTIC_COLOR,
st->needs_texcoord_semantic ? TGSI_SEMANTIC_TEXCOORD :
TGSI_SEMANTIC_GENERIC };
const uint semantic_indexes[] = { 0, 0, 0 };
st->bitmap.vs = util_make_vertex_passthrough_shader(st->pipe, 3,
semantic_names,
semantic_indexes,
FALSE);
}
if (UseBitmapCache && accum_bitmap(ctx, x, y, width, height, unpack, bitmap))
return;
pt = make_bitmap_texture(ctx, width, height, unpack, bitmap);
if (pt) {
struct pipe_sampler_view *sv =
st_create_texture_sampler_view(st->pipe, pt);
assert(pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT);
if (sv) {
draw_bitmap_quad(ctx, x, y, ctx->Current.RasterPos[2],
width, height, sv,
st->ctx->Current.RasterColor);
pipe_sampler_view_reference(&sv, NULL);
}
/* release/free the texture */
pipe_resource_reference(&pt, NULL);
}
}
开发者ID:ashmew2,项目名称:kolibriosSVN,代码行数:51,代码来源:st_cb_bitmap.c
示例15: st_Bitmap
/**
* Called via ctx->Driver.Bitmap()
*/
static void
st_Bitmap(struct gl_context *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap )
{
struct st_context *st = st_context(ctx);
struct pipe_resource *pt;
assert(width > 0);
assert(height > 0);
st_invalidate_readpix_cache(st);
if (!st->bitmap.cache) {
init_bitmap_state(st);
}
/* We only need to validate any non-ST_NEW_CONSTANTS state. The VS we use
* for bitmap drawing uses no constants and the FS constants are
* explicitly uploaded in the draw_bitmap_quad() function.
*/
if ((st->dirty | ctx->NewDriverState) & ~ST_NEW_CONSTANTS &
ST_PIPELINE_RENDER_STATE_MASK ||
st->gfx_shaders_may_be_dirty) {
st_validate_state(st, ST_PIPELINE_RENDER);
}
if (UseBitmapCache && accum_bitmap(ctx, x, y, width, height, unpack, bitmap))
return;
pt = make_bitmap_texture(ctx, width, height, unpack, bitmap);
if (pt) {
struct pipe_sampler_view *sv =
st_create_texture_sampler_view(st->pipe, pt);
assert(pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT);
if (sv) {
draw_bitmap_quad(ctx, x, y, ctx->Current.RasterPos[2],
width, height, sv, ctx->Current.RasterColor);
pipe_sampler_view_reference(&sv, NULL);
}
/* release/free the texture */
pipe_resource_reference(&pt, NULL);
}
}
开发者ID:Kalamatee,项目名称:mesa,代码行数:51,代码来源:st_cb_bitmap.c
示例16: nvc0_context_unreference_resources
static void
nvc0_context_unreference_resources(struct nvc0_context *nvc0)
{
unsigned s, i;
nouveau_bufctx_del(&nvc0->bufctx_3d);
nouveau_bufctx_del(&nvc0->bufctx);
nouveau_bufctx_del(&nvc0->bufctx_cp);
util_unreference_framebuffer_state(&nvc0->framebuffer);
for (i = 0; i < nvc0->num_vtxbufs; ++i)
pipe_resource_reference(&nvc0->vtxbuf[i].buffer, NULL);
pipe_resource_reference(&nvc0->idxbuf.buffer, NULL);
for (s = 0; s < 6; ++s) {
for (i = 0; i < nvc0->num_textures[s]; ++i)
pipe_sampler_view_reference(&nvc0->textures[s][i], NULL);
for (i = 0; i < NVC0_MAX_PIPE_CONSTBUFS; ++i)
if (!nvc0->constbuf[s][i].user)
pipe_resource_reference(&nvc0->constbuf[s][i].u.buf, NULL);
}
for (s = 0; s < 2; ++s) {
for (i = 0; i < NVC0_MAX_SURFACE_SLOTS; ++i)
pipe_surface_reference(&nvc0->surfaces[s][i], NULL);
}
for (s = 0; s < 6; ++s)
for (i = 0; i < NVC0_MAX_BUFFERS; ++i)
pipe_resource_reference(&nvc0->buffers[s][i].buffer, NULL);
for (i = 0; i < nvc0->num_tfbbufs; ++i)
pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);
for (i = 0; i < nvc0->global_residents.size / sizeof(struct pipe_resource *);
++i) {
struct pipe_resource **res = util_dynarray_element(
&nvc0->global_residents, struct pipe_resource *, i);
pipe_resource_reference(res, NULL);
}
util_dynarray_fini(&nvc0->global_residents);
if (nvc0->tcp_empty)
nvc0->base.pipe.delete_tcs_state(&nvc0->base.pipe, nvc0->tcp_empty);
}
开发者ID:notaz,项目名称:mesa,代码行数:48,代码来源:nvc0_context.c
示例17: svga_cleanup_tss_binding
void svga_cleanup_tss_binding(struct svga_context *svga)
{
int i;
unsigned count = MAX2( svga->curr.num_sampler_views,
svga->state.hw_draw.num_views );
for (i = 0; i < count; i++) {
struct svga_hw_view_state *view = &svga->state.hw_draw.views[i];
svga_sampler_view_reference(&view->v, NULL);
pipe_sampler_view_reference( &svga->curr.sampler_views[i], NULL );
pipe_resource_reference( &view->texture, NULL );
view->dirty = 1;
}
}
开发者ID:nikai3d,项目名称:mesa,代码行数:16,代码来源:svga_state_tss.c
示例18: softpipe_set_sampler_views
static void
softpipe_set_sampler_views(struct pipe_context *pipe,
unsigned shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
uint i;
assert(shader < PIPE_SHADER_TYPES);
assert(start + num <= Elements(softpipe->sampler_views[shader]));
/* Check for no-op */
if (start + num <= softpipe->num_sampler_views[shader] &&
!memcmp(softpipe->sampler_views[shader] + start, views,
num * sizeof(struct pipe_sampler_view *))) {
return;
}
draw_flush(softpipe->draw);
/* set the new sampler views */
for (i = 0; i < num; i++) {
pipe_sampler_view_reference(&softpipe->sampler_views[shader][start + i],
views[i]);
sp_tex_tile_cache_set_sampler_view(softpipe->tex_cache[shader][start + i],
views[i]);
}
/* find highest non-null sampler_views[] entry */
{
unsigned j = MAX2(softpipe->num_sampler_views[shader], start + num);
while (j > 0 && softpipe->sampler_views[shader][j - 1] == NULL)
j--;
softpipe->num_sampler_views[shader] = j;
}
if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
draw_set_sampler_views(softpipe->draw,
shader,
softpipe->sampler_views[shader],
softpipe->num_sampler_views[shader]);
}
softpipe->dirty |= SP_NEW_TEXTURE;
}
开发者ID:RAOF,项目名称:mesa,代码行数:47,代码来源:sp_state_sampler.c
示例19: llvmpipe_set_sampler_views
static void
llvmpipe_set_sampler_views(struct pipe_context *pipe,
unsigned shader,
unsigned start,
unsigned num,
struct pipe_sampler_view **views)
{
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
uint i;
assert(num <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
assert(shader < PIPE_SHADER_TYPES);
assert(start + num <= Elements(llvmpipe->sampler_views[shader]));
draw_flush(llvmpipe->draw);
/* set the new sampler views */
for (i = 0; i < num; i++) {
/* Note: we're using pipe_sampler_view_release() here to work around
* a possible crash when the old view belongs to another context that
* was already destroyed.
*/
pipe_sampler_view_release(pipe,
&llvmpipe->sampler_views[shader][start + i]);
pipe_sampler_view_reference(&llvmpipe->sampler_views[shader][start + i],
views[i]);
}
/* find highest non-null sampler_views[] entry */
{
unsigned j = MAX2(llvmpipe->num_sampler_views[shader], start + num);
while (j > 0 && llvmpipe->sampler_views[shader][j - 1] == NULL)
j--;
llvmpipe->num_sampler_views[shader] = j;
}
if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
draw_set_sampler_views(llvmpipe->draw,
shader,
llvmpipe->sampler_views[shader],
llvmpipe->num_sampler_views[shader]);
}
llvmpipe->dirty |= LP_NEW_SAMPLER_VIEW;
}
开发者ID:iquiw,项目名称:xsrc,代码行数:46,代码来源:lp_state_sampler.c
示例20: set_sampler_views
static void set_sampler_views(struct fd_texture_stateobj *tex,
unsigned start, unsigned nr, struct pipe_sampler_view **views)
{
unsigned i;
for (i = 0; i < nr; i++) {
struct pipe_sampler_view *view = views ? views[i] : NULL;
unsigned p = i + start;
pipe_sampler_view_reference(&tex->textures[p], view);
if (tex->textures[p])
tex->valid_textures |= (1 << p);
else
tex->valid_textures &= ~(1 << p);
}
tex->num_textures = util_last_bit(tex->valid_textures);
}
开发者ID:Kalamatee,项目名称:mesa,代码行数:17,代码来源:freedreno_texture.c
注:本文中的pipe_sampler_view_reference函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论