Lines Matching defs:samplerState
26 GrVkSampler* GrVkSampler::Create(const GrVkGpu* gpu, const GrSamplerState& samplerState,
44 createInfo.magFilter = vkMagFilterModes[static_cast<int>(samplerState.filter())];
45 createInfo.minFilter = vkMinFilterModes[static_cast<int>(samplerState.filter())];
47 createInfo.addressModeU = wrap_mode_to_vk_sampler_address(samplerState.wrapModeX());
48 createInfo.addressModeV = wrap_mode_to_vk_sampler_address(samplerState.wrapModeY());
61 bool useMipMaps = GrSamplerState::Filter::kMipMap == samplerState.filter() && maxMipLevel > 0;
72 return new GrVkSampler(sampler, GenerateKey(samplerState, maxMipLevel));
80 uint16_t GrVkSampler::GenerateKey(const GrSamplerState& samplerState, uint32_t maxMipLevel) {
85 SkASSERT(static_cast<int>(samplerState.filter()) <= 3);
86 uint16_t key = static_cast<uint16_t>(samplerState.filter());
88 SkASSERT(static_cast<int>(samplerState.wrapModeX()) <= 4);
89 key |= (static_cast<uint16_t>(samplerState.wrapModeX()) << kTileModeXShift);
91 SkASSERT(static_cast<int>(samplerState.wrapModeY()) <= 4);
92 key |= (static_cast<uint16_t>(samplerState.wrapModeY()) << kTileModeYShift);