summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2017-09-12 15:40:19 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2017-09-18 12:17:59 -0700
commit0699319bb0c3fb247e748e26a8158a0397c80632 (patch)
tree1c8262d3878be43236015d43ce00011afcbcc63d /include
parentd80cbbeaff9329fdc78ae3d97097c1e65dfcdd61 (diff)
i965: Use prepare_external instead of make_shareable in setTexBuffer2
The setTexBuffer2 hook from GLX is used to implement glxBindTexImageEXT which has tighter restrictions than just "it's shared". In particular, it says that any rendering to the image while it is bound causes the contents to become undefined. This means that we can do whatever aux tracking we want between glxBindTexImageEXT and glxReleaseTexImageEXT so long as we always transition from external in Bind and to external in Release. The fact that we were using make_shareable before was a problem because it would resolve away 100% of the aux data and then throw away our reference to the aux buffer. If the aux data was shared with some other application (i.e. if we're using I915_FORMAT_MOD_Y_TILED_CCS) then we would forget that the aux data even existed for the rest of eternity. This is fine for the first frame but any subsequent calls to glxBindTexImageEXT would bind the texture as if it has no aux whatsoever and no resolves would happen and texturing would happen as if there is no aux. This was causing rendering corruption in mutter when running on top of X11 with modifiers. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Chad Versace <chadversary@chromium.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions