<div dir="ltr">This looks like it misses the interactions with texture completeness.<div><br></div><div>- Chris</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 1, 2017 at 7:53 AM, Plamena Manolova <span dir="ltr"><<a href="mailto:plamena.manolova@intel.com" target="_blank">plamena.manolova@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This extension provides a new texture and sampler parameter<br>
(TEXTURE_REDUCTION_MODE_ARB) which allows applications to produce a<br>
filtered texel value by computing a component-wise minimum (MIN) or<br>
maximum (MAX) of the texels that would normally be averaged. The<br>
reduction mode is orthogonal to the minification and magnification filter<br>
parameters. The filter parameters are used to identify the set of texels<br>
used to produce a final filtered value; the reduction mode identifies how<br>
these texels are combined.<br>
<<a href="https://www.opengl.org/registry/specs/ARB/texture_filter_minmax.txt" rel="noreferrer" target="_blank">https://www.opengl.org/<wbr>registry/specs/ARB/texture_<wbr>filter_minmax.txt</a>><br>
<br>
Signed-off-by: Plamena Manolova <<a href="mailto:plamena.manolova@intel.com">plamena.manolova@intel.com</a>><br>
---<br>
docs/features.txt | 2 +-<br>
docs/relnotes/17.0.0.html | 1 +<br>
src/mesa/drivers/dri/i965/brw_<wbr>defines.h | 8 +++<br>
src/mesa/drivers/dri/i965/brw_<wbr>sampler_state.c | 31 ++++++++++--<br>
src/mesa/drivers/dri/i965/brw_<wbr>state.h | 3 +-<br>
src/mesa/drivers/dri/i965/<wbr>intel_extensions.c | 1 +<br>
src/mesa/main/extensions_<wbr>table.h | 1 +<br>
src/mesa/main/mtypes.h | 2 +<br>
src/mesa/main/samplerobj.c | 71 +++++++++++++++++++++++++++<br>
src/mesa/main/texobj.c | 1 +<br>
src/mesa/main/texparam.c | 35 +++++++++++++<br>
11 files changed, 151 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/docs/features.txt b/docs/features.txt<br>
index aff0016..da9d77a 100644<br>
--- a/docs/features.txt<br>
+++ b/docs/features.txt<br>
@@ -302,7 +302,7 @@ Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES ve<br>
GL_ARB_sparse_texture not started<br>
GL_ARB_sparse_texture2 not started<br>
GL_ARB_sparse_texture_clamp not started<br>
- GL_ARB_texture_filter_minmax not started<br>
+ GL_ARB_texture_filter_minmax DONE (i965/gen9+)<br>
GL_ARB_transform_feedback_<wbr>overflow_query not started<br>
GL_KHR_blend_equation_<wbr>advanced_coherent DONE (i965/gen9+)<br>
GL_KHR_no_error not started<br>
diff --git a/docs/relnotes/17.0.0.html b/docs/relnotes/17.0.0.html<br>
index 71fb4c3..eb6341b 100644<br>
--- a/docs/relnotes/17.0.0.html<br>
+++ b/docs/relnotes/17.0.0.html<br>
@@ -44,6 +44,7 @@ Note: some of the new features are only available with certain drivers.<br>
</p><br>
<br>
<ul><br>
+<li>GL_ARB_texture_filter_<wbr>minmax on i965/gen9+</li><br>
<li>GL_ARB_post_depth_coverage on i965/gen9+</li><br>
<li>GL_KHR_blend_equation_<wbr>advanced on nvc0</li><br>
<li>GL_INTEL_conservative_<wbr>rasterization on i965/gen9+</li><br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_defines.h b/src/mesa/drivers/dri/i965/<wbr>brw_defines.h<br>
index 3c5c6c4..c671bb0 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_defines.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_defines.h<br>
@@ -259,6 +259,11 @@<br>
#define BRW_RASTRULE_LOWER_LEFT 2<br>
#define BRW_RASTRULE_LOWER_RIGHT 3<br>
<br>
+#define BRW_REDUCTION_TYPE_STD_FILTER 0<br>
+#define BRW_REDUCTION_TYPE_COMPARISON 1<br>
+#define BRW_REDUCTION_TYPE_MINIMUM 2<br>
+#define BRW_REDUCTION_TYPE_MAXIMUM 3<br>
+<br>
#define BRW_RENDERTARGET_CLAMPRANGE_<wbr>UNORM 0<br>
#define BRW_RENDERTARGET_CLAMPRANGE_<wbr>SNORM 1<br>
#define BRW_RENDERTARGET_CLAMPRANGE_<wbr>FORMAT 2<br>
@@ -725,6 +730,8 @@<br>
/* SAMPLER_STATE DW2 - border color pointer */<br>
<br>
/* SAMPLER_STATE DW3 */<br>
+#define BRW_SAMPLER_REDUCTION_TYPE_<wbr>MASK INTEL_MASK(23, 22)<br>
+#define BRW_SAMPLER_REDUCTION_TYPE_<wbr>SHIFT 22<br>
#define BRW_SAMPLER_MAX_ANISOTROPY_<wbr>MASK INTEL_MASK(21, 19)<br>
#define BRW_SAMPLER_MAX_ANISOTROPY_<wbr>SHIFT 19<br>
#define BRW_SAMPLER_ADDRESS_ROUNDING_<wbr>MASK INTEL_MASK(18, 13)<br>
@@ -732,6 +739,7 @@<br>
#define GEN7_SAMPLER_NON_NORMALIZED_<wbr>COORDINATES (1 << 10)<br>
/* Gen7+ wrap modes reuse the same BRW_SAMPLER_TC*_WRAP_MODE enums. */<br>
#define GEN6_SAMPLER_NON_NORMALIZED_<wbr>COORDINATES (1 << 0)<br>
+#define BRW_SAMPLER_REDUCTION_TYPE_<wbr>ENABLE (1 << 9)<br>
<br>
enum brw_wrap_mode {<br>
BRW_TEXCOORDMODE_WRAP = 0,<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_sampler_state.c b/src/mesa/drivers/dri/i965/<wbr>brw_sampler_state.c<br>
index 412efb9..3a04283 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_sampler_state.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_sampler_state.c<br>
@@ -93,7 +93,8 @@ brw_emit_sampler_state(struct brw_context *brw,<br>
int lod_bias,<br>
unsigned shadow_function,<br>
bool non_normalized_coordinates,<br>
- uint32_t border_color_offset)<br>
+ uint32_t border_color_offset,<br>
+ unsigned reduction_type)<br>
{<br>
ss[0] = BRW_SAMPLER_LOD_PRECLAMP_<wbr>ENABLE |<br>
SET_FIELD(mip_filter, BRW_SAMPLER_MIP_FILTER) |<br>
@@ -128,6 +129,11 @@ brw_emit_sampler_state(struct brw_context *brw,<br>
<br>
if (non_normalized_coordinates)<br>
ss[3] |= GEN7_SAMPLER_NON_NORMALIZED_<wbr>COORDINATES;<br>
+<br>
+ if (reduction_type != 0) {<br>
+ ss[3] |= BRW_SAMPLER_REDUCTION_TYPE_<wbr>ENABLE;<br>
+ ss[3] |= SET_FIELD(reduction_type, BRW_SAMPLER_REDUCTION_TYPE);<br>
+ }<br>
} else {<br>
ss[0] |= SET_FIELD(lod_bias & 0x7ff, GEN4_SAMPLER_LOD_BIAS) |<br>
SET_FIELD(shadow_function, GEN4_SAMPLER_SHADOW_FUNCTION);<br>
@@ -399,7 +405,7 @@ brw_update_sampler_state(<wbr>struct brw_context *brw,<br>
uint32_t *sampler_state,<br>
uint32_t batch_offset_for_sampler_<wbr>state)<br>
{<br>
- unsigned min_filter, mag_filter, mip_filter;<br>
+ unsigned min_filter, mag_filter, mip_filter, reduction_type;<br>
<br>
/* Select min and mip filters. */<br>
switch (sampler->MinFilter) {<br>
@@ -431,6 +437,24 @@ brw_update_sampler_state(<wbr>struct brw_context *brw,<br>
unreachable("not reached");<br>
}<br>
<br>
+ if (brw->ctx.Extensions.ARB_<wbr>texture_filter_minmax) {<br>
+ switch (sampler-><wbr>TextureReductionMode) {<br>
+ case GL_WEIGHTED_AVERAGE_ARB:<br>
+ reduction_type = BRW_REDUCTION_TYPE_STD_FILTER;<br>
+ break;<br>
+ case GL_MIN:<br>
+ reduction_type = BRW_REDUCTION_TYPE_MINIMUM;<br>
+ break;<br>
+ case GL_MAX:<br>
+ reduction_type = BRW_REDUCTION_TYPE_MAXIMUM;<br>
+ break;<br>
+ default:<br>
+ unreachable("not reached");<br>
+ }<br>
+ } else {<br>
+ reduction_type = 0;<br>
+ }<br>
+<br>
/* Select mag filter. */<br>
if (sampler->MagFilter == GL_LINEAR)<br>
mag_filter = BRW_MAPFILTER_LINEAR;<br>
@@ -533,7 +557,8 @@ brw_update_sampler_state(<wbr>struct brw_context *brw,<br>
min_lod, max_lod, lod_bias,<br>
shadow_function,<br>
non_normalized_coords,<br>
- border_color_offset);<br>
+ border_color_offset,<br>
+ reduction_type);<br>
}<br>
<br>
static void<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_state.h b/src/mesa/drivers/dri/i965/<wbr>brw_state.h<br>
index f2349d8..19a49bd 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_state.h<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_state.h<br>
@@ -340,7 +340,8 @@ void brw_emit_sampler_state(struct brw_context *brw,<br>
int lod_bias,<br>
unsigned shadow_function,<br>
bool non_normalized_coordinates,<br>
- uint32_t border_color_offset);<br>
+ uint32_t border_color_offset,<br>
+ unsigned reduction_type);<br>
<br>
/* gen6_wm_state.c */<br>
void<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c b/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
index f1290bf..9fb272e 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
@@ -277,6 +277,7 @@ intelInitExtensions(struct gl_context *ctx)<br>
ctx->Extensions.INTEL_<wbr>conservative_rasterization = true;<br>
ctx->Extensions.MESA_shader_<wbr>framebuffer_fetch = true;<br>
ctx->Extensions.ARB_post_<wbr>depth_coverage = true;<br>
+ ctx->Extensions.ARB_texture_<wbr>filter_minmax = true;<br>
}<br>
<br>
if (ctx->API == API_OPENGL_CORE)<br>
diff --git a/src/mesa/main/extensions_<wbr>table.h b/src/mesa/main/extensions_<wbr>table.h<br>
index 91918c2..dbff6ad 100644<br>
--- a/src/mesa/main/extensions_<wbr>table.h<br>
+++ b/src/mesa/main/extensions_<wbr>table.h<br>
@@ -142,6 +142,7 @@ EXT(ARB_texture_env_add , dummy_true<br>
EXT(ARB_texture_env_combine , ARB_texture_env_combine , GLL, x , x , x , 2001)<br>
EXT(ARB_texture_env_crossbar , ARB_texture_env_crossbar , GLL, x , x , x , 2001)<br>
EXT(ARB_texture_env_dot3 , ARB_texture_env_dot3 , GLL, x , x , x , 2001)<br>
+EXT(ARB_texture_filter_minmax , ARB_texture_filter_minmax , GLL, GLC, x , x , 2015)<br>
EXT(ARB_texture_float , ARB_texture_float , GLL, GLC, x , x , 2004)<br>
EXT(ARB_texture_gather , ARB_texture_gather , GLL, GLC, x , x , 2009)<br>
EXT(ARB_texture_mirror_clamp_<wbr>to_edge , ARB_texture_mirror_clamp_to_<wbr>edge , GLL, GLC, x , x , 2013)<br>
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h<br>
index b0a97b3..ab6c9da 100644<br>
--- a/src/mesa/main/mtypes.h<br>
+++ b/src/mesa/main/mtypes.h<br>
@@ -973,6 +973,7 @@ struct gl_sampler_object<br>
GLenum CompareFunc; /**< GL_ARB_shadow */<br>
GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */<br>
GLboolean CubeMapSeamless; /**< GL_AMD_seamless_cubemap_per_<wbr>texture */<br>
+ GLenum TextureReductionMode; /**< GL_TEXTURE_REDUCTION_MODE_ARB */<br>
};<br>
<br>
<br>
@@ -3835,6 +3836,7 @@ struct gl_extensions<br>
GLboolean ARB_texture_env_combine;<br>
GLboolean ARB_texture_env_crossbar;<br>
GLboolean ARB_texture_env_dot3;<br>
+ GLboolean ARB_texture_filter_minmax;<br>
GLboolean ARB_texture_float;<br>
GLboolean ARB_texture_gather;<br>
GLboolean ARB_texture_mirror_clamp_to_<wbr>edge;<br>
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c<br>
index 2118f0e..d1bc818 100644<br>
--- a/src/mesa/main/samplerobj.c<br>
+++ b/src/mesa/main/samplerobj.c<br>
@@ -162,6 +162,7 @@ _mesa_init_sampler_object(<wbr>struct gl_sampler_object *sampObj, GLuint name)<br>
sampObj->CompareFunc = GL_LEQUAL;<br>
sampObj->sRGBDecode = GL_DECODE_EXT;<br>
sampObj->CubeMapSeamless = GL_FALSE;<br>
+ sampObj->TextureReductionMode = GL_WEIGHTED_AVERAGE_ARB;<br>
}<br>
<br>
/**<br>
@@ -646,6 +647,26 @@ set_sampler_border_colorui(<wbr>struct gl_context *ctx,<br>
return GL_TRUE;<br>
}<br>
<br>
+static GLuint<br>
+set_sampler_texture_<wbr>reduction_mode(struct gl_context *ctx,<br>
+ struct gl_sampler_object *samp,<br>
+ GLint param)<br>
+{<br>
+ if (samp->TextureReductionMode == param)<br>
+ return GL_FALSE;<br>
+<br>
+ switch (param) {<br>
+ case GL_WEIGHTED_AVERAGE_ARB:<br>
+ case GL_MIN:<br>
+ case GL_MAX:<br>
+ flush(ctx);<br>
+ samp->TextureReductionMode = param;<br>
+ return GL_TRUE;<br>
+ default:<br>
+ return INVALID_PARAM;<br>
+ }<br>
+<br>
+}<br>
<br>
static GLuint<br>
set_sampler_min_lod(struct gl_context *ctx, struct gl_sampler_object *samp,<br>
@@ -857,6 +878,11 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)<br>
case GL_TEXTURE_SRGB_DECODE_EXT:<br>
res = set_sampler_srgb_decode(ctx, sampObj, param);<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (ctx->Extensions.ARB_texture_<wbr>filter_minmax) {<br>
+ res = set_sampler_texture_reduction_<wbr>mode(ctx, sampObj, param);<br>
+ break;<br>
+ }<br>
case GL_TEXTURE_BORDER_COLOR:<br>
/* fall-through */<br>
default:<br>
@@ -948,6 +974,11 @@ _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)<br>
case GL_TEXTURE_SRGB_DECODE_EXT:<br>
res = set_sampler_srgb_decode(ctx, sampObj, (GLenum) param);<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (ctx->Extensions.ARB_texture_<wbr>filter_minmax) {<br>
+ res = set_sampler_texture_reduction_<wbr>mode(ctx, sampObj, (GLint) param);<br>
+ break;<br>
+ }<br>
case GL_TEXTURE_BORDER_COLOR:<br>
/* fall-through */<br>
default:<br>
@@ -1047,6 +1078,11 @@ _mesa_SamplerParameteriv(<wbr>GLuint sampler, GLenum pname, const GLint *params)<br>
res = set_sampler_border_colorf(ctx, sampObj, c);<br>
}<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (ctx->Extensions.ARB_texture_<wbr>filter_minmax) {<br>
+ res = set_sampler_texture_reduction_<wbr>mode(ctx, sampObj, params[0]);<br>
+ break;<br>
+ }<br>
default:<br>
res = INVALID_PNAME;<br>
}<br>
@@ -1138,6 +1174,11 @@ _mesa_SamplerParameterfv(<wbr>GLuint sampler, GLenum pname, const GLfloat *params)<br>
case GL_TEXTURE_BORDER_COLOR:<br>
res = set_sampler_border_colorf(ctx, sampObj, params);<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (ctx->Extensions.ARB_texture_<wbr>filter_minmax) {<br>
+ res = set_sampler_texture_reduction_<wbr>mode(ctx, sampObj, (GLint) params[0]);<br>
+ break;<br>
+ }<br>
default:<br>
res = INVALID_PNAME;<br>
}<br>
@@ -1223,6 +1264,11 @@ _mesa_SamplerParameterIiv(<wbr>GLuint sampler, GLenum pname, const GLint *params)<br>
case GL_TEXTURE_BORDER_COLOR:<br>
res = set_sampler_border_colori(ctx, sampObj, params);<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (ctx->Extensions.ARB_texture_<wbr>filter_minmax) {<br>
+ res = set_sampler_texture_reduction_<wbr>mode(ctx, sampObj, params[0]);<br>
+ break;<br>
+ }<br>
default:<br>
res = INVALID_PNAME;<br>
}<br>
@@ -1309,6 +1355,11 @@ _mesa_SamplerParameterIuiv(<wbr>GLuint sampler, GLenum pname, const GLuint *params)<br>
case GL_TEXTURE_BORDER_COLOR:<br>
res = set_sampler_border_colorui(<wbr>ctx, sampObj, params);<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (ctx->Extensions.ARB_texture_<wbr>filter_minmax) {<br>
+ res = set_sampler_texture_reduction_<wbr>mode(ctx, sampObj, params[0]);<br>
+ break;<br>
+ }<br>
default:<br>
res = INVALID_PNAME;<br>
}<br>
@@ -1419,6 +1470,11 @@ _mesa_GetSamplerParameteriv(<wbr>GLuint sampler, GLenum pname, GLint *params)<br>
goto invalid_pname;<br>
*params = (GLenum) sampObj->sRGBDecode;<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (!ctx->Extensions.ARB_texture_<wbr>filter_minmax)<br>
+ goto invalid_pname;<br>
+ *params = sampObj->TextureReductionMode;<br>
+ break;<br>
default:<br>
goto invalid_pname;<br>
}<br>
@@ -1499,6 +1555,11 @@ _mesa_GetSamplerParameterfv(<wbr>GLuint sampler, GLenum pname, GLfloat *params)<br>
goto invalid_pname;<br>
*params = (GLfloat) sampObj->sRGBDecode;<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (!ctx->Extensions.ARB_texture_<wbr>filter_minmax)<br>
+ goto invalid_pname;<br>
+ *params = (GLfloat) sampObj->TextureReductionMode;<br>
+ break;<br>
default:<br>
goto invalid_pname;<br>
}<br>
@@ -1574,6 +1635,11 @@ _mesa_GetSamplerParameterIiv(<wbr>GLuint sampler, GLenum pname, GLint *params)<br>
goto invalid_pname;<br>
*params = (GLenum) sampObj->sRGBDecode;<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (!ctx->Extensions.ARB_texture_<wbr>filter_minmax)<br>
+ goto invalid_pname;<br>
+ *params = (GLint) sampObj->TextureReductionMode;<br>
+ break;<br>
default:<br>
goto invalid_pname;<br>
}<br>
@@ -1649,6 +1715,11 @@ _mesa_GetSamplerParameterIuiv(<wbr>GLuint sampler, GLenum pname, GLuint *params)<br>
goto invalid_pname;<br>
*params = (GLenum) sampObj->sRGBDecode;<br>
break;<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (!ctx->Extensions.ARB_texture_<wbr>filter_minmax)<br>
+ goto invalid_pname;<br>
+ *params = sampObj->TextureReductionMode;<br>
+ break;<br>
default:<br>
goto invalid_pname;<br>
}<br>
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c<br>
index 25b959d..9a69c38 100644<br>
--- a/src/mesa/main/texobj.c<br>
+++ b/src/mesa/main/texobj.c<br>
@@ -333,6 +333,7 @@ _mesa_initialize_texture_<wbr>object( struct gl_context *ctx,<br>
obj->BufferObjectFormat = GL_R8;<br>
obj->_BufferObjectFormat = MESA_FORMAT_R_UNORM8;<br>
obj-><wbr>ImageFormatCompatibilityType = GL_IMAGE_FORMAT_COMPATIBILITY_<wbr>BY_SIZE;<br>
+ obj->Sampler.<wbr>TextureReductionMode = GL_WEIGHTED_AVERAGE_ARB;<br>
}<br>
<br>
<br>
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c<br>
index 4db406f..fab7b43 100644<br>
--- a/src/mesa/main/texparam.c<br>
+++ b/src/mesa/main/texparam.c<br>
@@ -480,6 +480,28 @@ set_tex_parameteri(struct gl_context *ctx,<br>
}<br>
goto invalid_pname;<br>
<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (ctx->Extensions.ARB_texture_<wbr>filter_minmax) {<br>
+<br>
+ if (!_mesa_target_allows_setting_<wbr>sampler_parameters(texObj-><wbr>Target))<br>
+ goto invalid_enum;<br>
+<br>
+ if (texObj->Sampler.<wbr>TextureReductionMode == params[0])<br>
+ return GL_FALSE;<br>
+<br>
+ switch (params[0]) {<br>
+ case GL_WEIGHTED_AVERAGE_ARB:<br>
+ case GL_MIN:<br>
+ case GL_MAX:<br>
+ flush(ctx);<br>
+ texObj->Sampler.<wbr>TextureReductionMode = params[0];<br>
+ return GL_TRUE;<br>
+ default:<br>
+ goto invalid_param;<br>
+ }<br>
+ }<br>
+ goto invalid_pname;<br>
+<br>
case GL_DEPTH_TEXTURE_MODE_ARB:<br>
/* GL_DEPTH_TEXTURE_MODE_ARB is removed in core-profile and it has never<br>
* existed in OpenGL ES.<br>
@@ -781,6 +803,7 @@ _mesa_texture_parameterf(<wbr>struct gl_context *ctx,<br>
case GL_TEXTURE_SWIZZLE_G_EXT:<br>
case GL_TEXTURE_SWIZZLE_B_EXT:<br>
case GL_TEXTURE_SWIZZLE_A_EXT:<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
{<br>
GLint p[4];<br>
p[0] = (param > 0) ?<br>
@@ -833,6 +856,7 @@ _mesa_texture_parameterfv(<wbr>struct gl_context *ctx,<br>
case GL_DEPTH_STENCIL_TEXTURE_MODE:<br>
case GL_TEXTURE_SRGB_DECODE_EXT:<br>
case GL_TEXTURE_CUBE_MAP_SEAMLESS:<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
{<br>
/* convert float param to int */<br>
GLint p[4];<br>
@@ -1992,6 +2016,12 @@ get_tex_parameterfv(struct gl_context *ctx,<br>
*params = ENUM_TO_FLOAT(obj->Target);<br>
break;<br>
<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (!ctx->Extensions.ARB_texture_<wbr>filter_minmax)<br>
+ goto invalid_pname;<br>
+ *params = (GLfloat) obj->Sampler.<wbr>TextureReductionMode;<br>
+ break;<br>
+<br>
default:<br>
goto invalid_pname;<br>
}<br>
@@ -2224,6 +2254,11 @@ get_tex_parameteriv(struct gl_context *ctx,<br>
*params = (GLint) obj->Target;<br>
break;<br>
<br>
+ case GL_TEXTURE_REDUCTION_MODE_ARB:<br>
+ if (!ctx->Extensions.ARB_texture_<wbr>filter_minmax)<br>
+ goto invalid_pname;<br>
+ *params = (GLint) obj->Sampler.<wbr>TextureReductionMode;<br>
+ break;<br>
default:<br>
goto invalid_pname;<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.4.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>