mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
i915g: fix count of buffers at i915_drm_batchbuffer_validate_buffers
This commit contains the fix with num_of_buffers at validation-call at i915_drm_batchbuffer_validate_buffers. Cc: mesa-stable Signed-off-by: GKraats <vd.kraats@hccnet.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
This commit is contained in:
parent
ed2123158d
commit
0311159bed
1 changed files with 4 additions and 2 deletions
|
|
@ -77,14 +77,16 @@ i915_drm_batchbuffer_validate_buffers(struct i915_winsys_batchbuffer *batch,
|
|||
int num_of_buffers)
|
||||
{
|
||||
struct i915_drm_batchbuffer *drm_batch = i915_drm_batchbuffer(batch);
|
||||
drm_intel_bo *bos[num_of_buffers + 1];
|
||||
/* 1 extra for drm_batch->bo */
|
||||
int count = num_of_buffers + 1;
|
||||
drm_intel_bo *bos[count];
|
||||
int i, ret;
|
||||
|
||||
bos[0] = drm_batch->bo;
|
||||
for (i = 0; i < num_of_buffers; i++)
|
||||
bos[i+1] = intel_bo(buffer[i]);
|
||||
|
||||
ret = drm_intel_bufmgr_check_aperture_space(bos, num_of_buffers + 1);
|
||||
ret = drm_intel_bufmgr_check_aperture_space(bos, count);
|
||||
if (ret != 0)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue