summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/extensions_table.h1
-rw-r--r--src/mesa/main/get.c8
-rw-r--r--src/mesa/main/get_hash_params.py7
-rw-r--r--src/mesa/main/mtypes.h16
4 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 3f01896cae7..bdba49d5380 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -10,6 +10,7 @@ EXT(3DFX_texture_compression_FXT1 , TDFX_texture_compression_FXT1
EXT(AMD_conservative_depth , ARB_conservative_depth , GLL, GLC, x , x , 2009)
EXT(AMD_draw_buffers_blend , ARB_draw_buffers_blend , GLL, GLC, x , x , 2009)
+EXT(AMD_framebuffer_multisample_advanced , AMD_framebuffer_multisample_advanced , GLL, GLC, x , ES2, 2018)
EXT(AMD_performance_monitor , AMD_performance_monitor , GLL, GLC, x , ES2, 2007)
EXT(AMD_pinned_memory , AMD_pinned_memory , GLL, GLC, x , x , 2013)
EXT(AMD_seamless_cubemap_per_texture , AMD_seamless_cubemap_per_texture , GLL, GLC, x , x , 2009)
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index db0079beb51..f870b217db5 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -518,6 +518,7 @@ 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[] = {
@@ -1228,6 +1229,13 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
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;
}
}
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 618e306e509..5c672a33123 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -368,6 +368,13 @@ descriptor=[
# GL_NV_conservative_raster_pre_snap_triangles
[ "CONSERVATIVE_RASTER_MODE_NV", "CONTEXT_ENUM16(ConservativeRasterMode), extra_NV_conservative_raster_pre_snap_triangles" ],
+
+# GL_AMD_framebuffer_multisample_advanced
+ [ "MAX_COLOR_FRAMEBUFFER_SAMPLES_AMD", "CONTEXT_INT(Const.MaxColorFramebufferSamples), extra_AMD_framebuffer_multisample_advanced" ],
+ [ "MAX_COLOR_FRAMEBUFFER_STORAGE_SAMPLES_AMD", "CONTEXT_INT(Const.MaxColorFramebufferStorageSamples), extra_AMD_framebuffer_multisample_advanced" ],
+ [ "MAX_DEPTH_STENCIL_FRAMEBUFFER_SAMPLES_AMD", "CONTEXT_INT(Const.MaxDepthStencilFramebufferSamples), extra_AMD_framebuffer_multisample_advanced" ],
+ [ "NUM_SUPPORTED_MULTISAMPLE_MODES_AMD", "CONTEXT_INT(Const.NumSupportedMultisampleModes), extra_AMD_framebuffer_multisample_advanced" ],
+ [ "SUPPORTED_MULTISAMPLE_MODES_AMD", "LOC_CUSTOM, TYPE_INT_N, 0, extra_AMD_framebuffer_multisample_advanced" ],
]},
# GLES3 is not a typo.
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index d71872835d1..f707e1629a5 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3937,6 +3937,21 @@ struct gl_constants
GLint MaxDepthTextureSamples;
GLint MaxIntegerSamples;
+ /** GL_AMD_framebuffer_multisample_advanced */
+ GLint MaxColorFramebufferSamples;
+ GLint MaxColorFramebufferStorageSamples;
+ GLint MaxDepthStencilFramebufferSamples;
+
+ /* An array of supported MSAA modes allowing different sample
+ * counts per attachment type.
+ */
+ struct {
+ GLint NumColorSamples;
+ GLint NumColorStorageSamples;
+ GLint NumDepthStencilSamples;
+ } SupportedMultisampleModes[40];
+ GLint NumSupportedMultisampleModes;
+
/**
* GL_EXT_texture_multisample_blit_scaled implementation assumes that
* samples are laid out in a rectangular grid roughly corresponding to
@@ -4235,6 +4250,7 @@ struct gl_extensions
GLboolean OES_texture_view;
GLboolean OES_viewport_array;
/* vendor extensions */
+ GLboolean AMD_framebuffer_multisample_advanced;
GLboolean AMD_performance_monitor;
GLboolean AMD_pinned_memory;
GLboolean AMD_seamless_cubemap_per_texture;