|
Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.
A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.
In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers
For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004
Committed: https://skia.googlesource.com/skia/+/45b61a1c4c0be896e7b12fd1405abfece799114f
Committed: https://skia.googlesource.com/skia/+/09aa1fce69b214714171db12c341aebd78dd29ea
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+368 lines, -180 lines) |
Patch |
|
M |
gyp/gpu.gypi
|
View
|
1
2
3
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
include/gpu/GrShaderVar.h
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/effects/SkBlurMaskFilter.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/effects/gradients/SkGradientShader.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/effects/gradients/SkGradientShaderPriv.h
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/gpu/effects/GrTextureDomain.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/gpu/effects/GrTextureDomain.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLProgram.h
|
View
|
1
2
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLProgram.cpp
|
View
|
|
2 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLProgramDataManager.h
|
View
|
1
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLProgramDataManager.cpp
|
View
|
|
1 chunk |
+25 lines, -13 lines |
0 comments
|
Download
|
|
A |
src/gpu/gl/GrGLSampler.h
|
View
|
1
2
3
|
1 chunk |
+45 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLUniformHandler.h
|
View
|
1
2
3
|
3 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/GrGLUniformHandler.cpp
|
View
|
1
|
4 chunks |
+31 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/gl/builders/GrGLProgramBuilder.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLFragmentProcessor.h
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLFragmentProcessor.cpp
|
View
|
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLPrimitiveProcessor.h
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLProgramBuilder.h
|
View
|
1
2
|
3 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLProgramBuilder.cpp
|
View
|
1
2
|
11 chunks |
+25 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLSampler.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+19 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLShaderBuilder.h
|
View
|
1
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLShaderBuilder.cpp
|
View
|
1
|
1 chunk |
+18 lines, -21 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLUniformHandler.h
|
View
|
1
2
|
5 chunks |
+22 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/glsl/GrGLSLXferProcessor.h
|
View
|
|
3 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
|
A |
src/gpu/vk/GrVkGLSLSampler.h
|
View
|
1
2
3
|
1 chunk |
+49 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/gpu/vk/GrVkPipelineStateBuilder.cpp
|
View
|
1
2
3
|
2 chunks |
+8 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/gpu/vk/GrVkPipelineStateDataManager.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/gpu/vk/GrVkPipelineStateDataManager.cpp
|
View
|
1
2
3
|
10 chunks |
+3 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/gpu/vk/GrVkUniformHandler.h
|
View
|
1
2
3
|
4 chunks |
+14 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/gpu/vk/GrVkUniformHandler.cpp
|
View
|
1
2
3
4
|
2 chunks |
+39 lines, -33 lines |
0 comments
|
Download
|
Total messages: 32 (14 generated)
|