Page MenuHomeWildfire Games

Enable hardware S3TC on GLES too
ClosedPublic

Authored by linkmauve on Dec 19 2019, 10:01 PM.

Details

Summary

When the GL_EXT_texture_compression_s3tc extension is present, we can use it on OpenGL ES just like on OpenGL.

Test Plan
  • Profile the GLES build.
  • See that S3tcBlock::WritePixel() isn’t called anymore with this patch, making it much faster to load and using leww VRAM.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

linkmauve created this revision.Dec 19 2019, 10:01 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/804/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/lib/res/graphics/ogl_tex.cpp
|   1| /*·Copyright·(C)·2010·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2010"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1320/display/redirect

vladislavbelov added inline comments.
source/lib/res/graphics/ogl_tex.cpp
109 ↗(On Diff #10659)

Do they present in all versions of GLES?

linkmauve added inline comments.Dec 20 2019, 12:57 AM
source/lib/res/graphics/ogl_tex.cpp
109 ↗(On Diff #10659)

As long as GL_EXT_texture_compression_s3tc is present, yes, from GLES 2.0 up.

source/lib/res/graphics/ogl_tex.cpp
109 ↗(On Diff #10659)

So it doesn't present in GLES1 and it won't compile there, right?

linkmauve added inline comments.Dec 20 2019, 1:00 AM
source/lib/res/graphics/ogl_tex.cpp
109 ↗(On Diff #10659)

There is no GLES1 support in 0ad at all at the moment.

vladislavbelov added inline comments.Dec 20 2019, 1:03 AM
source/lib/res/graphics/ogl_tex.cpp
109 ↗(On Diff #10659)

Just to be sure.

linkmauve added inline comments.Dec 20 2019, 1:06 AM
source/lib/res/graphics/ogl_tex.cpp
109 ↗(On Diff #10659)

I don’t even have GLESv1_CM on my computer anymore, it’d be a pain to check it out.

linkmauve updated this revision to Diff 10665.Dec 20 2019, 11:48 AM

Change the year in the copyright.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/808/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1324/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Dec 21 2019, 1:12 PM
This revision was automatically updated to reflect the committed changes.