Playing with RTT.
This commit is contained in:
parent
f9a3f0c48e
commit
5b08feb010
|
@ -2352,11 +2352,16 @@ bool CommandProcessor::IssueCopy() {
|
|||
glPixelStorei(GL_PACK_SWAP_BYTES, GL_TRUE);
|
||||
break;
|
||||
default:
|
||||
// assert_unhandled_case(copy_dest_endian);
|
||||
assert_unhandled_case(copy_dest_endian);
|
||||
glPixelStorei(GL_PACK_SWAP_BYTES, GL_TRUE);
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO(benvanik): tweak alignments/strides.
|
||||
// glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
// glPixelStorei(GL_PACK_ROW_LENGTH, 0);
|
||||
// glPixelStorei(GL_PACK_IMAGE_HEIGHT, 0);
|
||||
|
||||
// Destination pointer in guest memory.
|
||||
// We have GL throw bytes directly into it.
|
||||
// TODO(benvanik): copy to staging texture then PBO back?
|
||||
|
@ -2381,10 +2386,10 @@ bool CommandProcessor::IssueCopy() {
|
|||
// glBindBuffer(GL_READ_FRAMEBUFFER, framebuffer)
|
||||
glNamedFramebufferReadBuffer(source_framebuffer->framebuffer,
|
||||
GL_COLOR_ATTACHMENT0 + copy_src_select);
|
||||
// glReadPixels(x, y, w, h, read_format, read_type, ptr);
|
||||
glReadPixels(x, y, w, h, read_format, read_type, ptr);
|
||||
} else {
|
||||
// Source from the bound depth/stencil target.
|
||||
// glReadPixels(x, y, w, h, GL_DEPTH_STENCIL, read_type, ptr);
|
||||
glReadPixels(x, y, w, h, GL_DEPTH_STENCIL, read_type, ptr);
|
||||
}
|
||||
break;
|
||||
case CopyCommand::kRaw:
|
||||
|
|
|
@ -623,6 +623,9 @@ bool TextureCache::UploadTexture2D(GLuint texture,
|
|||
}
|
||||
size_t unpack_offset = allocation.offset;
|
||||
scratch_buffer_->Commit(std::move(allocation));
|
||||
// TODO(benvanik): avoid flush on entire buffer by using another texture
|
||||
// buffer.
|
||||
scratch_buffer_->Flush();
|
||||
|
||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, scratch_buffer_->handle());
|
||||
if (texture_info.is_compressed) {
|
||||
|
|
Loading…
Reference in New Issue