summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_screen.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-06-24 15:34:04 -0700
committerPaul Berry <[email protected]>2011-06-28 14:00:20 -0700
commit3097715d41da4b725b7ce9f9d5bbc0f684cbf0a6 (patch)
tree5068a7cbc3f85164f1f3030bd477dceb5cfe35e8 /src/gallium/drivers/trace/tr_screen.c
parent9c4445de6e69d021491361d884bf172c05189d61 (diff)
glsl: Rewrote _mesa_glsl_process_extension to use table-driven logic.
Instead of using a chain of manually maintained if/else blocks to handle "#extension" directives, we now consult a table that specifies, for each extension, the circumstances under which it is available, and what flags in _mesa_glsl_parse_state need to be set in order to activate it. This makes it easier to add new GLSL extensions in the future, and fixes the following bugs: - Previously, _mesa_glsl_process_extension would sometimes set the "_enable" and "_warn" flags for an extension before checking whether the extension was supported by the driver; as a result, specifying "enable" behavior for an unsupported extension would sometimes cause front-end support for that extension to be switched on in spite of the fact that back-end support was not available, leading to strange failures, such as those in https://bugs.freedesktop.org/show_bug.cgi?id=38015. - "#extension all: warn" and "#extension all: disable" had no effect. Notes: - All extensions are currently marked as unavailable in geometry shaders. This should not have any adverse effects since geometry shaders aren't supported yet. When we return to working on geometry shader support, we'll need to update the table for those extensions that are available in geometry shaders. - Previous to this commit, if a shader mentioned ARB_shader_texture_lod, extension ARB_texture_rectangle would be automatically turned on in order to ensure that the types sampler2DRect and sampler2DRectShadow would be defined. This was unnecessary, because (a) ARB_shader_texture_lod works perfectly well without those types provided that the builtin functions that reference them are not called, and (b) ARB_texture_rectangle is enabled by default in non-ES contexts anyway. I eliminated this unnecessary behavior in order to make the behavior of all extensions consistent. NOTE: This is a candidate for the 7.10 and 7.11 branches. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/trace/tr_screen.c')
0 files changed, 0 insertions, 0 deletions