#include "i965_drm_winsys.h"
#include "util/u_memory.h"
-#include "i965/brw_context.h" /* XXX: shouldn't be doing this */
-#include "i965/brw_screen.h" /* XXX: shouldn't be doing this */
+#include "i965/brw_context.h" /* XXX: shouldn't be doing this */
+#include "i965/brw_screen.h" /* XXX: shouldn't be doing this */
#include "trace/tr_drm.h"
static struct i965_libdrm_buffer *
i965_libdrm_buffer_from_handle(struct i965_libdrm_winsys *idws,
- const char* name, unsigned handle)
+ const char* name, unsigned handle)
{
struct i965_libdrm_buffer *buf = CALLOC_STRUCT(i965_libdrm_buffer);
uint32_t tile = 0, swizzle = 0;
static struct pipe_texture *
i965_libdrm_texture_from_shared_handle(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *template,
- const char* name,
- unsigned pitch,
- unsigned handle)
+ struct pipe_screen *screen,
+ struct pipe_texture *template,
+ const char* name,
+ unsigned pitch,
+ unsigned handle)
{
/* XXX: this is silly -- there should be a way to get directly from
* the "drm_api" struct to ourselves, without peering into
static boolean
i965_libdrm_shared_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *pitch,
- unsigned *handle)
+ struct pipe_screen *screen,
+ struct pipe_texture *texture,
+ unsigned *pitch,
+ unsigned *handle)
{
struct i965_libdrm_buffer *buf = NULL;
struct brw_winsys_buffer *buffer = NULL;
static boolean
i965_libdrm_local_handle_from_texture(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_texture *texture,
- unsigned *pitch,
- unsigned *handle)
+ struct pipe_screen *screen,
+ struct pipe_texture *texture,
+ unsigned *pitch,
+ unsigned *handle)
{
struct brw_winsys_buffer *buffer = NULL;
if (!brw_texture_get_winsys_buffer(texture, &buffer, pitch))
static struct pipe_screen *
i965_libdrm_create_screen(struct drm_api *api, int drmFD,
- struct drm_create_screen_arg *arg)
+ struct drm_create_screen_arg *arg)
{
struct i965_libdrm_winsys *idws;
unsigned int deviceID;
}
buf->bo = drm_intel_bo_alloc(idws->gem,
- names[type],
- size,
- alignment);
+ names[type],
+ size,
+ alignment);
if (!buf->bo)
goto err;
}
static enum pipe_error
-i965_libdrm_bo_emit_reloc( struct brw_winsys_buffer *buffer,
- enum brw_buffer_usage usage,
- unsigned delta,
- unsigned offset,
- struct brw_winsys_buffer *buffer2)
+i965_libdrm_bo_emit_reloc(struct brw_winsys_buffer *buffer,
+ enum brw_buffer_usage usage,
+ unsigned delta,
+ unsigned offset,
+ struct brw_winsys_buffer *buffer2)
{
struct i965_libdrm_buffer *buf = i965_libdrm_buffer(buffer);
struct i965_libdrm_buffer *buf2 = i965_libdrm_buffer(buffer2);
}
static enum pipe_error
-i965_libdrm_bo_exec( struct brw_winsys_buffer *buffer,
- unsigned bytes_used )
+i965_libdrm_bo_exec(struct brw_winsys_buffer *buffer,
+ unsigned bytes_used)
{
struct i965_libdrm_buffer *buf = i965_libdrm_buffer(buffer);
int ret;
static boolean
i965_libdrm_bo_references(struct brw_winsys_buffer *a,
- struct brw_winsys_buffer *b)
+ struct brw_winsys_buffer *b)
{
struct i965_libdrm_buffer *bufa = i965_libdrm_buffer(a);
struct i965_libdrm_buffer *bufb = i965_libdrm_buffer(b);
* bo_emit_reloc?
*/
static enum pipe_error
-i965_libdrm_check_aperture_space( struct brw_winsys_screen *iws,
- struct brw_winsys_buffer **buffers,
- unsigned count )
+i965_libdrm_check_aperture_space(struct brw_winsys_screen *iws,
+ struct brw_winsys_buffer **buffers,
+ unsigned count)
{
static drm_intel_bo *bos[128];
int i;
if (!buf->map_count) {
if (buf->map_gtt) {
- ret = drm_intel_gem_bo_map_gtt(buf->bo);
- if (ret)
- return NULL;
+ ret = drm_intel_gem_bo_map_gtt(buf->bo);
+ if (ret)
+ return NULL;
}
else {
- ret = drm_intel_bo_map(buf->bo, write);
- if (ret)
- return NULL;
+ ret = drm_intel_bo_map(buf->bo, write);
+ if (ret)
+ return NULL;
}
}