mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 04:00:10 +01:00
i915g: Check for geometry shader earlier in i915_set_constant_buffer.
Fix resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
5cf693266f
commit
35f302d97e
1 changed files with 4 additions and 4 deletions
|
|
@ -672,16 +672,16 @@ static void i915_set_constant_buffer(struct pipe_context *pipe,
|
|||
unsigned new_num = 0;
|
||||
boolean diff = TRUE;
|
||||
|
||||
/* XXX don't support geom shaders now */
|
||||
if (shader == PIPE_SHADER_GEOMETRY)
|
||||
return;
|
||||
|
||||
if (cb && cb->user_buffer) {
|
||||
buf = i915_user_buffer_create(pipe->screen, cb->user_buffer,
|
||||
cb->buffer_size,
|
||||
PIPE_BIND_CONSTANT_BUFFER);
|
||||
}
|
||||
|
||||
/* XXX don't support geom shaders now */
|
||||
if (shader == PIPE_SHADER_GEOMETRY)
|
||||
return;
|
||||
|
||||
/* if we have a new buffer compare it with the old one */
|
||||
if (buf) {
|
||||
struct i915_buffer *ibuf = i915_buffer(buf);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue