浏览代码

gallium/cso: check for set_vertex_sampler_views != NULL before calling it

Not all drivers implement this method.
Fixes regression reported by Chris Rankin and bug 28889.
tags/mesa-7.9-rc1
Brian Paul 15 年前
父节点
当前提交
e845765f0f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/gallium/auxiliary/cso_cache/cso_context.c

+ 2
- 1
src/gallium/auxiliary/cso_cache/cso_context.c 查看文件

ctx->pipe->bind_vs_state( ctx->pipe, NULL ); ctx->pipe->bind_vs_state( ctx->pipe, NULL );
ctx->pipe->bind_vertex_elements_state( ctx->pipe, NULL ); ctx->pipe->bind_vertex_elements_state( ctx->pipe, NULL );
ctx->pipe->set_fragment_sampler_views(ctx->pipe, 0, NULL); ctx->pipe->set_fragment_sampler_views(ctx->pipe, 0, NULL);
ctx->pipe->set_vertex_sampler_views(ctx->pipe, 0, NULL);
if (ctx->pipe->set_vertex_sampler_views)
ctx->pipe->set_vertex_sampler_views(ctx->pipe, 0, NULL);
} }


for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {

正在加载...
取消
保存