blob: 11242c355726f0e172eaf3fa804bc389394f2a01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
/*
* Copyright © 2010 Jerome Glisse <glisse@freedesktop.org>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef R600_WINSYS_H
#define R600_WINSYS_H
#include "r600_atom.h"
/* opaque structure */
struct radeon_device *rdev;
struct radeon_atom *atom;
struct drm_r600_vs_buffer {
u32 handle;
u32 resource_id;
u32 sq_vtx_constant_word0;
u32 sq_vtx_constant_word2;
u32 sq_vtx_constant_word3;
};
struct drm_r600_vs_element {
u32 buffer_id;
u32 semantic;
u32 sq_vtx_word0;
u32 sq_vtx_word1;
u32 sq_vtx_word2;
};
struct drm_r600_vs_input {
u32 nelements;
u32 nbuffers;
struct drm_r600_vs_element elements[32];
struct drm_r600_vs_buffer buffers[32];
};
struct r600_vs_input {
struct drm_r600_vs_input drm;
struct radeon_bo *bo[32];
u32 nbo;
};
struct r600_vs_buffer {
struct drm_r600_vs_buffer drm;
struct radeon_bo *bo;
};
struct drm_r600_batch {
struct radeon_atom *vs_constants;
struct radeon_atom *ps_constants;
struct radeon_atom *blend;
struct radeon_atom *cb;
struct radeon_atom *cb_cntl;
struct radeon_atom *pa;
struct radeon_atom *vport;
struct radeon_atom *db;
struct radeon_atom *db_cntl;
struct radeon_atom *vs_shader;
struct radeon_atom *ps_shader;
struct r600_vs_input inputs;
};
/* vs_shader - vertex shader */
struct drm_r600_vs_shader {
u32 sq_pgm_resources_vs;
u8 input_semantic[32];
u8 input_gpr[32];
u8 ninputs;
u8 output_semantic[32];
u8 fog_output_id;
u8 noutputs;
u32 ndwords;
u32 opcodes[512];
};
/* atom */
extern int radeon_batches_queue(struct radeon_device *rdev, void *batch);
extern int radeon_batches_flush(struct radeon_device *rdev);
/* core functions */
extern int radeon_device_init(struct radeon_device **rdev, struct radeon_bo_manager *bom, int fd);
extern void radeon_device_release(struct radeon_device *rdev);
#endif
|