1*b05fa564SZack Rusin /* SPDX-License-Identifier: GPL-2.0 OR MIT */ 2*b05fa564SZack Rusin /* 3ebc9ac7cSZack Rusin * Copyright 2012-2021 VMware, Inc. 48ce75f8aSSinclair Yeh * 58ce75f8aSSinclair Yeh * Permission is hereby granted, free of charge, to any person 68ce75f8aSSinclair Yeh * obtaining a copy of this software and associated documentation 78ce75f8aSSinclair Yeh * files (the "Software"), to deal in the Software without 88ce75f8aSSinclair Yeh * restriction, including without limitation the rights to use, copy, 98ce75f8aSSinclair Yeh * modify, merge, publish, distribute, sublicense, and/or sell copies 108ce75f8aSSinclair Yeh * of the Software, and to permit persons to whom the Software is 118ce75f8aSSinclair Yeh * furnished to do so, subject to the following conditions: 128ce75f8aSSinclair Yeh * 138ce75f8aSSinclair Yeh * The above copyright notice and this permission notice shall be 148ce75f8aSSinclair Yeh * included in all copies or substantial portions of the Software. 158ce75f8aSSinclair Yeh * 168ce75f8aSSinclair Yeh * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 178ce75f8aSSinclair Yeh * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 188ce75f8aSSinclair Yeh * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 198ce75f8aSSinclair Yeh * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 208ce75f8aSSinclair Yeh * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 218ce75f8aSSinclair Yeh * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 228ce75f8aSSinclair Yeh * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 238ce75f8aSSinclair Yeh * SOFTWARE. 248ce75f8aSSinclair Yeh * 25*b05fa564SZack Rusin */ 268ce75f8aSSinclair Yeh 278ce75f8aSSinclair Yeh /* 288ce75f8aSSinclair Yeh * svga3d_limits.h -- 298ce75f8aSSinclair Yeh * 308ce75f8aSSinclair Yeh * SVGA 3d hardware limits 318ce75f8aSSinclair Yeh */ 328ce75f8aSSinclair Yeh 33ebc9ac7cSZack Rusin 34ebc9ac7cSZack Rusin 358ce75f8aSSinclair Yeh #ifndef _SVGA3D_LIMITS_H_ 368ce75f8aSSinclair Yeh #define _SVGA3D_LIMITS_H_ 378ce75f8aSSinclair Yeh 38ebc9ac7cSZack Rusin #define SVGA3D_HB_MAX_CONTEXT_IDS 256 39ebc9ac7cSZack Rusin #define SVGA3D_HB_MAX_SURFACE_IDS (32 * 1024) 408ce75f8aSSinclair Yeh 41ebc9ac7cSZack Rusin #define SVGA3D_DX_MAX_RENDER_TARGETS 8 42ebc9ac7cSZack Rusin #define SVGA3D_DX11_MAX_UAVIEWS 8 430651dfabSDeepak Rawat #define SVGA3D_DX11_1_MAX_UAVIEWS 64 44ebc9ac7cSZack Rusin #define SVGA3D_MAX_UAVIEWS (SVGA3D_DX11_1_MAX_UAVIEWS) 45ebc9ac7cSZack Rusin #define SVGA3D_DX11_MAX_SIMULTANEOUS_RTUAV (SVGA3D_DX11_MAX_UAVIEWS) 46ebc9ac7cSZack Rusin #define SVGA3D_DX11_1_MAX_SIMULTANEOUS_RTUAV (SVGA3D_DX11_1_MAX_UAVIEWS) 47ebc9ac7cSZack Rusin #define SVGA3D_MAX_SIMULTANEOUS_RTUAV (SVGA3D_MAX_UAVIEWS) 480651dfabSDeepak Rawat 490651dfabSDeepak Rawat #define SVGA3D_HB_MAX_SURFACE_SIZE MBYTES_2_BYTES(128) 508ce75f8aSSinclair Yeh 518ce75f8aSSinclair Yeh #define SVGA3D_MAX_SHADERIDS 5000 52ebc9ac7cSZack Rusin 538ce75f8aSSinclair Yeh #define SVGA3D_MAX_SIMULTANEOUS_SHADERS 20000 548ce75f8aSSinclair Yeh 558ce75f8aSSinclair Yeh #define SVGA3D_NUM_TEXTURE_UNITS 32 568ce75f8aSSinclair Yeh #define SVGA3D_NUM_LIGHTS 8 578ce75f8aSSinclair Yeh 580651dfabSDeepak Rawat #define SVGA3D_MAX_VIDEOPROCESSOR_SAMPLERS 32 590651dfabSDeepak Rawat 60dc75e733SDeepak Rawat #define SVGA3D_MAX_SHADER_MEMORY_BYTES (8 * 1024 * 1024) 61ebc9ac7cSZack Rusin #define SVGA3D_MAX_SHADER_MEMORY \ 62ebc9ac7cSZack Rusin (SVGA3D_MAX_SHADER_MEMORY_BYTES / sizeof(uint32)) 638ce75f8aSSinclair Yeh 640651dfabSDeepak Rawat #define SVGA3D_MAX_SHADER_THREAD_GROUPS 65535 650651dfabSDeepak Rawat 668ce75f8aSSinclair Yeh #define SVGA3D_MAX_CLIP_PLANES 6 678ce75f8aSSinclair Yeh 688ce75f8aSSinclair Yeh #define SVGA3D_MAX_TEXTURE_COORDS 8 698ce75f8aSSinclair Yeh 708ce75f8aSSinclair Yeh #define SVGA3D_MAX_SURFACE_FACES 6 718ce75f8aSSinclair Yeh 720651dfabSDeepak Rawat #define SVGA3D_SM4_MAX_SURFACE_ARRAYSIZE 512 730651dfabSDeepak Rawat #define SVGA3D_SM5_MAX_SURFACE_ARRAYSIZE 2048 740651dfabSDeepak Rawat #define SVGA3D_MAX_SURFACE_ARRAYSIZE SVGA3D_SM5_MAX_SURFACE_ARRAYSIZE 758ce75f8aSSinclair Yeh 768ce75f8aSSinclair Yeh #define SVGA3D_MAX_VERTEX_ARRAYS 32 778ce75f8aSSinclair Yeh 788ce75f8aSSinclair Yeh #define SVGA3D_MAX_DRAW_PRIMITIVE_RANGES 32 798ce75f8aSSinclair Yeh 800651dfabSDeepak Rawat #define SVGA3D_MAX_SAMPLES 8 810651dfabSDeepak Rawat 82ebc9ac7cSZack Rusin #define SVGA3D_MIN_SBX_DATA_SIZE (GBYTES_2_BYTES(1)) 83ebc9ac7cSZack Rusin #define SVGA3D_MAX_SBX_DATA_SIZE (GBYTES_2_BYTES(4)) 84ebc9ac7cSZack Rusin 85*b05fa564SZack Rusin #define SVGA3D_MIN_SBX_DATA_SIZE_DVM (MBYTES_2_BYTES(900)) 86*b05fa564SZack Rusin #define SVGA3D_MAX_SBX_DATA_SIZE_DVM (MBYTES_2_BYTES(910)) 87ebc9ac7cSZack Rusin #endif 88