v3d: add lowering for OpenGL logic operations
This implements support for OpenGL logic operations by emitting code to read from the TLB if needed and blending the fragment output accordingly. It is similar to VC4's blend lowering pass, but exclusive to logic operations, since blending is otherwise supported in hardware. The pass doesn't handle MSAA targets yet. Fixes the following piglit tests: spec/!opengl 1.0/gl-1.0-logicop/* spec/!opengl 1.1/gl-1.1-xor spec/!opengl 1.1/gl-1.1-xor-copypixels It also fixes text cursor rendering in Libreoffice with the GTK+2 theme, which is rendered via glamor using the XOR logic operation. v2: fix checks for allowed variable location and maximum render target (Eric) Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -812,6 +812,7 @@ bool vir_opt_small_immediates(struct v3d_compile *c);
|
||||
bool vir_opt_vpm(struct v3d_compile *c);
|
||||
void v3d_nir_lower_blend(nir_shader *s, struct v3d_compile *c);
|
||||
void v3d_nir_lower_io(nir_shader *s, struct v3d_compile *c);
|
||||
void v3d_nir_lower_logic_ops(nir_shader *s, struct v3d_compile *c);
|
||||
void v3d_nir_lower_scratch(nir_shader *s);
|
||||
void v3d_nir_lower_txf_ms(nir_shader *s, struct v3d_compile *c);
|
||||
void v3d_nir_lower_image_load_store(nir_shader *s);
|
||||
|
Reference in New Issue
Block a user