summaryrefslogtreecommitdiff
path: root/radeon_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'radeon_device.h')
-rw-r--r--radeon_device.h69
1 files changed, 8 insertions, 61 deletions
diff --git a/radeon_device.h b/radeon_device.h
index 505576a..b943e0e 100644
--- a/radeon_device.h
+++ b/radeon_device.h
@@ -57,8 +57,12 @@ int kref_put(struct kref *kref, void (*release) (struct kref *kref));
/* UTILITIES END ************************************************************/
+#include "r600_atom_kernel.h"
+
struct radeon_device;
struct radeon_atom;
+struct drm_r600_vs_input;
+struct drm_r600_vs_shader;
struct radeon_ib {
u32 *ptr;
@@ -93,7 +97,6 @@ struct radeon_atom {
radeon_atom_emit_t emit;
};
-
struct r600_atom_funcs {
u32 type;
u32 size;
@@ -101,54 +104,17 @@ struct r600_atom_funcs {
radeon_atom_emit_t emit;
};
-/* R600 */
-
-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 r600_vs_buffer {
+ struct drm_r600_vs_buffer drm;
+ struct radeon_bo *bo;
};
-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;
-};
-#define R600_BATCH_NATOMS 11
struct r600_batch {
struct list_head list;
struct list_head pre_flushes;
@@ -160,8 +126,8 @@ struct r600_batch {
u32 npkts;
struct radeon_bo *shaders;
u32 shaders_idx;
- struct r600_vs_input inputs;
u32 nfs_resources;
+ struct r600_vs_input inputs;
};
struct r600_batches {
@@ -172,19 +138,6 @@ struct r600_batches {
struct r600_vs_buffer fs_resource[160];
u32 last_id[R600_BATCH_NATOMS];
};
-/* 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];
-};
-
struct radeon_device {
int fd;
@@ -196,12 +149,6 @@ struct radeon_device {
unsigned group_bytes;
struct radeon_bo_manager *bom;
};
-extern int r600_shader_build_fs(struct radeon_device *rdev,
- u32 *bytecode, u32 *ndwords,
- struct drm_r600_vs_input *inputs,
- struct drm_r600_vs_shader *vs);
-extern int r600_batches_queue(struct radeon_device *rdev,
- struct drm_r600_batch *batch);
extern u32 radeon_ib_reloc(struct radeon_ib *ib, struct radeon_bo *bo, u32 d);
extern int radeon_ib_get(struct radeon_device *rdev, struct radeon_ib **ib);