diff options
author | Brian Paul <[email protected]> | 2009-12-27 10:24:21 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-27 10:24:21 -0700 |
commit | b46bcd8e7b37aa2e9159e126c1cc88234a3c2790 (patch) | |
tree | 440d291cc787c2b951a6581d0bb3cc60c13bc87f /src/mesa/state_tracker | |
parent | cb504a026cbad317c6af1888bfcc616182e0c826 (diff) | |
parent | 7831515e69ac875b1ac0b1b248ab10c6cf37bf52 (diff) |
Merge branch 'mesa_7_7_branch'
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bufferobjects.c | 16 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c index 63196afba9c..494a3a99c87 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -170,15 +170,19 @@ st_bufferobj_data(GLcontext *ctx, pipe_buffer_reference( &st_obj->buffer, NULL ); - st_obj->buffer = pipe_buffer_create( pipe->screen, 32, buffer_usage, size ); + if (size != 0) { + st_obj->buffer = pipe_buffer_create(pipe->screen, 32, buffer_usage, size); - if (!st_obj->buffer) { - return GL_FALSE; + if (!st_obj->buffer) { + return GL_FALSE; + } + + if (data) + st_no_flush_pipe_buffer_write(st_context(ctx), st_obj->buffer, 0, + size, data); + return GL_TRUE; } - if (data) - st_no_flush_pipe_buffer_write(st_context(ctx), st_obj->buffer, 0, - size, data); return GL_TRUE; } diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index a06621d2b73..3e165c9febd 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -285,6 +285,8 @@ st_pipe_format_to_mesa_format(enum pipe_format pipeFormat) return MESA_FORMAT_ARGB8888; case PIPE_FORMAT_X8R8G8B8_UNORM: return MESA_FORMAT_XRGB8888; + case PIPE_FORMAT_B8G8R8A8_UNORM: + return MESA_FORMAT_ARGB8888_REV; case PIPE_FORMAT_A1R5G5B5_UNORM: return MESA_FORMAT_ARGB1555; case PIPE_FORMAT_A4R4G4B4_UNORM: |