nvc0: enable minmax reductions on gm200+
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487>
This commit is contained in:
parent
41aad1c120
commit
987fef5f0e
3 changed files with 21 additions and 8 deletions
|
|
@ -4,17 +4,17 @@
|
|||
/* Autogenerated file, DO NOT EDIT manually!
|
||||
|
||||
This file was generated by the rules-ng-ng headergen tool in this git repository:
|
||||
http://github.com/envytools/envytools/
|
||||
https://github.com/envytools/envytools/
|
||||
git clone https://github.com/envytools/envytools.git
|
||||
|
||||
The rules-ng-ng source files this header was generated from are:
|
||||
- /home/skeggsb/git/envytools/rnndb/../rnndb/graph/g80_texture.xml ( 18837 bytes, from 2016-01-14 23:54:22)
|
||||
- /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6456 bytes, from 2015-09-10 02:57:40)
|
||||
- /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 2908 bytes, from 2016-02-02 23:45:00)
|
||||
- /home/skeggsb/git/envytools/rnndb/g80_defs.xml ( 21739 bytes, from 2016-02-04 00:29:42)
|
||||
- /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 5388 bytes, from 2016-01-14 23:54:22)
|
||||
- envytools/rnndb/./graph/g80_texture.xml ( 19104 bytes, from 2021-03-09 21:53:05)
|
||||
- envytools/rnndb/copyright.xml ( 6431 bytes, from 2021-03-01 01:32:28)
|
||||
- envytools/rnndb-generated/nvchipsets.xml ( 3335 bytes, from 2020-04-11 17:28:38)
|
||||
- envytools/rnndb/g80_defs.xml ( 21781 bytes, from 2021-03-09 21:57:03)
|
||||
- envytools/rnndb/nv_defs.xml ( 5522 bytes, from 2021-03-01 01:32:28)
|
||||
|
||||
Copyright (C) 2006-2016 by the following authors:
|
||||
Copyright (C) 2006-2021 by the following authors:
|
||||
- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
|
||||
- Ben Skeggs (darktama, darktama_)
|
||||
- B. R. <koala_br@users.sourceforge.net> (koala_br)
|
||||
|
|
@ -32,7 +32,7 @@ Copyright (C) 2006-2016 by the following authors:
|
|||
- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
|
||||
- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
|
||||
- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
|
||||
- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
|
||||
- Marcelina Kościelnicka <mwk@0x04.net> (mwk)
|
||||
- Mark Carey <mark.carey@gmail.com> (careym)
|
||||
- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
|
||||
- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
|
||||
|
|
@ -405,6 +405,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#define G80_TSC_1_MIP_FILTER_NEAREST 0x00000080
|
||||
#define G80_TSC_1_MIP_FILTER_LINEAR 0x000000c0
|
||||
#define GK104_TSC_1_CUBEMAP_INTERFACE_FILTERING 0x00000200
|
||||
#define GM204_TSC_1_REDUCTION_MODE__MASK 0x00000c00
|
||||
#define GM204_TSC_1_REDUCTION_MODE__SHIFT 10
|
||||
#define GM204_TSC_1_REDUCTION_MODE_WEIGHTED_AVERAGE 0x00000000
|
||||
#define GM204_TSC_1_REDUCTION_MODE_MIN 0x00000400
|
||||
#define GM204_TSC_1_REDUCTION_MODE_MAX 0x00000800
|
||||
#define G80_TSC_1_MIP_LOD_BIAS__MASK 0x01fff000
|
||||
#define G80_TSC_1_MIP_LOD_BIAS__SHIFT 12
|
||||
#define G80_TSC_1_MIP_LOD_BIAS__RADIX 0x00000008
|
||||
|
|
|
|||
|
|
@ -536,6 +536,13 @@ nv50_sampler_state_create(struct pipe_context *pipe,
|
|||
so->seamless_cube_map = cso->seamless_cube_map;
|
||||
}
|
||||
|
||||
if (nouveau_screen(pipe->screen)->class_3d >= GM200_3D_CLASS) {
|
||||
if (cso->reduction_mode == PIPE_TEX_REDUCTION_MIN)
|
||||
so->tsc[1] |= GM204_TSC_1_REDUCTION_MODE_MIN;
|
||||
if (cso->reduction_mode == PIPE_TEX_REDUCTION_MAX)
|
||||
so->tsc[1] |= GM204_TSC_1_REDUCTION_MODE_MAX;
|
||||
}
|
||||
|
||||
if (cso->max_anisotropy >= 16)
|
||||
so->tsc[0] |= (7 << 20);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -323,6 +323,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
|
||||
case PIPE_CAP_VIEWPORT_SWIZZLE:
|
||||
case PIPE_CAP_VIEWPORT_MASK:
|
||||
case PIPE_CAP_SAMPLER_REDUCTION_MINMAX:
|
||||
return class_3d >= GM200_3D_CLASS;
|
||||
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
|
||||
return class_3d >= GP100_3D_CLASS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue