diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-07-28 15:19:46 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-28 20:43:03 +0000 |
commit | 5af9ea399d5e0344cc4b7da4e97b5dc5b3c74f64 (patch) | |
tree | df906a3af0b954b130340589f24d128ce655bb01 /src/gpu/vk | |
parent | 0edfbb78244739cb6e695f240edb7f659a543160 (diff) |
renamed SkSL types in preparation for killing precision modifiers
Bug: skia:
Change-Id: Iff0289e25355a89cdc289a0892ed755dd1b1c900
Reviewed-on: https://skia-review.googlesource.com/27703
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkCopyManager.cpp | 16 | ||||
-rw-r--r-- | src/gpu/vk/GrVkPipelineState.h | 4 | ||||
-rw-r--r-- | src/gpu/vk/GrVkUniformHandler.cpp | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/gpu/vk/GrVkCopyManager.cpp b/src/gpu/vk/GrVkCopyManager.cpp index 47c17abe11..938596ff0c 100644 --- a/src/gpu/vk/GrVkCopyManager.cpp +++ b/src/gpu/vk/GrVkCopyManager.cpp @@ -44,17 +44,17 @@ bool GrVkCopyManager::createCopyProgram(GrVkGpu* gpu) { "#extension GL_ARB_shading_language_420pack : enable\n" "layout(set = 0, binding = 0) uniform vertexUniformBuffer {" - "mediump vec4 uPosXform;" - "mediump vec4 uTexCoordXform;" + "mediump float4 uPosXform;" + "mediump float4 uTexCoordXform;" "};" - "layout(location = 0) in highp vec2 inPosition;" - "layout(location = 1) out mediump vec2 vTexCoord;" + "layout(location = 0) in highp float2 inPosition;" + "layout(location = 1) out mediump float2 vTexCoord;" "// Copy Program VS\n" "void main() {" "vTexCoord = inPosition * uTexCoordXform.xy + uTexCoordXform.zw;" "gl_Position.xy = inPosition * uPosXform.xy + uPosXform.zw;" - "gl_Position.zw = vec2(0, 1);" + "gl_Position.zw = float2(0, 1);" "}" ); @@ -66,8 +66,8 @@ bool GrVkCopyManager::createCopyProgram(GrVkGpu* gpu) { "precision mediump float;" "layout(set = 1, binding = 0) uniform mediump sampler2D uTextureSampler;" - "layout(location = 1) in mediump vec2 vTexCoord;" - "layout(location = 0, index = 0) out mediump vec4 fsColorOut;" + "layout(location = 1) in mediump float2 vTexCoord;" + "layout(location = 0, index = 0) out mediump float4 fsColorOut;" "// Copy Program FS\n" "void main() {" @@ -135,7 +135,7 @@ bool GrVkCopyManager::createCopyProgram(GrVkGpu* gpu) { SkASSERT(fVertexBuffer.get()); fVertexBuffer->updateData(vdata, sizeof(vdata)); - // We use 2 vec4's for uniforms + // We use 2 float4's for uniforms fUniformBuffer.reset(GrVkUniformBuffer::Create(gpu, 8 * sizeof(float))); SkASSERT(fUniformBuffer.get()); diff --git a/src/gpu/vk/GrVkPipelineState.h b/src/gpu/vk/GrVkPipelineState.h index 9481aa170f..a5d334613e 100644 --- a/src/gpu/vk/GrVkPipelineState.h +++ b/src/gpu/vk/GrVkPipelineState.h @@ -132,8 +132,8 @@ private: } /** - * Gets a vec4 that adjusts the position from Skia device coords to Vulkans normalized device - * coords. Assuming the transformed position, pos, is a homogeneous vec3, the vec, v, is + * Gets a float4 that adjusts the position from Skia device coords to Vulkans normalized device + * coords. Assuming the transformed position, pos, is a homogeneous float3, the vec, v, is * applied as such: * pos.x = dot(v.xy, pos.xz) * pos.y = dot(v.zw, pos.yz) diff --git a/src/gpu/vk/GrVkUniformHandler.cpp b/src/gpu/vk/GrVkUniformHandler.cpp index 55fd3d7f24..f45d7955f1 100644 --- a/src/gpu/vk/GrVkUniformHandler.cpp +++ b/src/gpu/vk/GrVkUniformHandler.cpp @@ -61,7 +61,7 @@ uint32_t grsltype_to_alignment_mask(GrSLType type) { /** Returns the size in bytes taken up in vulkanbuffers for floating point GrSLTypes. For non floating point type returns 0. Currently this reflects the std140 alignment - so a mat22 takes up 8 floats. */ + so a float2x2 takes up 8 floats. */ static inline uint32_t grsltype_to_vk_size(GrSLType type) { switch(type) { case kInt_GrSLType: |