1 // Copyright 2016 The SwiftShader Authors. All Rights Reserved.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
18 #include "Common/Types.hpp"
20 #define PERF_HUD 0 // Display time spent on vertex, setup and pixel processing for each thread
21 #define PERF_PROFILE 0 // Profile various pipeline stages and display the timing in SwiftConfig
24 #define S3TC_SUPPORT 1
26 #define S3TC_SUPPORT 0
29 // Worker thread count when not set by SwiftConfig
30 // 0 = process affinity count (recommended)
31 // 1 = rendering on main thread (no worker threads), useful for debugging
32 #ifndef DEFAULT_THREAD_COUNT
33 #define DEFAULT_THREAD_COUNT 0
62 double cycles[PERF_TIMERS];
64 int64_t ropOperations;
65 int64_t ropOperationsTotal;
66 int64_t ropOperationsFrame;
68 int64_t texOperations;
69 int64_t texOperationsTotal;
70 int64_t texOperationsFrame;
72 int64_t compressedTex;
73 int64_t compressedTexTotal;
74 int64_t compressedTexFrame;
78 extern Profiler profiler;
82 OUTLINE_RESOLUTION = 4096, // Maximum vertical resolution of the render target
84 VERTEX_ATTRIBUTES = 16,
85 TEXTURE_IMAGE_UNITS = 16,
86 VERTEX_TEXTURE_IMAGE_UNITS = 16,
87 TOTAL_IMAGE_UNITS = TEXTURE_IMAGE_UNITS + VERTEX_TEXTURE_IMAGE_UNITS,
88 FRAGMENT_UNIFORM_VECTORS = 224,
89 VERTEX_UNIFORM_VECTORS = 256,
90 MAX_VERTEX_OUTPUTS = 12,
91 MAX_FRAGMENT_INPUTS = 10,
92 MAX_FRAGMENT_UNIFORM_BLOCKS = 12,
93 MAX_VERTEX_UNIFORM_BLOCKS = 12,
94 MAX_UNIFORM_BUFFER_BINDINGS = MAX_FRAGMENT_UNIFORM_BLOCKS + MAX_VERTEX_UNIFORM_BLOCKS, // Limited to 127 by SourceParameter.bufferIndex in Shader.hpp
95 MAX_UNIFORM_BLOCK_SIZE = 16384,
97 MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 64,
98 MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 64,
103 #endif // sw_Config_hpp