diff options
author | Carl Worth <cworth@cworth.org> | 2008-10-06 13:17:59 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-10-06 13:22:08 -0700 |
commit | 260cbcfe61868175ba3e649ce07d43f57601f9be (patch) | |
tree | 9e3175f2b306ce9c6da09743065ef1ca61b6ae78 /src/brw_structs.h | |
parent | 98ca9e2af1b0a67ed91e10cf661af70dfba44d43 (diff) |
Document and use 'legacy' border color mode
It's very convenient that the hardware supports this non-default
mode since it's exactly what is specified by the Render extension.
This provides a more efficient means of fixing bug #16820:
[EXA] Composition result in black for areas outside of source-surface bo
https://bugs.freedesktop.org/show_bug.cgi?id=16820
without the software fallback we had in the earlier fix,
(commit 76c9ece36e6400fd10f364ee330faea470e2da64 ).
Diffstat (limited to 'src/brw_structs.h')
-rw-r--r-- | src/brw_structs.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/brw_structs.h b/src/brw_structs.h index 553aeebb..022915d1 100644 --- a/src/brw_structs.h +++ b/src/brw_structs.h @@ -840,10 +840,26 @@ struct brw_wm_unit_state float global_depth_offset_scale; }; -struct brw_sampler_border_color { +/* The hardware supports two different modes for border color. The + * default (OpenGL) mode uses floating-point color channels, while the + * legacy mode uses 4 bytes. + * + * More significantly, the legacy mode respects the components of the + * border color for channels not present in the source, (whereas the + * default mode will ignore the border color's alpha channel and use + * alpha==1 for an RGB source, for example). + * + * The legacy mode matches the semantics specified by the Render + * extension. + */ +struct brw_sampler_default_border_color { float color[4]; }; +struct brw_sampler_legacy_border_color { + uint8_t color[4]; +}; + struct brw_sampler_state { |