Revert "gbm: mark surface buffers as explicit flushed"
This reverts commitc49a71c03c
. It broke radeonsi. GBM can't set __DRI_IMAGE_USE_BACKBUFFER if gbm itself doesn't use it as a back buffer by rendering to it and calling SwapBuffers. If another library uses it as a back buffer, that library should set __DRI_IMAGE_USE_BACKBUFFER, not GBM. A different flag could be added to indicate the behavior that the original commit expected. Fixes:c49a71c03c
- gbm: mark surface buffers as explicit flushed Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11996 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32345> (cherry picked from commit1a7c54b840
)
This commit is contained in:
@@ -2174,7 +2174,7 @@
|
|||||||
"description": "Revert \"gbm: mark surface buffers as explicit flushed\"",
|
"description": "Revert \"gbm: mark surface buffers as explicit flushed\"",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 2,
|
"nomination_type": 2,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "c49a71c03c9166b0814db92420eadac74cbc4b11",
|
"because_sha": "c49a71c03c9166b0814db92420eadac74cbc4b11",
|
||||||
"notes": null
|
"notes": null
|
||||||
|
@@ -899,14 +899,8 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
|||||||
dri_use |= __DRI_IMAGE_USE_LINEAR;
|
dri_use |= __DRI_IMAGE_USE_LINEAR;
|
||||||
if (usage & GBM_BO_USE_PROTECTED)
|
if (usage & GBM_BO_USE_PROTECTED)
|
||||||
dri_use |= __DRI_IMAGE_USE_PROTECTED;
|
dri_use |= __DRI_IMAGE_USE_PROTECTED;
|
||||||
if (usage & GBM_BO_USE_FRONT_RENDERING) {
|
if (usage & GBM_BO_USE_FRONT_RENDERING)
|
||||||
assert (!(usage & GBM_BO_EXPLICIT_FLUSH));
|
|
||||||
dri_use |= __DRI_IMAGE_USE_FRONT_RENDERING;
|
dri_use |= __DRI_IMAGE_USE_FRONT_RENDERING;
|
||||||
}
|
|
||||||
if (usage & GBM_BO_EXPLICIT_FLUSH) {
|
|
||||||
assert (!(usage & GBM_BO_USE_FRONT_RENDERING));
|
|
||||||
dri_use |= __DRI_IMAGE_USE_BACKBUFFER;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Gallium drivers requires shared in order to get the handle/stride */
|
/* Gallium drivers requires shared in order to get the handle/stride */
|
||||||
dri_use |= __DRI_IMAGE_USE_SHARE;
|
dri_use |= __DRI_IMAGE_USE_SHARE;
|
||||||
@@ -1110,7 +1104,7 @@ gbm_dri_surface_create(struct gbm_device *gbm,
|
|||||||
surf->base.v0.width = width;
|
surf->base.v0.width = width;
|
||||||
surf->base.v0.height = height;
|
surf->base.v0.height = height;
|
||||||
surf->base.v0.format = core->v0.format_canonicalize(format);
|
surf->base.v0.format = core->v0.format_canonicalize(format);
|
||||||
surf->base.v0.flags = flags | GBM_BO_EXPLICIT_FLUSH;
|
surf->base.v0.flags = flags;
|
||||||
if (!modifiers) {
|
if (!modifiers) {
|
||||||
assert(!count);
|
assert(!count);
|
||||||
return &surf->base;
|
return &surf->base;
|
||||||
|
@@ -330,11 +330,7 @@ enum gbm_bo_flags {
|
|||||||
*/
|
*/
|
||||||
GBM_BO_FIXED_COMPRESSION_12BPC = (13 << 7),
|
GBM_BO_FIXED_COMPRESSION_12BPC = (13 << 7),
|
||||||
|
|
||||||
/**
|
/* next available value is (1 << 11) */
|
||||||
* This buffer will be used with an API with well defined transition points
|
|
||||||
* between context internal usage and external visibility.
|
|
||||||
*/
|
|
||||||
GBM_BO_EXPLICIT_FLUSH = (1 << 11),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GBM_BO_FIXED_COMPRESSION_MASK (((1 << 11) - 1) & ~((1 << 7) - 1))
|
#define GBM_BO_FIXED_COMPRESSION_MASK (((1 << 11) - 1) & ~((1 << 7) - 1))
|
||||||
|
Reference in New Issue
Block a user