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

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/r600/evergreen_vertprog.h

  • 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
 
 * Copyright (C) 2008-2009  Advanced Micro Devices, Inc.
3
 
 *
4
 
 * Permission is hereby granted, free of charge, to any person obtaining a
5
 
 * copy of this software and associated documentation files (the "Software"),
6
 
 * to deal in the Software without restriction, including without limitation
7
 
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
 
 * and/or sell copies of the Software, and to permit persons to whom the
9
 
 * Software is furnished to do so, subject to the following conditions:
10
 
 *
11
 
 * The above copyright notice and this permission notice shall be included
12
 
 * in all copies or substantial portions of the Software.
13
 
 *
14
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
 
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17
 
 * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18
 
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
 
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
 
 */
21
 
 
22
 
/*
23
 
 * Authors:
24
 
 *   Richard Li <RichardZ.Li@amd.com>, <richardradeon@gmail.com>
25
 
 */
26
 
 
27
 
 
28
 
#ifndef _EVERGREEN_VERTPROG_H_
29
 
#define _EVERGREEN_VERTPROG_H_
30
 
 
31
 
#include "main/glheader.h"
32
 
#include "main/mtypes.h" 
33
 
 
34
 
#include "r700_shader.h"
35
 
#include "r700_assembler.h"
36
 
 
37
 
typedef struct evergreenArrayDesc //TEMP
38
 
{
39
 
        GLint size;   //number of data element
40
 
        GLenum type;  //data element type
41
 
        GLsizei stride;
42
 
        GLenum format; //GL_RGBA or GL_BGRA
43
 
} evergreenArrayDesc;
44
 
 
45
 
struct evergreen_vertex_program 
46
 
{
47
 
    struct gl_vertex_program *mesa_program; /* Must be first */
48
 
 
49
 
    struct evergreen_vertex_program *next;
50
 
 
51
 
    r700_AssemblerBase r700AsmCode;
52
 
    R700_Shader        r700Shader;
53
 
 
54
 
    GLboolean translated;
55
 
    GLboolean loaded;
56
 
 
57
 
    void * shaderbo;
58
 
 
59
 
        GLuint K0used;
60
 
    void * constbo0;
61
 
 
62
 
    evergreenArrayDesc              aos_desc[VERT_ATTRIB_MAX];
63
 
};
64
 
 
65
 
struct evergreen_vertex_program_cont
66
 
{
67
 
    struct gl_vertex_program mesa_program;
68
 
 
69
 
    struct evergreen_vertex_program *progs;
70
 
};
71
 
 
72
 
//Internal
73
 
unsigned int evergreen_Map_Vertex_Output(r700_AssemblerBase       *pAsm, 
74
 
                               struct gl_vertex_program *mesa_vp,
75
 
                               unsigned int unStart);
76
 
unsigned int evergreen_Map_Vertex_Input(r700_AssemblerBase       *pAsm, 
77
 
                              struct gl_vertex_program *mesa_vp,
78
 
                              unsigned int unStart);
79
 
GLboolean evergreen_Process_Vertex_Program_Vfetch_Instructions(
80
 
        struct evergreen_vertex_program *vp,
81
 
        struct gl_vertex_program   *mesa_vp);
82
 
GLboolean evergreen_Process_Vertex_Program_Vfetch_Instructions2(
83
 
    struct gl_context *ctx,
84
 
        struct evergreen_vertex_program *vp,
85
 
        struct gl_vertex_program   *mesa_vp);
86
 
void evergreen_Map_Vertex_Program(struct gl_context *ctx,
87
 
            struct evergreen_vertex_program *vp,
88
 
                        struct gl_vertex_program   *mesa_vp);
89
 
GLboolean evergreen_Find_Instruction_Dependencies_vp(struct evergreen_vertex_program *vp,
90
 
                                           struct gl_vertex_program   *mesa_vp);
91
 
 
92
 
struct evergreen_vertex_program* evergreenTranslateVertexShader(struct gl_context *ctx,
93
 
                                                      struct gl_vertex_program   *mesa_vp);
94
 
 
95
 
/* Interface */
96
 
extern void evergreenSelectVertexShader(struct gl_context *ctx);
97
 
extern void evergreenSetVertexFormat(struct gl_context *ctx, const struct gl_client_array *arrays[], int count);
98
 
 
99
 
extern GLboolean evergreenSetupVertexProgram(struct gl_context * ctx);
100
 
 
101
 
extern GLboolean evergreenSetupVPconstants(struct gl_context * ctx);
102
 
 
103
 
extern void * evergreenGetActiveVpShaderBo(struct gl_context * ctx);
104
 
 
105
 
extern void * evergreenGetActiveVpShaderConstBo(struct gl_context * ctx);
106
 
 
107
 
extern int evergreen_getTypeSize(GLenum type);
108
 
 
109
 
#endif /* _EVERGREEN_VERTPROG_H_ */