mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
i965: use new cast wrappers
This commit is contained in:
parent
294a473f7a
commit
9c781de015
3 changed files with 16 additions and 9 deletions
|
|
@ -53,7 +53,7 @@ static void calculate_curbe_offsets( struct brw_context *brw )
|
|||
GLuint nr_fp_regs = (brw->wm.prog_data->nr_params + 15) / 16;
|
||||
|
||||
/* BRW_NEW_VERTEX_PROGRAM */
|
||||
struct brw_vertex_program *vp = (struct brw_vertex_program *)brw->vertex_program;
|
||||
struct brw_vertex_program *vp = brw_vertex_program(brw->vertex_program);
|
||||
GLuint nr_vp_regs = (vp->program.Base.Parameters->NumParameters * 4 + 15) / 16;
|
||||
GLuint nr_clip_regs = 0;
|
||||
GLuint total_regs;
|
||||
|
|
@ -174,8 +174,10 @@ static GLfloat fixed_plane[6][4] = {
|
|||
static void prepare_constant_buffer(struct brw_context *brw)
|
||||
{
|
||||
GLcontext *ctx = &brw->intel.ctx;
|
||||
const struct brw_vertex_program *vp = (struct brw_vertex_program *)brw->vertex_program;
|
||||
const struct brw_fragment_program *fp = (struct brw_fragment_program *)brw->fragment_program;
|
||||
const struct brw_vertex_program *vp =
|
||||
brw_vertex_program_const(brw->vertex_program);
|
||||
const struct brw_fragment_program *fp =
|
||||
brw_fragment_program_const(brw->fragment_program);
|
||||
const GLuint sz = brw->curbe.total_size;
|
||||
const GLuint bufsz = sz * 16 * sizeof(GLfloat);
|
||||
GLfloat *buf;
|
||||
|
|
|
|||
|
|
@ -113,8 +113,10 @@ static void brwProgramStringNotify( GLcontext *ctx,
|
|||
struct brw_context *brw = brw_context(ctx);
|
||||
if (target == GL_FRAGMENT_PROGRAM_ARB) {
|
||||
struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
|
||||
struct brw_fragment_program *newFP = (struct brw_fragment_program *) prog;
|
||||
struct brw_fragment_program *curFP = (struct brw_fragment_program *) brw->fragment_program;
|
||||
struct brw_fragment_program *newFP = brw_fragment_program(fprog);
|
||||
const struct brw_fragment_program *curFP =
|
||||
brw_fragment_program_const(brw->fragment_program);
|
||||
|
||||
if (fprog->FogOption) {
|
||||
_mesa_append_fog_code(ctx, fprog);
|
||||
fprog->FogOption = GL_NONE;
|
||||
|
|
@ -126,8 +128,11 @@ static void brwProgramStringNotify( GLcontext *ctx,
|
|||
newFP->isGLSL = brw_wm_is_glsl(fprog);
|
||||
}
|
||||
else if (target == GL_VERTEX_PROGRAM_ARB) {
|
||||
struct brw_vertex_program *newVP = (struct brw_vertex_program *) prog;
|
||||
struct brw_vertex_program *curVP = (struct brw_vertex_program *) brw->vertex_program;
|
||||
struct gl_vertex_program *vprog = (struct gl_vertex_program *) prog;
|
||||
struct brw_vertex_program *newVP = brw_vertex_program(vprog);
|
||||
const struct brw_vertex_program *curVP =
|
||||
brw_vertex_program_const(brw->vertex_program);
|
||||
|
||||
if (newVP == curVP)
|
||||
brw->state.dirty.brw |= BRW_NEW_VERTEX_PROGRAM;
|
||||
if (newVP->program.IsPositionInvariant) {
|
||||
|
|
|
|||
|
|
@ -170,8 +170,8 @@ static void calc_wm_input_sizes( struct brw_context *brw )
|
|||
{
|
||||
GLcontext *ctx = &brw->intel.ctx;
|
||||
/* BRW_NEW_VERTEX_PROGRAM */
|
||||
struct brw_vertex_program *vp =
|
||||
(struct brw_vertex_program *)brw->vertex_program;
|
||||
const struct brw_vertex_program *vp =
|
||||
brw_vertex_program_const(brw->vertex_program);
|
||||
/* BRW_NEW_INPUT_DIMENSIONS */
|
||||
struct tracker t;
|
||||
GLuint insn;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue