Skip to content

glsl, nir: Make image_format a pipe_format instead of a GL enum

Emma Anholt requested to merge anholt/mesa:image-formats into master

As I finish up nir-to-tgsi, one of the last features is shader images, which was going to make me need to write yet another GL_* -> *_FORMAT switch statement. Now that PIPE_FORMAT utils are in src/util, let's switch the compiler to them to reduce the GLenum dependencies in our stack and also give backends sensible utils to use on shader image formats.

Instead of copying the new PIPE_FORMAT enums into driver switch statements, I went ahead and used the utils right away in v3d and freedreno. Copying the enums is probably as error-prone as my cleanups were.

Pushed to intel CI as http://otc-mesa-ci.jf.intel.com/job/anholt/18/ and touch-tested dEQP-GLES31.functional.image_load_store.* on softpipe, llvmpipe, freedreno, i965.

Merge request reports

Loading