| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #ifndef GrVkPipelineState_DEFINED | 9 #ifndef GrVkPipelineState_DEFINED |
| 10 #define GrVkPipelineState_DEFINED | 10 #define GrVkPipelineState_DEFINED |
| 11 | 11 |
| 12 #include "GrProgramDesc.h" |
| 12 #include "GrStencilSettings.h" | 13 #include "GrStencilSettings.h" |
| 13 #include "GrVkDescriptorSetManager.h" | 14 #include "GrVkDescriptorSetManager.h" |
| 14 #include "GrVkImage.h" | 15 #include "GrVkImage.h" |
| 15 #include "GrVkPipelineStateDataManager.h" | 16 #include "GrVkPipelineStateDataManager.h" |
| 16 #include "glsl/GrGLSLProgramBuilder.h" | 17 #include "glsl/GrGLSLProgramBuilder.h" |
| 17 #include "glsl/GrGLSLProgramDesc.h" | |
| 18 | 18 |
| 19 #include "vk/GrVkDefines.h" | 19 #include "vk/GrVkDefines.h" |
| 20 | 20 |
| 21 class GrPipeline; | 21 class GrPipeline; |
| 22 class GrVkCommandBuffer; | 22 class GrVkCommandBuffer; |
| 23 class GrVkDescriptorPool; | 23 class GrVkDescriptorPool; |
| 24 class GrVkDescriptorSet; | 24 class GrVkDescriptorSet; |
| 25 class GrVkGpu; | 25 class GrVkGpu; |
| 26 class GrVkImageView; | 26 class GrVkImageView; |
| 27 class GrVkPipeline; | 27 class GrVkPipeline; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 * pipeline. This includes stencil settings, blending information, render pa
ss format, draw face | 79 * pipeline. This includes stencil settings, blending information, render pa
ss format, draw face |
| 80 * information, and primitive type. Note that some state is set dynamically
on the pipeline for | 80 * information, and primitive type. Note that some state is set dynamically
on the pipeline for |
| 81 * each draw and thus is not included in this descriptor. This includes the
viewport, scissor, | 81 * each draw and thus is not included in this descriptor. This includes the
viewport, scissor, |
| 82 * and blend constant. | 82 * and blend constant. |
| 83 * | 83 * |
| 84 * A checksum which includes the fProgramDesc and fStateKey is included at t
he top of the Desc | 84 * A checksum which includes the fProgramDesc and fStateKey is included at t
he top of the Desc |
| 85 * for caching purposes and faster equality checks. | 85 * for caching purposes and faster equality checks. |
| 86 */ | 86 */ |
| 87 struct Desc { | 87 struct Desc { |
| 88 uint32_t fChecksum; | 88 uint32_t fChecksum; |
| 89 GrGLSLProgramDesc fProgramDesc; | 89 GrProgramDesc fProgramDesc; |
| 90 | 90 |
| 91 enum { | 91 enum { |
| 92 kRenderPassKeyAlloc = 12, // This is typical color attachment with n
o stencil or msaa | 92 kRenderPassKeyAlloc = 12, // This is typical color attachment with n
o stencil or msaa |
| 93 kStencilKeyAlloc = sizeof(GrStencilSettings), | 93 kStencilKeyAlloc = sizeof(GrStencilSettings), |
| 94 kDrawFaceKeyAlloc = 4, | 94 kDrawFaceKeyAlloc = 4, |
| 95 kBlendingKeyAlloc = 4, | 95 kBlendingKeyAlloc = 4, |
| 96 kPrimitiveTypeKeyAlloc = 4, | 96 kPrimitiveTypeKeyAlloc = 4, |
| 97 kPreAllocSize = kData_StateKeyOffset + kRenderPassKeyAlloc + kStenci
lKeyAlloc + | 97 kPreAllocSize = kData_StateKeyOffset + kRenderPassKeyAlloc + kStenci
lKeyAlloc + |
| 98 kDrawFaceKeyAlloc + kBlendingKeyAlloc + kPrimitiveTy
peKeyAlloc, | 98 kDrawFaceKeyAlloc + kBlendingKeyAlloc + kPrimitiveTy
peKeyAlloc, |
| 99 }; | 99 }; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 Desc fDesc; | 289 Desc fDesc; |
| 290 | 290 |
| 291 GrVkPipelineStateDataManager fDataManager; | 291 GrVkPipelineStateDataManager fDataManager; |
| 292 | 292 |
| 293 int fNumSamplers; | 293 int fNumSamplers; |
| 294 | 294 |
| 295 friend class GrVkPipelineStateBuilder; | 295 friend class GrVkPipelineStateBuilder; |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 #endif | 298 #endif |
| OLD | NEW |