summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-02-16 20:47:11 +1300
committerChris Forbes <[email protected]>2013-03-24 16:38:18 +1300
commit86b83806007c65baea916a2ccf71ecbcc256ebba (patch)
tree6aef592f3e0fdef87756c9fe0b02e2a6dcc0790e /src/mesa/state_tracker
parent3cc2629b3b4bfc3b5c21a5932a3a2e590e60f98a (diff)
mesa: allow internalformat_query with multisample texture targets
Now that we support ARB_texture_multisample, there are multiple targets accepted for this query, and they may have target-dependent limits, so pass the target to the driverfunc. For example, the sampling hardware may not be able to do general texelFetch() for some format/sample count combination, but the driver may still be able to implement a reasonable resolve operation, so it can be supported for renderbuffers. V2: - Don't break Gallium compile. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_format.c6
-rw-r--r--src/mesa/state_tracker/st_format.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 5fd44e76d6a..a15706a0322 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -1769,13 +1769,15 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target,
* Called via ctx->Driver.ChooseTextureFormat().
*/
size_t
-st_QuerySamplesForFormat(struct gl_context *ctx, GLenum internalFormat,
- int samples[16])
+st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target,
+ GLenum internalFormat, int samples[16])
{
struct st_context *st = st_context(ctx);
enum pipe_format format;
unsigned i, bind, num_sample_counts = 0;
+ (void) target;
+
if (_mesa_is_depth_or_stencil_format(internalFormat))
bind = PIPE_BIND_DEPTH_STENCIL;
else
diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h
index 3db409b74e0..0a1c18d92d9 100644
--- a/src/mesa/state_tracker/st_format.h
+++ b/src/mesa/state_tracker/st_format.h
@@ -67,8 +67,8 @@ st_ChooseTextureFormat(struct gl_context * ctx, GLenum target,
GLenum format, GLenum type);
size_t
-st_QuerySamplesForFormat(struct gl_context *ctx, GLenum internalFormat,
- int samples[16]);
+st_QuerySamplesForFormat(struct gl_context *ctx, GLenum target,
+ GLenum internalFormat, int samples[16]);
/* can we use a sampler view to translate these formats
only used to make TFP so far */