Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support devices without glCopyImageSubData or rendering to RGBAF32 target #3989

Open
jfizz opened this issue Jun 18, 2020 · 2 comments
Open

Comments

@jfizz
Copy link

jfizz commented Jun 18, 2020

I ran into the edge case referenced in this TODO.

// TODO(gw): We still need a proper solution for the subset of devices
//           that don't support glCopyImageSubData *OR* rendering to a
//           RGBAF32 render target. These devices will currently fail
//           to resize the GPU cache texture.

Has anyone put thought into how this could be accomplished? I am interested in giving it a shot.

@kvark
Copy link
Member

kvark commented Jun 18, 2020

I guess you could copy the data to a PBO and then copy from it into the destination, as a workaround. It would be good to first identify the class of hardware where this would be needed.

@jfizz
Copy link
Author

jfizz commented Jun 18, 2020

I was able to resolve it (in my case anyway) with the following changes to renderer.rs:

let supports_copy_image_sub_data = device.get_capabilities().supports_copy_image_sub_data;
let supports_blit_to_texture_array =
    device.get_capabilities().supports_blit_to_texture_array;
let rt_info = if supports_copy_image_sub_data || supports_blit_to_texture_array {
    None
} else {
    Some(RenderTargetInfo { has_depth: false })
};

Note the new supports_blit_to_texture_array variable. My device supports blit_to_texture_array but not copy_image_sub_data. Since blit_render_target is a fallback for devices which don't support copy_image_sub_data, I think it works out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants