Skip to content

Commit

Permalink
Merge pull request #1121 from kcbanner/gl_rg11b10f
Browse files Browse the repository at this point in the history
Allow SG_PIXELFORMAT_RG11B10F to be a render target on SOKOL_GLCORE
  • Loading branch information
floooh authored Oct 14, 2024
2 parents 38e4c9a + db2a5fc commit 2b62043
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 2b62043

Please sign in to comment.