Skip to content
Snippets Groups Projects
Commit 70fcf4a8 authored by Ian Romanick's avatar Ian Romanick Committed by Matt Turner
Browse files

shaders: Add missing extension requirements in Dolphin shaders

Discovered when an experiment resulted in a driver that only gave OpenGL
3.0 without GL_ARB_uniform_buffer_object.

All changes made with this script:

for ext in GL_ARB_shader_image_load_store \
           GL_ARB_shader_storage_buffer_object \
	   GL_ARB_shading_language_420pack \
	   GL_ARB_uniform_buffer_object \
	   GL_ARB_explicit_attrib_location
do
    egrep -lr "extension[[:space:]]+${ext}.*enable" . |\
        while read s; do
            # If the shader already has the requirement, skip
            if grep -A10 '[[]require]' $s | grep -q ^$ext ; then
                continue
            fi

            # If the shader has ifdefs for the extension, skip
            if egrep -q "#[[:space:]]*if.*${ext}" $s; then
                continue
            fi

            sed --in-place -e "s/\(^GLSL >.*$\)/\1\n${ext}/" $s
        done
done
parent 391d419b
No related branches found
No related tags found
Loading
Showing
with 50 additions and 0 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment