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 #include "GrVkPipelineState.h" | 8 #include "GrVkPipelineState.h" |
9 | 9 |
10 #include "GrPipeline.h" | 10 #include "GrPipeline.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 375 } |
376 | 376 |
377 void GrVkPipelineState::addUniformResources(GrVkCommandBuffer& commandBuffer) { | 377 void GrVkPipelineState::addUniformResources(GrVkCommandBuffer& commandBuffer) { |
378 if (fUniformDescriptorSet) { | 378 if (fUniformDescriptorSet) { |
379 commandBuffer.addRecycledResource(fUniformDescriptorSet); | 379 commandBuffer.addRecycledResource(fUniformDescriptorSet); |
380 } | 380 } |
381 if (fSamplerDescriptorSet) { | 381 if (fSamplerDescriptorSet) { |
382 commandBuffer.addRecycledResource(fSamplerDescriptorSet); | 382 commandBuffer.addRecycledResource(fSamplerDescriptorSet); |
383 } | 383 } |
384 | 384 |
385 | |
386 if (fVertexUniformBuffer.get()) { | 385 if (fVertexUniformBuffer.get()) { |
387 commandBuffer.addResource(fVertexUniformBuffer->resource()); | 386 commandBuffer.addRecycledResource(fVertexUniformBuffer->resource()); |
388 } | 387 } |
389 if (fFragmentUniformBuffer.get()) { | 388 if (fFragmentUniformBuffer.get()) { |
390 commandBuffer.addResource(fFragmentUniformBuffer->resource()); | 389 commandBuffer.addRecycledResource(fFragmentUniformBuffer->resource()); |
391 } | 390 } |
| 391 |
392 for (int i = 0; i < fSamplers.count(); ++i) { | 392 for (int i = 0; i < fSamplers.count(); ++i) { |
393 commandBuffer.addResource(fSamplers[i]); | 393 commandBuffer.addResource(fSamplers[i]); |
394 } | 394 } |
395 | 395 |
396 for (int i = 0; i < fTextureViews.count(); ++i) { | 396 for (int i = 0; i < fTextureViews.count(); ++i) { |
397 commandBuffer.addResource(fTextureViews[i]); | 397 commandBuffer.addResource(fTextureViews[i]); |
398 } | 398 } |
399 | 399 |
400 for (int i = 0; i < fTextures.count(); ++i) { | 400 for (int i = 0; i < fTextures.count(); ++i) { |
401 commandBuffer.addResource(fTextures[i]); | 401 commandBuffer.addResource(fTextures[i]); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 | 501 |
502 b.add32(get_blend_info_key(pipeline)); | 502 b.add32(get_blend_info_key(pipeline)); |
503 | 503 |
504 b.add32(primitiveType); | 504 b.add32(primitiveType); |
505 | 505 |
506 // Set key length | 506 // Set key length |
507 int keyLength = key->count(); | 507 int keyLength = key->count(); |
508 SkASSERT(0 == (keyLength % 4)); | 508 SkASSERT(0 == (keyLength % 4)); |
509 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength); | 509 *reinterpret_cast<uint32_t*>(key->begin()) = SkToU32(keyLength); |
510 } | 510 } |
OLD | NEW |