Lines Matching refs:samplerState
39 GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, const GrSamplerState& samplerState,
53 samplerDesc.sAddressMode = wrap_mode_to_mtl_sampler_address(samplerState.wrapModeX(),
55 samplerDesc.tAddressMode = wrap_mode_to_mtl_sampler_address(samplerState.wrapModeY(),
57 samplerDesc.magFilter = mtlMinMagFilterModes[static_cast<int>(samplerState.filter())];
58 samplerDesc.minFilter = mtlMinMagFilterModes[static_cast<int>(samplerState.filter())];
61 bool useMipMaps = GrSamplerState::Filter::kMipMap == samplerState.filter() && maxMipLevel > 0;
68 GenerateKey(samplerState, maxMipLevel));
71 GrMtlSampler::Key GrMtlSampler::GenerateKey(const GrSamplerState& samplerState,
77 SkASSERT(static_cast<int>(samplerState.filter()) <= 3);
78 Key samplerKey = static_cast<uint16_t>(samplerState.filter());
80 SkASSERT(static_cast<int>(samplerState.wrapModeX()) <= 3);
81 samplerKey |= (static_cast<uint16_t>(samplerState.wrapModeX()) << kTileModeXShift);
83 SkASSERT(static_cast<int>(samplerState.wrapModeY()) <= 3);
84 samplerKey |= (static_cast<uint16_t>(samplerState.wrapModeY()) << kTileModeYShift);
86 bool useMipMaps = GrSamplerState::Filter::kMipMap == samplerState.filter() && maxMipLevel > 0;