GLenum value_enum;
GLubyte value_ubyte;
GLshort value_short;
+ GLuint value_uint;
/* Sigh, see GL_COMPRESSED_TEXTURE_FORMATS_ARB handling */
struct {
EXTRA_EXT(EXT_stencil_two_side);
EXTRA_EXT(EXT_depth_bounds_test);
EXTRA_EXT(ARB_depth_clamp);
+EXTRA_EXT(AMD_depth_clamp_separate);
EXTRA_EXT(ATI_fragment_shader);
EXTRA_EXT(EXT_provoking_vertex);
EXTRA_EXT(ARB_fragment_shader);
EXTRA_EXT(NV_conservative_raster);
EXTRA_EXT(NV_conservative_raster_dilate);
EXTRA_EXT(NV_conservative_raster_pre_snap_triangles);
+EXTRA_EXT(ARB_sample_locations);
+EXTRA_EXT(AMD_framebuffer_multisample_advanced);
static const int
extra_ARB_color_buffer_float_or_glcore[] = {
v->value_int_4[3] = GET_COLORMASK_BIT(ctx->Color.ColorMask, 0, 3);
break;
+ case GL_DEPTH_CLAMP:
+ v->value_bool = ctx->Transform.DepthClampNear || ctx->Transform.DepthClampFar;
+ break;
+
case GL_EDGE_FLAG:
v->value_bool = ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0F;
break;
simple_mtx_unlock(&ctx->Shared->Mutex);
}
break;
+ /* GL_ARB_sample_locations */
+ case GL_SAMPLE_LOCATION_SUBPIXEL_BITS_ARB:
+ case GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB:
+ case GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB:
+ {
+ GLuint bits, width, height;
+
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
+
+ if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE) {
+ v->value_uint = 0;
+ break;
+ }
+
+ ctx->Driver.GetProgrammableSampleCaps(ctx, ctx->DrawBuffer,
+ &bits, &width, &height);
+
+ if (d->pname == GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_ARB)
+ v->value_uint = width;
+ else if (d->pname == GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_ARB)
+ v->value_uint = height;
+ else
+ v->value_uint = bits;
+ }
+ break;
+ case GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_ARB:
+ v->value_uint = MAX_SAMPLE_LOCATION_TABLE_SIZE;
+ break;
+
+ /* GL_AMD_framebuffer_multisample_advanced */
+ case GL_SUPPORTED_MULTISAMPLE_MODES_AMD:
+ v->value_int_n.n = ctx->Const.NumSupportedMultisampleModes * 3;
+ memcpy(v->value_int_n.ints, ctx->Const.SupportedMultisampleModes,
+ v->value_int_n.n * sizeof(GLint));
+ break;
}
}
case TYPE_INT_N:
for (i = 0; i < v.value_int_n.n; i++)
- params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]);
+ params[i] = v.value_int_n.ints[i];
break;
case TYPE_UINT_4: