--disable_framebuffer_readback

This commit is contained in:
Ben Vanik 2015-02-16 21:58:24 -08:00
parent 50b0746a26
commit 1204f35f1e
3 changed files with 27 additions and 22 deletions

View File

@ -2396,6 +2396,7 @@ bool CommandProcessor::IssueCopy() {
uint32_t w = copy_dest_pitch;
uint32_t h = copy_dest_height;
if (!FLAGS_disable_framebuffer_readback) {
// Make active so glReadPixels reads from us.
glBindFramebuffer(GL_READ_FRAMEBUFFER, source_framebuffer->framebuffer);
switch (copy_command) {
@ -2419,6 +2420,7 @@ bool CommandProcessor::IssueCopy() {
return false;
}
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
}
// Perform any requested clears.
uint32_t copy_depth_clear = regs[XE_GPU_REG_RB_DEPTH_CLEAR].u32;

View File

@ -22,6 +22,7 @@ DECLARE_bool(gl_debug_output_synchronous);
DECLARE_bool(vendor_gl_extensions);
DECLARE_bool(disable_framebuffer_readback);
DECLARE_bool(disable_textures);
namespace xe {

View File

@ -22,6 +22,8 @@ DEFINE_bool(gl_debug_output_synchronous, true,
DEFINE_bool(vendor_gl_extensions, true,
"Enable vendor-specific (NV, AMD, etc) GL extensions.");
DEFINE_bool(disable_framebuffer_readback, false,
"Disable framebuffer readback.");
DEFINE_bool(disable_textures, false, "Disable textures and use colors only.");
namespace xe {