mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
mesa/main: remove driver-cap for ARB_point_sprite
It's always supported, no need for checks here. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Begrudgingly-reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19049>
This commit is contained in:
parent
310959d9fe
commit
8255739a0a
8 changed files with 15 additions and 39 deletions
|
|
@ -423,10 +423,8 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib_node *ena
|
|||
GL_RASTER_POSITION_UNCLIPPED_IBM);
|
||||
TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth,
|
||||
GL_POINT_SMOOTH);
|
||||
if (ctx->Extensions.ARB_point_sprite) {
|
||||
TEST_AND_UPDATE(ctx->Point.PointSprite, enable->PointSprite,
|
||||
GL_POINT_SPRITE);
|
||||
}
|
||||
TEST_AND_UPDATE(ctx->Point.PointSprite, enable->PointSprite,
|
||||
GL_POINT_SPRITE);
|
||||
TEST_AND_UPDATE(ctx->Polygon.OffsetPoint, enable->PolygonOffsetPoint,
|
||||
GL_POLYGON_OFFSET_POINT);
|
||||
TEST_AND_UPDATE(ctx->Polygon.OffsetLine, enable->PolygonOffsetLine,
|
||||
|
|
@ -939,18 +937,16 @@ _mesa_PopAttrib(void)
|
|||
TEST_AND_CALL1_SEL(Point.MaxSize, PointParameterf, GL_POINT_SIZE_MAX_EXT);
|
||||
TEST_AND_CALL1_SEL(Point.Threshold, PointParameterf, GL_POINT_FADE_THRESHOLD_SIZE_EXT);
|
||||
|
||||
if (ctx->Extensions.ARB_point_sprite) {
|
||||
if (ctx->Point.CoordReplace != attr->Point.CoordReplace) {
|
||||
ctx->NewState |= _NEW_POINT | _NEW_FF_VERT_PROGRAM;
|
||||
ctx->Point.CoordReplace = attr->Point.CoordReplace;
|
||||
}
|
||||
TEST_AND_UPDATE(ctx->Point.PointSprite, attr->Point.PointSprite,
|
||||
GL_POINT_SPRITE);
|
||||
|
||||
if ((ctx->API == API_OPENGL_COMPAT && ctx->Version >= 20)
|
||||
|| ctx->API == API_OPENGL_CORE)
|
||||
TEST_AND_CALL1_SEL(Point.SpriteOrigin, PointParameterf, GL_POINT_SPRITE_COORD_ORIGIN);
|
||||
if (ctx->Point.CoordReplace != attr->Point.CoordReplace) {
|
||||
ctx->NewState |= _NEW_POINT | _NEW_FF_VERT_PROGRAM;
|
||||
ctx->Point.CoordReplace = attr->Point.CoordReplace;
|
||||
}
|
||||
TEST_AND_UPDATE(ctx->Point.PointSprite, attr->Point.PointSprite,
|
||||
GL_POINT_SPRITE);
|
||||
|
||||
if ((ctx->API == API_OPENGL_COMPAT && ctx->Version >= 20)
|
||||
|| ctx->API == API_OPENGL_CORE)
|
||||
TEST_AND_CALL1_SEL(Point.SpriteOrigin, PointParameterf, GL_POINT_SPRITE_COORD_ORIGIN);
|
||||
}
|
||||
|
||||
if (mask & GL_POLYGON_BIT) {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ struct gl_extensions
|
|||
GLboolean ARB_occlusion_query;
|
||||
GLboolean ARB_occlusion_query2;
|
||||
GLboolean ARB_pipeline_statistics_query;
|
||||
GLboolean ARB_point_sprite;
|
||||
GLboolean ARB_polygon_offset_clamp;
|
||||
GLboolean ARB_post_depth_coverage;
|
||||
GLboolean ARB_query_buffer_object;
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ EXT(ARB_parallel_shader_compile , dummy_true
|
|||
EXT(ARB_pipeline_statistics_query , ARB_pipeline_statistics_query , GLL, GLC, x , x , 2014)
|
||||
EXT(ARB_pixel_buffer_object , EXT_pixel_buffer_object , GLL, GLC, x , x , 2004)
|
||||
EXT(ARB_point_parameters , dummy_true , GLL, x , x , x , 1997)
|
||||
EXT(ARB_point_sprite , ARB_point_sprite , GLL, GLC, x , x , 2003)
|
||||
EXT(ARB_point_sprite , dummy_true , GLL, GLC, x , x , 2003)
|
||||
EXT(ARB_polygon_offset_clamp , ARB_polygon_offset_clamp , GLL, GLC, x , x , 2017)
|
||||
EXT(ARB_post_depth_coverage , ARB_post_depth_coverage , GLL, GLC, x , x, 2015)
|
||||
EXT(ARB_program_interface_query , dummy_true , GLL, GLC, x , x , 2012)
|
||||
|
|
@ -454,7 +454,7 @@ EXT(OES_gpu_shader5 , ARB_gpu_shader5
|
|||
EXT(OES_mapbuffer , dummy_true , x , x , ES1, ES2, 2005)
|
||||
EXT(OES_packed_depth_stencil , dummy_true , x , x , ES1, ES2, 2007)
|
||||
EXT(OES_point_size_array , dummy_true , x , x , ES1, x , 2004)
|
||||
EXT(OES_point_sprite , ARB_point_sprite , x , x , ES1, x , 2004)
|
||||
EXT(OES_point_sprite , dummy_true , x , x , ES1, x , 2004)
|
||||
EXT(OES_primitive_bounding_box , OES_primitive_bounding_box , x , x , x , 31, 2014)
|
||||
EXT(OES_query_matrix , dummy_true , x , x , ES1, x , 2003)
|
||||
EXT(OES_read_format , dummy_true , GLL, x , ES1, x , 2003)
|
||||
|
|
|
|||
|
|
@ -544,7 +544,6 @@ EXTRA_EXT(EXT_transform_feedback);
|
|||
EXTRA_EXT(ARB_transform_feedback3);
|
||||
EXTRA_EXT(EXT_pixel_buffer_object);
|
||||
EXTRA_EXT(ARB_vertex_program);
|
||||
EXTRA_EXT(ARB_point_sprite);
|
||||
EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
|
||||
EXTRA_EXT(ARB_color_buffer_float);
|
||||
EXTRA_EXT(EXT_framebuffer_sRGB);
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ descriptor=[
|
|||
[ "TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA" ],
|
||||
|
||||
# GL_OES_point_sprite
|
||||
[ "POINT_SPRITE", "CONTEXT_BOOL(Point.PointSprite), extra_ARB_point_sprite" ],
|
||||
[ "POINT_SPRITE", "CONTEXT_BOOL(Point.PointSprite), NO_EXTRA" ],
|
||||
]},
|
||||
|
||||
|
||||
|
|
@ -875,7 +875,7 @@ descriptor=[
|
|||
[ "RASTER_POSITION_UNCLIPPED_IBM", "CONTEXT_BOOL(Transform.RasterPositionUnclipped), NO_EXTRA" ],
|
||||
|
||||
# GL_ARB_point_sprite
|
||||
[ "POINT_SPRITE_COORD_ORIGIN", "CONTEXT_ENUM16(Point.SpriteOrigin), extra_ARB_point_sprite" ],
|
||||
[ "POINT_SPRITE_COORD_ORIGIN", "CONTEXT_ENUM16(Point.SpriteOrigin), NO_EXTRA" ],
|
||||
|
||||
# GL_NV_texture_rectangle
|
||||
[ "TEXTURE_RECTANGLE_NV", "LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_NV_texture_rectangle" ],
|
||||
|
|
|
|||
|
|
@ -462,11 +462,6 @@ _mesa_texenvfv_indexed( struct gl_context* ctx, GLuint texunit, GLenum target,
|
|||
}
|
||||
}
|
||||
else if (target == GL_POINT_SPRITE) {
|
||||
/* GL_ARB_point_sprite */
|
||||
if (!ctx->Extensions.ARB_point_sprite) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)", target );
|
||||
return;
|
||||
}
|
||||
if (pname == GL_COORD_REPLACE) {
|
||||
/* It's kind of weird to set point state via glTexEnv,
|
||||
* but that's what the spec calls for.
|
||||
|
|
@ -745,11 +740,6 @@ _mesa_gettexenvfv_indexed( GLuint texunit, GLenum target, GLenum pname, GLfloat
|
|||
}
|
||||
}
|
||||
else if (target == GL_POINT_SPRITE) {
|
||||
/* GL_ARB_point_sprite */
|
||||
if (!ctx->Extensions.ARB_point_sprite) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" );
|
||||
return;
|
||||
}
|
||||
if (pname == GL_COORD_REPLACE) {
|
||||
if (ctx->Point.CoordReplace & (1u << texunit))
|
||||
*params = 1.0f;
|
||||
|
|
@ -821,11 +811,6 @@ _mesa_gettexenviv_indexed( GLuint texunit, GLenum target,
|
|||
}
|
||||
}
|
||||
else if (target == GL_POINT_SPRITE) {
|
||||
/* GL_ARB_point_sprite */
|
||||
if (!ctx->Extensions.ARB_point_sprite) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" );
|
||||
return;
|
||||
}
|
||||
if (pname == GL_COORD_REPLACE) {
|
||||
if (ctx->Point.CoordReplace & (1u << texunit))
|
||||
*params = GL_TRUE;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,6 @@ compute_version(const struct gl_extensions *extensions,
|
|||
const bool ver_1_5 = (ver_1_4 &&
|
||||
extensions->ARB_occlusion_query);
|
||||
const bool ver_2_0 = (ver_1_5 &&
|
||||
extensions->ARB_point_sprite &&
|
||||
extensions->ARB_vertex_shader &&
|
||||
extensions->ARB_fragment_shader &&
|
||||
extensions->ARB_texture_non_power_of_two &&
|
||||
|
|
|
|||
|
|
@ -1845,6 +1845,4 @@ void st_init_extensions(struct pipe_screen *screen,
|
|||
screen->get_param(screen, PIPE_CAP_DOUBLES) &&
|
||||
!(nir_options->lower_doubles_options & nir_lower_fp64_full_software))
|
||||
extensions->NV_copy_depth_to_color = TRUE;
|
||||
|
||||
extensions->ARB_point_sprite = GL_TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue