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

Allow SG_PIXELFORMAT_RG11B10F to be a render target on SOKOL_GLCORE #1121

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -7494,7 +7494,6 @@ _SOKOL_PRIVATE void _sg_gl_init_pixelformats(bool has_bgra) {
_sg_pixelformat_all(&_sg.formats[SG_PIXELFORMAT_BGRA8]);
}
_sg_pixelformat_all(&_sg.formats[SG_PIXELFORMAT_RGB10A2]);
_sg_pixelformat_sf(&_sg.formats[SG_PIXELFORMAT_RG11B10F]);
_sg_pixelformat_sf(&_sg.formats[SG_PIXELFORMAT_RGB9E5]);
_sg_pixelformat_srm(&_sg.formats[SG_PIXELFORMAT_RG32UI]);
_sg_pixelformat_srm(&_sg.formats[SG_PIXELFORMAT_RG32SI]);
Expand Down Expand Up @@ -7535,20 +7534,24 @@ _SOKOL_PRIVATE void _sg_gl_init_pixelformats_float(bool has_colorbuffer_float, b
_sg_pixelformat_sfrm(&_sg.formats[SG_PIXELFORMAT_RG32F]);
_sg_pixelformat_sfrm(&_sg.formats[SG_PIXELFORMAT_RGBA32F]);
}
_sg_pixelformat_sfrm(&_sg.formats[SG_PIXELFORMAT_RG11B10F]);
} else {
_sg_pixelformat_sf(&_sg.formats[SG_PIXELFORMAT_R32F]);
_sg_pixelformat_sf(&_sg.formats[SG_PIXELFORMAT_RG32F]);
_sg_pixelformat_sf(&_sg.formats[SG_PIXELFORMAT_RGBA32F]);
_sg_pixelformat_sf(&_sg.formats[SG_PIXELFORMAT_RG11B10F]);
}
} else {
if (has_colorbuffer_float) {
_sg_pixelformat_sbrm(&_sg.formats[SG_PIXELFORMAT_R32F]);
_sg_pixelformat_sbrm(&_sg.formats[SG_PIXELFORMAT_RG32F]);
_sg_pixelformat_sbrm(&_sg.formats[SG_PIXELFORMAT_RGBA32F]);
_sg_pixelformat_srm(&_sg.formats[SG_PIXELFORMAT_RG11B10F]);
} else {
_sg_pixelformat_s(&_sg.formats[SG_PIXELFORMAT_R32F]);
_sg_pixelformat_s(&_sg.formats[SG_PIXELFORMAT_RG32F]);
_sg_pixelformat_s(&_sg.formats[SG_PIXELFORMAT_RGBA32F]);
_sg_pixelformat_s(&_sg.formats[SG_PIXELFORMAT_RG11B10F]);
}
}
}
Expand Down
Loading