if (brw->gen >= 7)
brw_init_conditional_render_functions(functions);
- functions->QuerySamplesForFormat = brw_query_samples_for_format;
functions->QueryInternalFormat = brw_query_internal_format;
functions->NewTransformFeedback = brw_new_transform_feedback;
void gen7_emit_cs_stall_flush(struct brw_context *brw);
/* brw_queryformat.c */
-size_t brw_query_samples_for_format(struct gl_context *ctx, GLenum target,
- GLenum internalFormat, int samples[16]);
void brw_query_internal_format(struct gl_context *ctx, GLenum target,
GLenum internalFormat, GLenum pname,
GLint *params);
#include "brw_context.h"
#include "main/formatquery.h"
-size_t
+static size_t
brw_query_samples_for_format(struct gl_context *ctx, GLenum target,
GLenum internalFormat, int samples[16])
{
assert(params != NULL);
switch (pname) {
+ case GL_SAMPLES:
+ brw_query_samples_for_format(ctx, target, internalFormat, params);
+ break;
+
+ case GL_NUM_SAMPLE_COUNTS: {
+ size_t num_samples;
+ GLint dummy_buffer[16];
+
+ num_samples = brw_query_samples_for_format(ctx, target, internalFormat,
+ dummy_buffer);
+ params[0] = (GLint) num_samples;
+ break;
+ }
+
default:
/* By default, we call the driver hook's fallback function from the frontend,
* which has generic implementation for all pnames.