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

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: clean up 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
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 if (GrTextureParams::kMipMap_FilterMode == params.filterMode()) { 296 if (GrTextureParams::kMipMap_FilterMode == params.filterMode()) {
297 if (texture->texturePriv().mipMapsAreDirty()) { 297 if (texture->texturePriv().mipMapsAreDirty()) {
298 gpu->generateMipmap(texture); 298 gpu->generateMipmap(texture);
299 texture->texturePriv().dirtyMipMaps(false); 299 texture->texturePriv().dirtyMipMaps(false);
300 } 300 }
301 } 301 }
302 302
303 fSamplers.push(gpu->resourceProvider().findOrCreateCompatibleSampler(par ams, 303 fSamplers.push(gpu->resourceProvider().findOrCreateCompatibleSampler(par ams,
304 texture->texturePriv() .maxMipMapLevel())); 304 texture->texturePriv() .maxMipMapLevel()));
305 305
306 const GrVkImage::Resource* textureResource = texture->resource(); 306 const GrVkResource* textureResource = texture->resource();
307 textureResource->ref(); 307 textureResource->ref();
308 fTextures.push(textureResource); 308 fTextures.push(textureResource);
309 309
310 const GrVkImageView* textureView = texture->textureView(); 310 const GrVkImageView* textureView = texture->textureView();
311 textureView->ref(); 311 textureView->ref();
312 fTextureViews.push(textureView); 312 fTextureViews.push(textureView);
313 313
314 // Change texture layout so it can be read in shader 314 // Change texture layout so it can be read in shader
315 texture->setImageLayout(gpu, 315 texture->setImageLayout(gpu,
316 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, 316 VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 503
504 b.add32(get_blend_info_key(pipeline)); 504 b.add32(get_blend_info_key(pipeline));
505 505
506 b.add32(primitiveType); 506 b.add32(primitiveType);
507 507
508 // Set key length 508 // Set key length
509 int keyLength = key->count(); 509 int keyLength = key->count();
510 SkASSERT(0 == (keyLength % 4)); 510 SkASSERT(0 == (keyLength % 4));
511 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength); 511 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength);
512 } 512 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698