Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: src/gpu/vk/GrVkPipelineState.cpp

Issue 1974983002: Refactor Vulkan image, texture, RTs so that create and getter handles match. (Closed) Base URL: https://skia.googlesource.com/skia.git@fixLayerVersion
Patch Set: nits Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.h ('k') | src/gpu/vk/GrVkRenderTarget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "GrVkPipelineState.h" 8 #include "GrVkPipelineState.h"
9 9
10 #include "GrPipeline.h" 10 #include "GrPipeline.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 if (GrTextureParams::kMipMap_FilterMode == params.filterMode()) { 297 if (GrTextureParams::kMipMap_FilterMode == params.filterMode()) {
298 if (texture->texturePriv().mipMapsAreDirty()) { 298 if (texture->texturePriv().mipMapsAreDirty()) {
299 gpu->generateMipmap(texture); 299 gpu->generateMipmap(texture);
300 texture->texturePriv().dirtyMipMaps(false); 300 texture->texturePriv().dirtyMipMaps(false);
301 } 301 }
302 } 302 }
303 303
304 fSamplers.push(gpu->resourceProvider().findOrCreateCompatibleSampler(par ams, 304 fSamplers.push(gpu->resourceProvider().findOrCreateCompatibleSampler(par ams,
305 texture->texturePriv() .maxMipMapLevel())); 305 texture->texturePriv() .maxMipMapLevel()));
306 306
307 const GrVkImage::Resource* textureResource = texture->resource(); 307 const GrVkResource* textureResource = texture->resource();
308 textureResource->ref(); 308 textureResource->ref();
309 fTextures.push(textureResource); 309 fTextures.push(textureResource);
310 310
311 const GrVkImageView* textureView = texture->textureView(allowSRGBInputs) ; 311 const GrVkImageView* textureView = texture->textureView(allowSRGBInputs) ;
312 textureView->ref(); 312 textureView->ref();
313 fTextureViews.push(textureView); 313 fTextureViews.push(textureView);
314 314
315 // Change texture layout so it can be read in shader 315 // Change texture layout so it can be read in shader
316 texture->setImageLayout(gpu, 316 texture->setImageLayout(gpu,
317 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, 317 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 504
505 b.add32(get_blend_info_key(pipeline)); 505 b.add32(get_blend_info_key(pipeline));
506 506
507 b.add32(primitiveType); 507 b.add32(primitiveType);
508 508
509 // Set key length 509 // Set key length
510 int keyLength = key->count(); 510 int keyLength = key->count();
511 SkASSERT(0 == (keyLength % 4)); 511 SkASSERT(0 == (keyLength % 4));
512 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength); 512 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength);
513 } 513 }
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.h ('k') | src/gpu/vk/GrVkRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698