gbm_dri_bo_create fails to initialize bo->base.base.format
Bug #1112147 reported by
Daniel van Vugt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mesa |
Fix Released
|
Medium
|
|||
mesa (Ubuntu) |
Fix Released
|
Medium
|
Timo Aaltonen | ||
Quantal |
Won't Fix
|
Undecided
|
Unassigned | ||
Raring |
Fix Released
|
Medium
|
Timo Aaltonen |
Bug Description
Calling gbm_bo_create() with format == GBM_BO_
The problem seems to be that the bo internal structure is initialized to zero by calloc, but the format field is never set by gbm_dri_bo_create, so it stays zero (GBM_BO_
Related branches
Changed in mesa: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in mesa: | |
status: | Confirmed → Fix Released |
Changed in mesa (Ubuntu): | |
assignee: | Daniel van Vugt (vanvugt) → nobody |
status: | In Progress → Triaged |
To post a comment you must log in.
Calling gbm_bo_create() with format == GBM_BO_ FORMAT_ ARGB8888 completes successfully. However reading back the format via gbm_bo_get_format() returns GBM_BO_ FORMAT_ XRGB8888.
The problem seems to be that the bo internal structure is initialized to zero by calloc, but the format field is never set by gbm_dri_bo_create, so it stays zero (GBM_BO_ FORMAT_ XRGB8888) even when the real image format is something different.
Should be a simple fix in gbm_dri_ bo_create( ). Just add: base.format = gbm_dri_ to_gbm_ format( dri_format) ;
bo->base.