mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-14 22:18:20 +02:00
intel: Use tiling for dri2AllocateBuffer implementation
This commit is contained in:
parent
7363088f9f
commit
5dfba09d49
1 changed files with 10 additions and 1 deletions
|
|
@ -672,12 +672,21 @@ intelAllocateBuffer(__DRIscreen *screen,
|
|||
{
|
||||
struct intel_buffer *intelBuffer;
|
||||
struct intel_screen *intelScreen = screen->private;
|
||||
uint32_t tiling;
|
||||
|
||||
intelBuffer = CALLOC(sizeof *intelBuffer);
|
||||
if (intelBuffer == NULL)
|
||||
return NULL;
|
||||
|
||||
intelBuffer->region = intel_region_alloc(intelScreen, I915_TILING_NONE,
|
||||
if ((attachment == __DRI_BUFFER_DEPTH ||
|
||||
attachment == __DRI_BUFFER_STENCIL ||
|
||||
attachment == __DRI_BUFFER_DEPTH_STENCIL) &&
|
||||
intelScreen->gen >= 4)
|
||||
tiling = I915_TILING_Y;
|
||||
else
|
||||
tiling = I915_TILING_X;
|
||||
|
||||
intelBuffer->region = intel_region_alloc(intelScreen, tiling,
|
||||
format / 8, width, height, GL_TRUE);
|
||||
|
||||
if (intelBuffer->region == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue