Преглед изворни кода

r3xx/r5xx: Enable ARB_point_parameters.

This isn't complete yet. It does cover the two most common usage cases,
though, and at least the third one (POINT_DISTANCE_ATTENUATION) is possible,
so I'll do that later.
tags/mesa_7_1_rc2
Corbin Simpson пре 17 година
родитељ
комит
bb1744970d
2 измењених фајлова са 30 додато и 0 уклоњено
  1. 2
    0
      src/mesa/drivers/dri/r300/r300_context.c
  2. 28
    0
      src/mesa/drivers/dri/r300/r300_state.c

+ 2
- 0
src/mesa/drivers/dri/r300/r300_context.c Прегледај датотеку

@@ -79,6 +79,7 @@ int hw_tcl_on = 1;

#define need_GL_EXT_stencil_two_side
#define need_GL_ARB_multisample
#define need_GL_ARB_point_parameters
#define need_GL_ARB_texture_compression
#define need_GL_ARB_vertex_buffer_object
#define need_GL_ARB_vertex_program
@@ -98,6 +99,7 @@ const struct dri_extension card_extensions[] = {
{"GL_ARB_fragment_program", NULL},
{"GL_ARB_multisample", GL_ARB_multisample_functions},
{"GL_ARB_multitexture", NULL},
{"GL_ARB_point_parameters", GL_ARB_point_parameters_functions},
{"GL_ARB_shadow", NULL},
{"GL_ARB_texture_border_clamp", NULL},
{"GL_ARB_texture_compression", GL_ARB_texture_compression_functions},

+ 28
- 0
src/mesa/drivers/dri/r300/r300_state.c Прегледај датотеку

@@ -827,6 +827,31 @@ static void r300PointSize(GLcontext * ctx, GLfloat size)
((int)(size * 6) << R300_POINTSIZE_Y_SHIFT);
}

static void r300PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * param)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);

switch (pname) {
case GL_POINT_SIZE_MIN:
R300_STATECHANGE(r300, ga_point_minmax);
r300->hw.ga_point_minmax.cmd[1] &= ~R300_GA_POINT_MINMAX_MIN_MASK;
r300->hw.ga_point_minmax.cmd[1] |= (GLuint)(ctx->Point.MinSize * 16.0);
break;
case GL_POINT_SIZE_MAX:
R300_STATECHANGE(r300, ga_point_minmax);
r300->hw.ga_point_minmax.cmd[1] &= ~R300_GA_POINT_MINMAX_MAX_MASK;
r300->hw.ga_point_minmax.cmd[1] |= (GLuint)(ctx->Point.MaxSize * 16.0)
<< R300_GA_POINT_MINMAX_MAX_SHIFT;
break;
case GL_POINT_DISTANCE_ATTENUATION:
break;
case GL_POINT_FADE_THRESHOLD_SIZE:
break;
default:
break;
}
}

/* =============================================================
* Line state
*/
@@ -2706,6 +2731,9 @@ void r300InitStateFuncs(struct dd_function_table *functions)
functions->FrontFace = r300FrontFace;
functions->ShadeModel = r300ShadeModel;

/* ARB_point_parameters */
functions->PointParameterfv = r300PointParameter;

/* Stencil related */
functions->StencilFuncSeparate = r300StencilFuncSeparate;
functions->StencilMaskSeparate = r300StencilMaskSeparate;

Loading…
Откажи
Сачувај