mesa: enable ARB_vertex_attrib_64bit in compat profile
[mesa.git] / src / mesa / main / multisample.c
index dfe6a3714273209739cbd0b54a725c0119093ebd..f93a18832da5e0976bccdc46fa91fd8a30e15acb 100644 (file)
@@ -101,6 +101,24 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
       return;
    }
 
+   case GL_PROGRAMMABLE_SAMPLE_LOCATION_ARB:
+      if (!ctx->Extensions.ARB_sample_locations) {
+         _mesa_error( ctx, GL_INVALID_ENUM, "glGetMultisamplefv(pname)" );
+         return;
+      }
+
+      if (index >= MAX_SAMPLE_LOCATION_TABLE_SIZE * 2) {
+         _mesa_error( ctx, GL_INVALID_VALUE, "glGetMultisamplefv(index)" );
+         return;
+      }
+
+      if (ctx->DrawBuffer->SampleLocationTable)
+         *val = ctx->DrawBuffer->SampleLocationTable[index];
+      else
+         *val = 0.5f;
+
+      return;
+
    default:
       _mesa_error( ctx, GL_INVALID_ENUM, "glGetMultisamplefv(pname)" );
       return;