Skip to content

Commit

Permalink
CopyTex*Image* in progress...
Browse files Browse the repository at this point in the history
  • Loading branch information
gzorin committed Apr 13, 2012
1 parent 90c0676 commit 8ebbbc9
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 72 deletions.
12 changes: 12 additions & 0 deletions src/library/framebuffer.cc
Expand Up @@ -1461,3 +1461,15 @@ rsxgl_draw_framebuffer_validate(rsxgl_context_t * ctx,const uint32_t timestamp)
}
}
}

void
rsxgl_read_framebuffer_validate(rsxgl_context_t * ctx,const uint32_t timestamp)
{
framebuffer_t & framebuffer = ctx -> framebuffer_binding[RSXGL_READ_FRAMEBUFFER];

rsxgl_framebuffer_validate(ctx,framebuffer,timestamp);

if(ctx -> invalid.parts.read_framebuffer) {
ctx -> invalid.parts.read_framebuffer = 0;
}
}
1 change: 1 addition & 0 deletions src/library/framebuffer.h
Expand Up @@ -140,5 +140,6 @@ struct rsxgl_context_t;
void rsxgl_renderbuffer_validate(rsxgl_context_t *,renderbuffer_t &,const uint32_t);
void rsxgl_framebuffer_validate(rsxgl_context_t *,framebuffer_t &,const uint32_t);
void rsxgl_draw_framebuffer_validate(rsxgl_context_t *,const uint32_t);
void rsxgl_read_framebuffer_validate(rsxgl_context_t *,const uint32_t);

#endif
2 changes: 0 additions & 2 deletions src/library/state.cc
Expand Up @@ -303,7 +303,6 @@ rsxgl_state_validate(rsxgl_context_t * ctx)
gcm_finish_commands(context,&buffer);
}

// TODO: do this if framebuffer has depth buffer:
if(s -> invalid.parts.draw_framebuffer || s -> invalid.parts.depth) {
buffer = gcm_reserve(context,2);

Expand Down Expand Up @@ -379,7 +378,6 @@ rsxgl_state_validate(rsxgl_context_t * ctx)
}

// stencil:
// TODO: do this if framebuffer has stencil buffer:
if(s -> invalid.parts.draw_framebuffer || s -> invalid.parts.stencil) {
const bool framebuffer_stencil = ctx -> framebuffer_binding[RSXGL_DRAW_FRAMEBUFFER].complete_write_mask.parts.stencil;

Expand Down

0 comments on commit 8ebbbc9

Please sign in to comment.