Some of the following changes in this series are specific to the
non-coherent path, so I need some way to tell whether the coherent or
non-coherent path is in use. The flag defaults to the value of the
gl_extensions::MESA_shader_framebuffer_fetch enable so that it can be
overridden easily on hardware that supports both framebuffer fetch
extensions in order to test the non-coherent path, like:
MESA_EXTENSION_OVERRIDE=-GL_EXT_shader_framebuffer_fetch
(Of course trying to force-enable the coherent framebuffer fetch
extension on hardware without native support won't work and lead to
assertion failures).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
unsigned line_aa:2;
bool high_quality_derivatives:1;
bool force_dual_color_blend:1;
+ bool coherent_fb_fetch:1;
uint16_t drawable_height;
uint64_t input_slots_valid;
/* The unique fragment program ID */
key->program_string_id = fp->id;
+
+ /* Whether reads from the framebuffer should behave coherently. */
+ key->coherent_fb_fetch = ctx->Extensions.MESA_shader_framebuffer_fetch;
}
void
key.program_string_id = bfp->id;
+ /* Whether reads from the framebuffer should behave coherently. */
+ key.coherent_fb_fetch = ctx->Extensions.MESA_shader_framebuffer_fetch;
+
uint32_t old_prog_offset = brw->wm.base.prog_offset;
struct brw_wm_prog_data *old_prog_data = brw->wm.prog_data;