mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 18:58:10 +02:00
iris: fix PIPE_RESOURCE_PARAM_STRIDE for buffers
Iris calls iris_resource_get_param with PIPE_RESOURCE_PARAM_STRIDE internally now when exporting memory objects. OpenCL's gl_sharing allows to export buffers as well, which do not have strides. This fixes the assert being hit there for buffers. Fixes:831703157e("iris: Use resource_get_param in resource_get_handle") Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29501> (cherry picked from commitbc149e0303)
This commit is contained in:
parent
d5d9dade4b
commit
2b70963ef4
2 changed files with 6 additions and 2 deletions
|
|
@ -104,7 +104,7 @@
|
|||
"description": "iris: fix PIPE_RESOURCE_PARAM_STRIDE for buffers",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "831703157e7b272fcd1d36de2b3bcc8d5ec7d500",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1680,8 +1680,12 @@ iris_resource_get_param(struct pipe_screen *pscreen,
|
|||
* Also, although modifiers which use a clear color plane specify that
|
||||
* the plane's pitch should be ignored, some kernels have been found to
|
||||
* require 64-byte alignment.
|
||||
*
|
||||
* Also, for OpenCL gl_sharing we have to support exporting buffers, for
|
||||
* which we report a stride of 0 here.
|
||||
*/
|
||||
assert(*value != 0 && (!wants_cc || *value % 64 == 0));
|
||||
assert((*value != 0 || resource->target == PIPE_BUFFER) &&
|
||||
(!wants_cc || *value % 64 == 0));
|
||||
|
||||
return true;
|
||||
case PIPE_RESOURCE_PARAM_OFFSET:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue