~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/r300/radeon_cs.c

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
#include <stdio.h>
3
 
#include <stdint.h>
4
 
#include "drm.h"
5
 
#include "radeon_drm.h"
6
 
#include "radeon_bocs_wrapper.h"
7
 
#include "radeon_cs_int_drm.h"
8
 
 
9
 
struct radeon_cs *radeon_cs_create(struct radeon_cs_manager *csm,
10
 
                            uint32_t ndw)
11
 
{
12
 
    struct radeon_cs_int *csi = csm->funcs->cs_create(csm, ndw);
13
 
    return (struct radeon_cs *)csi;
14
 
}
15
 
 
16
 
int radeon_cs_write_reloc(struct radeon_cs *cs,
17
 
                          struct radeon_bo *bo,
18
 
                          uint32_t read_domain,
19
 
                          uint32_t write_domain,
20
 
                          uint32_t flags)
21
 
{
22
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
23
 
 
24
 
    return csi->csm->funcs->cs_write_reloc(csi,
25
 
                                           bo,
26
 
                                           read_domain,
27
 
                                           write_domain,
28
 
                                           flags);
29
 
}
30
 
 
31
 
int radeon_cs_begin(struct radeon_cs *cs,
32
 
                    uint32_t ndw,
33
 
                    const char *file,
34
 
                    const char *func,
35
 
                    int line)
36
 
{
37
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
38
 
    return csi->csm->funcs->cs_begin(csi, ndw, file, func, line);
39
 
}
40
 
 
41
 
int radeon_cs_end(struct radeon_cs *cs,
42
 
                  const char *file,
43
 
                  const char *func,
44
 
                  int line)
45
 
{
46
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
47
 
    return csi->csm->funcs->cs_end(csi, file, func, line);
48
 
}
49
 
 
50
 
int radeon_cs_emit(struct radeon_cs *cs)
51
 
{
52
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
53
 
    return csi->csm->funcs->cs_emit(csi);
54
 
}
55
 
 
56
 
int radeon_cs_destroy(struct radeon_cs *cs)
57
 
{
58
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
59
 
    return csi->csm->funcs->cs_destroy(csi);
60
 
}
61
 
 
62
 
int radeon_cs_erase(struct radeon_cs *cs)
63
 
{
64
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
65
 
    return csi->csm->funcs->cs_erase(csi);
66
 
}
67
 
 
68
 
int radeon_cs_need_flush(struct radeon_cs *cs)
69
 
{
70
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
71
 
    return csi->csm->funcs->cs_need_flush(csi);
72
 
}
73
 
 
74
 
void radeon_cs_print(struct radeon_cs *cs, FILE *file)
75
 
{
76
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
77
 
    csi->csm->funcs->cs_print(csi, file);
78
 
}
79
 
 
80
 
void radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit)
81
 
{
82
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
83
 
    if (domain == RADEON_GEM_DOMAIN_VRAM)
84
 
        csi->csm->vram_limit = limit;
85
 
    else
86
 
        csi->csm->gart_limit = limit;
87
 
}
88
 
 
89
 
void radeon_cs_space_set_flush(struct radeon_cs *cs, void (*fn)(void *), void *data)
90
 
{
91
 
    struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
92
 
    csi->space_flush_fn = fn;
93
 
    csi->space_flush_data = data;
94
 
}
95