瀏覽代碼

st/mesa: pass GL_MAP_INVALIDATE_RANGE_BIT to gallium drivers

when mapping renderbuffers or texture images.

NOTE: This is a candidate for the 8.0 branch.
tags/i965-primitive-restart-v2
Brian Paul 13 年之前
父節點
當前提交
84c7c14697
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2
    0
      src/mesa/state_tracker/st_cb_fbo.c
  2. 2
    0
      src/mesa/state_tracker/st_cb_texture.c

+ 2
- 0
src/mesa/state_tracker/st_cb_fbo.c 查看文件

@@ -688,6 +688,8 @@ st_MapRenderbuffer(struct gl_context *ctx,
usage |= PIPE_TRANSFER_READ;
if (mode & GL_MAP_WRITE_BIT)
usage |= PIPE_TRANSFER_WRITE;
if (mode & GL_MAP_INVALIDATE_RANGE_BIT)
usage |= PIPE_TRANSFER_DISCARD_RANGE;

/* Note: y=0=bottom of buffer while y2=0=top of buffer.
* 'invert' will be true for window-system buffers and false for

+ 2
- 0
src/mesa/state_tracker/st_cb_texture.c 查看文件

@@ -189,6 +189,8 @@ st_MapTextureImage(struct gl_context *ctx,
pipeMode |= PIPE_TRANSFER_READ;
if (mode & GL_MAP_WRITE_BIT)
pipeMode |= PIPE_TRANSFER_WRITE;
if (mode & GL_MAP_INVALIDATE_RANGE_BIT)
pipeMode |= PIPE_TRANSFER_DISCARD_RANGE;

map = st_texture_image_map(st, stImage, slice, pipeMode, x, y, w, h);
if (map) {

Loading…
取消
儲存