Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 1 | // Copyright 2016 The SwiftShader Authors. All Rights Reserved. |
| 2 | // |
| 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 |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 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. |
| 14 | |
| 15 | #ifndef sw_PixelProcessor_hpp |
| 16 | #define sw_PixelProcessor_hpp |
| 17 | |
| 18 | #include "Context.hpp" |
| 19 | #include "RoutineCache.hpp" |
| 20 | |
| 21 | namespace sw |
| 22 | { |
| 23 | class PixelShader; |
| 24 | class Rasterizer; |
| 25 | struct Texture; |
| 26 | struct DrawData; |
| 27 | |
| 28 | class PixelProcessor |
| 29 | { |
| 30 | public: |
Nicolas Capens | 92eb041 | 2019-08-20 14:13:17 -0400 | [diff] [blame] | 31 | struct States : Memset<States> |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 32 | { |
Nicolas Capens | 92eb041 | 2019-08-20 14:13:17 -0400 | [diff] [blame] | 33 | States() : Memset(this, 0) {} |
| 34 | |
| 35 | uint32_t computeHash(); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 36 | |
| 37 | int shaderID; |
| 38 | |
Nicolas Capens | ac6d505 | 2018-01-05 15:34:00 -0500 | [diff] [blame] | 39 | bool depthOverride : 1; // TODO: Eliminate by querying shader. |
| 40 | bool shaderContainsKill : 1; // TODO: Eliminate by querying shader. |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 41 | |
| 42 | DepthCompareMode depthCompareMode : BITS(DEPTH_LAST); |
| 43 | AlphaCompareMode alphaCompareMode : BITS(ALPHA_LAST); |
| 44 | bool depthWriteEnable : 1; |
| 45 | bool quadLayoutDepthBuffer : 1; |
| 46 | |
| 47 | bool stencilActive : 1; |
| 48 | StencilCompareMode stencilCompareMode : BITS(STENCIL_LAST); |
| 49 | StencilOperation stencilFailOperation : BITS(OPERATION_LAST); |
| 50 | StencilOperation stencilPassOperation : BITS(OPERATION_LAST); |
| 51 | StencilOperation stencilZFailOperation : BITS(OPERATION_LAST); |
| 52 | bool noStencilMask : 1; |
| 53 | bool noStencilWriteMask : 1; |
| 54 | bool stencilWriteMasked : 1; |
| 55 | bool twoSidedStencil : 1; |
| 56 | StencilCompareMode stencilCompareModeCCW : BITS(STENCIL_LAST); |
| 57 | StencilOperation stencilFailOperationCCW : BITS(OPERATION_LAST); |
| 58 | StencilOperation stencilPassOperationCCW : BITS(OPERATION_LAST); |
| 59 | StencilOperation stencilZFailOperationCCW : BITS(OPERATION_LAST); |
| 60 | bool noStencilMaskCCW : 1; |
| 61 | bool noStencilWriteMaskCCW : 1; |
| 62 | bool stencilWriteMaskedCCW : 1; |
| 63 | |
| 64 | bool depthTestActive : 1; |
| 65 | bool fogActive : 1; |
| 66 | FogMode pixelFogMode : BITS(FOG_LAST); |
| 67 | bool specularAdd : 1; |
| 68 | bool occlusionEnabled : 1; |
| 69 | bool wBasedFog : 1; |
| 70 | bool perspective : 1; |
Nicolas Capens | 3cbeac5 | 2017-09-15 11:49:31 -0400 | [diff] [blame] | 71 | bool depthClamp : 1; |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 72 | |
| 73 | bool alphaBlendActive : 1; |
| 74 | BlendFactor sourceBlendFactor : BITS(BLEND_LAST); |
| 75 | BlendFactor destBlendFactor : BITS(BLEND_LAST); |
| 76 | BlendOperation blendOperation : BITS(BLENDOP_LAST); |
| 77 | BlendFactor sourceBlendFactorAlpha : BITS(BLEND_LAST); |
| 78 | BlendFactor destBlendFactorAlpha : BITS(BLEND_LAST); |
| 79 | BlendOperation blendOperationAlpha : BITS(BLENDOP_LAST); |
| 80 | |
| 81 | unsigned int colorWriteMask : RENDERTARGETS * 4; // Four component bit masks |
| 82 | Format targetFormat[RENDERTARGETS]; |
| 83 | bool writeSRGB : 1; |
| 84 | unsigned int multiSample : 3; |
| 85 | unsigned int multiSampleMask : 4; |
| 86 | TransparencyAntialiasing transparencyAntialiasing : BITS(TRANSPARENCY_LAST); |
| 87 | bool centroid : 1; |
Nicolas Capens | dd4c863 | 2018-07-31 15:33:28 -0400 | [diff] [blame] | 88 | bool frontFaceCCW : 1; |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 89 | |
| 90 | LogicalOperation logicalOperation : BITS(LOGICALOP_LAST); |
| 91 | |
| 92 | Sampler::State sampler[TEXTURE_IMAGE_UNITS]; |
| 93 | TextureStage::State textureStage[8]; |
| 94 | |
| 95 | struct Interpolant |
| 96 | { |
| 97 | unsigned char component : 4; |
| 98 | unsigned char flat : 4; |
| 99 | unsigned char project : 2; |
| 100 | bool centroid : 1; |
| 101 | }; |
| 102 | |
| 103 | union |
| 104 | { |
| 105 | struct |
| 106 | { |
| 107 | Interpolant color[2]; |
| 108 | Interpolant texture[8]; |
Nicolas Capens | 3b4c93f | 2016-05-18 12:51:37 -0400 | [diff] [blame] | 109 | Interpolant fog; |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 110 | }; |
| 111 | |
Nicolas Capens | 3b4c93f | 2016-05-18 12:51:37 -0400 | [diff] [blame] | 112 | Interpolant interpolant[MAX_FRAGMENT_INPUTS]; |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 113 | }; |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 114 | }; |
| 115 | |
| 116 | struct State : States |
| 117 | { |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 118 | bool operator==(const State &state) const; |
| 119 | |
| 120 | int colorWriteActive(int index) const |
| 121 | { |
| 122 | return (colorWriteMask >> (index * 4)) & 0xF; |
| 123 | } |
| 124 | |
| 125 | bool alphaTestActive() const |
| 126 | { |
Alexis Hetu | a9beed3 | 2016-12-13 16:48:01 -0500 | [diff] [blame] | 127 | return (alphaCompareMode != ALPHA_ALWAYS) || (transparencyAntialiasing != TRANSPARENCY_NONE); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | bool pixelFogActive() const |
| 131 | { |
| 132 | return pixelFogMode != FOG_NONE; |
| 133 | } |
| 134 | |
Nicolas Capens | 92eb041 | 2019-08-20 14:13:17 -0400 | [diff] [blame] | 135 | uint32_t hash; |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 136 | }; |
| 137 | |
| 138 | struct Stencil |
| 139 | { |
| 140 | int64_t testMaskQ; |
| 141 | int64_t referenceMaskedQ; |
| 142 | int64_t referenceMaskedSignedQ; |
| 143 | int64_t writeMaskQ; |
| 144 | int64_t invWriteMaskQ; |
| 145 | int64_t referenceQ; |
| 146 | |
| 147 | void set(int reference, int testMask, int writeMask) |
| 148 | { |
| 149 | referenceQ = replicate(reference); |
| 150 | testMaskQ = replicate(testMask); |
| 151 | writeMaskQ = replicate(writeMask); |
| 152 | invWriteMaskQ = ~writeMaskQ; |
| 153 | referenceMaskedQ = referenceQ & testMaskQ; |
Nicolas Capens | a28d04b | 2017-09-11 12:19:51 -0400 | [diff] [blame] | 154 | referenceMaskedSignedQ = replicate(((reference & testMask) + 0x80) & 0xFF); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | static int64_t replicate(int b) |
| 158 | { |
| 159 | int64_t w = b & 0xFF; |
| 160 | |
| 161 | return (w << 0) | (w << 8) | (w << 16) | (w << 24) | (w << 32) | (w << 40) | (w << 48) | (w << 56); |
| 162 | } |
| 163 | }; |
| 164 | |
| 165 | struct Fog |
| 166 | { |
| 167 | float4 scale; |
| 168 | float4 offset; |
| 169 | word4 color4[3]; |
| 170 | float4 colorF[3]; |
| 171 | float4 densityE; |
| 172 | float4 density2E; |
| 173 | }; |
| 174 | |
| 175 | struct Factor |
| 176 | { |
| 177 | word4 textureFactor4[4]; |
| 178 | |
| 179 | word4 alphaReference4; |
| 180 | |
| 181 | word4 blendConstant4W[4]; |
| 182 | float4 blendConstant4F[4]; |
| 183 | word4 invBlendConstant4W[4]; |
| 184 | float4 invBlendConstant4F[4]; |
| 185 | }; |
| 186 | |
| 187 | public: |
| 188 | typedef void (*RoutinePointer)(const Primitive *primitive, int count, int thread, DrawData *draw); |
| 189 | |
| 190 | PixelProcessor(Context *context); |
| 191 | |
| 192 | virtual ~PixelProcessor(); |
| 193 | |
Nicolas Capens | 532770b | 2021-01-21 13:34:33 -0500 | [diff] [blame^] | 194 | void *operator new(size_t size); |
| 195 | void operator delete(void *mem); |
| 196 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 197 | void setFloatConstant(unsigned int index, const float value[4]); |
| 198 | void setIntegerConstant(unsigned int index, const int value[4]); |
| 199 | void setBooleanConstant(unsigned int index, int boolean); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 200 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 201 | void setUniformBuffer(int index, sw::Resource* buffer, int offset); |
| 202 | void lockUniformBuffers(byte** u, sw::Resource* uniformBuffers[]); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 203 | |
Nicolas Capens | 8af24c5 | 2017-12-11 14:45:01 -0500 | [diff] [blame] | 204 | void setRenderTarget(int index, Surface *renderTarget, unsigned int layer = 0); |
| 205 | void setDepthBuffer(Surface *depthBuffer, unsigned int layer = 0); |
| 206 | void setStencilBuffer(Surface *stencilBuffer, unsigned int layer = 0); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 207 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 208 | void setTexCoordIndex(unsigned int stage, int texCoordIndex); |
| 209 | void setStageOperation(unsigned int stage, TextureStage::StageOperation stageOperation); |
| 210 | void setFirstArgument(unsigned int stage, TextureStage::SourceArgument firstArgument); |
| 211 | void setSecondArgument(unsigned int stage, TextureStage::SourceArgument secondArgument); |
| 212 | void setThirdArgument(unsigned int stage, TextureStage::SourceArgument thirdArgument); |
| 213 | void setStageOperationAlpha(unsigned int stage, TextureStage::StageOperation stageOperationAlpha); |
| 214 | void setFirstArgumentAlpha(unsigned int stage, TextureStage::SourceArgument firstArgumentAlpha); |
| 215 | void setSecondArgumentAlpha(unsigned int stage, TextureStage::SourceArgument secondArgumentAlpha); |
| 216 | void setThirdArgumentAlpha(unsigned int stage, TextureStage::SourceArgument thirdArgumentAlpha); |
| 217 | void setFirstModifier(unsigned int stage, TextureStage::ArgumentModifier firstModifier); |
| 218 | void setSecondModifier(unsigned int stage, TextureStage::ArgumentModifier secondModifier); |
| 219 | void setThirdModifier(unsigned int stage, TextureStage::ArgumentModifier thirdModifier); |
| 220 | void setFirstModifierAlpha(unsigned int stage, TextureStage::ArgumentModifier firstModifierAlpha); |
| 221 | void setSecondModifierAlpha(unsigned int stage, TextureStage::ArgumentModifier secondModifierAlpha); |
| 222 | void setThirdModifierAlpha(unsigned int stage, TextureStage::ArgumentModifier thirdModifierAlpha); |
| 223 | void setDestinationArgument(unsigned int stage, TextureStage::DestinationArgument destinationArgument); |
| 224 | void setConstantColor(unsigned int stage, const Color<float> &constantColor); |
| 225 | void setBumpmapMatrix(unsigned int stage, int element, float value); |
| 226 | void setLuminanceScale(unsigned int stage, float value); |
| 227 | void setLuminanceOffset(unsigned int stage, float value); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 228 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 229 | void setTextureFilter(unsigned int sampler, FilterType textureFilter); |
| 230 | void setMipmapFilter(unsigned int sampler, MipmapType mipmapFilter); |
| 231 | void setGatherEnable(unsigned int sampler, bool enable); |
| 232 | void setAddressingModeU(unsigned int sampler, AddressingMode addressingMode); |
| 233 | void setAddressingModeV(unsigned int sampler, AddressingMode addressingMode); |
| 234 | void setAddressingModeW(unsigned int sampler, AddressingMode addressingMode); |
| 235 | void setReadSRGB(unsigned int sampler, bool sRGB); |
| 236 | void setMipmapLOD(unsigned int sampler, float bias); |
| 237 | void setBorderColor(unsigned int sampler, const Color<float> &borderColor); |
| 238 | void setMaxAnisotropy(unsigned int sampler, float maxAnisotropy); |
Alexis Hetu | 010a464 | 2017-07-18 14:33:04 -0400 | [diff] [blame] | 239 | void setHighPrecisionFiltering(unsigned int sampler, bool highPrecisionFiltering); |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 240 | void setSwizzleR(unsigned int sampler, SwizzleType swizzleR); |
| 241 | void setSwizzleG(unsigned int sampler, SwizzleType swizzleG); |
| 242 | void setSwizzleB(unsigned int sampler, SwizzleType swizzleB); |
| 243 | void setSwizzleA(unsigned int sampler, SwizzleType swizzleA); |
Nicolas Capens | f878d50 | 2017-11-06 15:29:46 -0500 | [diff] [blame] | 244 | void setCompareFunc(unsigned int sampler, CompareFunc compare); |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 245 | void setBaseLevel(unsigned int sampler, int baseLevel); |
| 246 | void setMaxLevel(unsigned int sampler, int maxLevel); |
| 247 | void setMinLod(unsigned int sampler, float minLod); |
| 248 | void setMaxLod(unsigned int sampler, float maxLod); |
Alexis Hetu | 88482c3 | 2018-06-05 17:05:17 -0400 | [diff] [blame] | 249 | void setSyncRequired(unsigned int sampler, bool isSincRequired); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 250 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 251 | void setWriteSRGB(bool sRGB); |
| 252 | void setDepthBufferEnable(bool depthBufferEnable); |
| 253 | void setDepthCompare(DepthCompareMode depthCompareMode); |
| 254 | void setAlphaCompare(AlphaCompareMode alphaCompareMode); |
| 255 | void setDepthWriteEnable(bool depthWriteEnable); |
| 256 | void setAlphaTestEnable(bool alphaTestEnable); |
Nicolas Capens | dd4c863 | 2018-07-31 15:33:28 -0400 | [diff] [blame] | 257 | void setCullMode(CullMode cullMode, bool frontFacingCCW); |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 258 | void setColorWriteMask(int index, int rgbaMask); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 259 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 260 | void setColorLogicOpEnabled(bool colorLogicOpEnabled); |
| 261 | void setLogicalOperation(LogicalOperation logicalOperation); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 262 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 263 | void setStencilEnable(bool stencilEnable); |
| 264 | void setStencilCompare(StencilCompareMode stencilCompareMode); |
| 265 | void setStencilReference(int stencilReference); |
| 266 | void setStencilMask(int stencilMask); |
| 267 | void setStencilFailOperation(StencilOperation stencilFailOperation); |
| 268 | void setStencilPassOperation(StencilOperation stencilPassOperation); |
| 269 | void setStencilZFailOperation(StencilOperation stencilZFailOperation); |
| 270 | void setStencilWriteMask(int stencilWriteMask); |
| 271 | void setTwoSidedStencil(bool enable); |
| 272 | void setStencilCompareCCW(StencilCompareMode stencilCompareMode); |
| 273 | void setStencilReferenceCCW(int stencilReference); |
| 274 | void setStencilMaskCCW(int stencilMask); |
| 275 | void setStencilFailOperationCCW(StencilOperation stencilFailOperation); |
| 276 | void setStencilPassOperationCCW(StencilOperation stencilPassOperation); |
| 277 | void setStencilZFailOperationCCW(StencilOperation stencilZFailOperation); |
| 278 | void setStencilWriteMaskCCW(int stencilWriteMask); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 279 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 280 | void setTextureFactor(const Color<float> &textureFactor); |
| 281 | void setBlendConstant(const Color<float> &blendConstant); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 282 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 283 | void setFillMode(FillMode fillMode); |
| 284 | void setShadingMode(ShadingMode shadingMode); |
Nicolas Capens | 3b4c93f | 2016-05-18 12:51:37 -0400 | [diff] [blame] | 285 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 286 | void setAlphaBlendEnable(bool alphaBlendEnable); |
| 287 | void setSourceBlendFactor(BlendFactor sourceBlendFactor); |
| 288 | void setDestBlendFactor(BlendFactor destBlendFactor); |
| 289 | void setBlendOperation(BlendOperation blendOperation); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 290 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 291 | void setSeparateAlphaBlendEnable(bool separateAlphaBlendEnable); |
| 292 | void setSourceBlendFactorAlpha(BlendFactor sourceBlendFactorAlpha); |
| 293 | void setDestBlendFactorAlpha(BlendFactor destBlendFactorAlpha); |
| 294 | void setBlendOperationAlpha(BlendOperation blendOperationAlpha); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 295 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 296 | void setAlphaReference(float alphaReference); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 297 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 298 | void setGlobalMipmapBias(float bias); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 299 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 300 | void setFogStart(float start); |
| 301 | void setFogEnd(float end); |
| 302 | void setFogColor(Color<float> fogColor); |
| 303 | void setFogDensity(float fogDensity); |
| 304 | void setPixelFogMode(FogMode fogMode); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 305 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 306 | void setPerspectiveCorrection(bool perspectiveCorrection); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 307 | |
Alexis Hetu | c634fb6 | 2016-06-02 10:53:13 -0400 | [diff] [blame] | 308 | void setOcclusionEnabled(bool enable); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 309 | |
| 310 | protected: |
| 311 | const State update() const; |
Ben Clayton | 6897e9b | 2019-07-16 17:27:27 +0100 | [diff] [blame] | 312 | std::shared_ptr<Routine> routine(const State &state); |
Nicolas Capens | 0bac285 | 2016-05-07 06:09:58 -0400 | [diff] [blame] | 313 | void setRoutineCacheSize(int routineCacheSize); |
| 314 | |
| 315 | // Shader constants |
| 316 | word4 cW[8][4]; |
| 317 | float4 c[FRAGMENT_UNIFORM_VECTORS]; |
| 318 | int4 i[16]; |
| 319 | bool b[16]; |
| 320 | |
| 321 | // Other semi-constants |
| 322 | Stencil stencil; |
| 323 | Stencil stencilCCW; |
| 324 | Fog fog; |
| 325 | Factor factor; |
| 326 | |
| 327 | private: |
| 328 | struct UniformBufferInfo |
| 329 | { |
| 330 | UniformBufferInfo(); |
| 331 | |
| 332 | Resource* buffer; |
| 333 | int offset; |
| 334 | }; |
| 335 | UniformBufferInfo uniformBufferInfo[MAX_UNIFORM_BUFFER_BINDINGS]; |
| 336 | |
| 337 | void setFogRanges(float start, float end); |
| 338 | |
| 339 | Context *const context; |
| 340 | |
| 341 | RoutineCache<State> *routineCache; |
| 342 | }; |
| 343 | } |
| 344 | |
| 345 | #endif // sw_PixelProcessor_hpp |