mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01: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>
This commit is contained in:
parent
2620a7064c
commit
bc149e0303
1 changed files with 5 additions and 1 deletions
|
|
@ -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