panfrost: Move pool routines to common code

We finally have it decoupled from Galliumisms (and OpenGLisms, indeed)
so we can share the file.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5794>
This commit is contained in:
Alyssa Rosenzweig
2020-07-07 16:24:41 -04:00
committed by Marge Bot
parent 1d88f07820
commit c8d848b278
11 changed files with 13 additions and 26 deletions

View File

@@ -2,8 +2,6 @@ C_SOURCES := \
nir/nir_lower_blend.c \
nir/nir_lower_blend.h \
\
pan_allocate.c \
pan_allocate.h \
pan_assemble.c \
pan_blend_cso.c \
pan_blend.h \

View File

@@ -31,7 +31,6 @@ files_panfrost = files(
'pan_context.c',
'pan_blit.c',
'pan_job.c',
'pan_allocate.c',
'pan_assemble.c',
'pan_blending.c',
'pan_blend_shaders.c',

View File

@@ -28,7 +28,7 @@
#include "panfrost-quirks.h"
#include "pan_allocate.h"
#include "pan_pool.h"
#include "pan_bo.h"
#include "pan_cmdstream.h"
#include "pan_context.h"

View File

@@ -28,7 +28,7 @@
#include "util/u_dynarray.h"
#include "pipe/p_state.h"
#include "pan_allocate.h"
#include "pan_pool.h"
#include "pan_resource.h"
/* panfrost_batch_fence is the out fence of a batch that users or other batches

View File

@@ -28,7 +28,7 @@
#include <panfrost-job.h>
#include "pan_screen.h"
#include "pan_allocate.h"
#include "pan_pool.h"
#include "pan_minmax_cache.h"
#include "pan_texture.h"
#include "drm-uapi/drm.h"

View File

@@ -24,7 +24,7 @@
#include "pan_context.h"
#include "pan_job.h"
#include "pan_allocate.h"
#include "pan_pool.h"
#include "panfrost-quirks.h"
#include "util/bitset.h"

View File

@@ -39,7 +39,7 @@
#include <panfrost-misc.h>
#include "pan_device.h"
#include "pan_allocate.h"
#include "pan_pool.h"
struct panfrost_batch;
struct panfrost_context;

View File

@@ -29,6 +29,8 @@ encoder_FILES := \
encoder/pan_encoder.h \
encoder/pan_format.c \
encoder/pan_invocation.c \
encoder/pan_pool.c \
encoder/pan_pool.h \
encoder/pan_props.c \
encoder/pan_sampler.c \
encoder/pan_tiler.c \

View File

@@ -31,6 +31,7 @@ libpanfrost_encoder_files = files(
'pan_tiler.c',
'pan_texture.c',
'pan_scratch.c',
'pan_pool.c',
'pan_props.c',
)

View File

@@ -23,14 +23,9 @@
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <panfrost-misc.h>
#include <panfrost-job.h>
#include "util/hash_table.h"
#include "pan_bo.h"
#include "pan_context.h"
#include "pan_pool.h"
/* TODO: What does this actually have to be? */
#define ALIGNMENT 128

View File

@@ -22,19 +22,11 @@
*
*/
#ifndef __PAN_ALLOCATE_H__
#define __PAN_ALLOCATE_H__
#include <unistd.h>
#include <sys/mman.h>
#include <stdbool.h>
#ifndef __PAN_POOL_H__
#define __PAN_POOL_H__
#include <panfrost-misc.h>
#include "util/list.h"
struct panfrost_batch;
/* Represents a pool of memory that can only grow, used to allocate objects
* with the same lifetime as the pool itself. In OpenGL, a pool is owned by the
* batch for transient structures. In Vulkan, it may be owned by e.g. the
@@ -71,4 +63,4 @@ panfrost_pool_alloc(struct pan_pool *pool, size_t sz);
mali_ptr
panfrost_pool_upload(struct pan_pool *pool, const void *data, size_t sz);
#endif /* __PAN_ALLOCATE_H__ */
#endif