Home | History | Annotate | Download | only in functional

Lines Matching refs:sampler

93 bool isDepthFormat (deUint32 format, tcu::Sampler::DepthStencilMode mode)
111 DE_ASSERT(mode == tcu::Sampler::MODE_DEPTH);
114 else if (fmt.order == tcu::TextureFormat::DS && mode == tcu::Sampler::MODE_DEPTH)
121 bool isStencilFormat (deUint32 format, tcu::Sampler::DepthStencilMode mode)
139 DE_ASSERT(mode == tcu::Sampler::MODE_STENCIL);
142 else if (fmt.order == tcu::TextureFormat::DS && mode == tcu::Sampler::MODE_STENCIL)
149 tcu::TextureChannelClass getFormatChannelClass (deUint32 format, tcu::Sampler::DepthStencilMode mode)
288 if (isDepthFormat(texFormat, tcu::Sampler::MODE_DEPTH) || isStencilFormat(texFormat, tcu::Sampler::MODE_STENCIL))
294 if (isDepthFormat(texFormat, tcu::Sampler::MODE_DEPTH))
297 const tcu::PixelBufferAccess depthAccess = tcu::getEffectiveDepthStencilAccess(texture->getRefTexture().getLevel(0), tcu::Sampler::MODE_DEPTH);
301 if (isStencilFormat(texFormat, tcu::Sampler::MODE_STENCIL))
304 const tcu::PixelBufferAccess stencilAccess = tcu::getEffectiveDepthStencilAccess(texture->getRefTexture().getLevel(0), tcu::Sampler::MODE_STENCIL);
466 bool isCoreFilterableFormat (deUint32 format, tcu::Sampler::DepthStencilMode mode)
528 tcu::Sampler::DepthStencilMode mode,
592 const tcu::Sampler::DepthStencilMode m_sampleMode;
620 tcu::Sampler::DepthStencilMode mode,
641 DE_ASSERT(m_channelClass != tcu::TEXTURECHANNELCLASS_LAST || mode != tcu::Sampler::MODE_LAST);
681 << "Setting sampling state using " << ((m_stateType == STATE_TEXTURE_PARAM) ? ("texture state") : ("sampler state"))
742 << "Filters: min = " << glu::getTextureFilterName(glu::getGLFilterMode(samplerParams.sampler.minFilter))
743 << ", mag = " << glu::getTextureFilterName(glu::getGLFilterMode(samplerParams.sampler.magFilter)) << "\n"
748 if (m_sampleMode == tcu::Sampler::MODE_DEPTH)
750 else if (m_sampleMode == tcu::Sampler::MODE_STENCIL)
769 de::MovePtr<glu::Sampler> sampler;
777 if (m_sampleMode == tcu::Sampler::MODE_DEPTH)
779 else if (m_sampleMode == tcu::Sampler::MODE_STENCIL)
796 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glu::getGLWrapMode(samplerParams.sampler.wrapS));
797 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glu::getGLWrapMode(samplerParams.sampler.wrapT));
798 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, glu::getGLFilterMode(samplerParams.sampler.minFilter));
799 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, glu::getGLFilterMode(samplerParams.sampler.magFilter));
832 // setup sampler to correct values
833 sampler = de::MovePtr<glu::Sampler>(new glu::Sampler(m_context.getRenderContext()));
835 gl.samplerParameteri(**sampler, GL_TEXTURE_WRAP_S, glu::getGLWrapMode(samplerParams.sampler.wrapS));
836 gl.samplerParameteri(**sampler, GL_TEXTURE_WRAP_T, glu::getGLWrapMode(samplerParams.sampler.wrapT));
837 gl.samplerParameteri(**sampler, GL_TEXTURE_MIN_FILTER, glu::getGLFilterMode(samplerParams.sampler.minFilter));
838 gl.samplerParameteri(**sampler, GL_TEXTURE_MAG_FILTER, glu::getGLFilterMode(samplerParams.sampler.magFilter));
845 gl.samplerParameterfv(**sampler, GL_TEXTURE_BORDER_COLOR, config.borderColor.getAccess<float>());
849 gl.samplerParameterIiv(**sampler, GL_TEXTURE_BORDER_COLOR, config.borderColor.getAccess<deInt32>());
853 gl.samplerParameterIuiv(**sampler, GL_TEXTURE_BORDER_COLOR, config.borderColor.getAccess<deUint32>());
860 gl.bindSampler(0, **sampler);
924 if (samplerParams.sampler.compare == tcu::Sampler::COMPAREMODE_NONE)
927 const bool isNearestMinFilter = samplerParams.sampler.minFilter == tcu::Sampler::NEAREST || samplerParams.sampler.minFilter == tcu::Sampler::NEAREST_MIPMAP_NEAREST;
928 const bool isNearestMagFilter = samplerParams.sampler.magFilter == tcu::Sampler::NEAREST;
1053 const tcu::Texture2DView effectiveView = tcu::getEffectiveTextureView(m_texture->getRefTexture(), srcLevelStorage, samplerParams.sampler);
1118 const tcu::Texture2DView effectiveView = tcu::getEffectiveTextureView(m_texture->getRefTexture(), srcLevelStorage, samplerParams.sampler);
1131 const tcu::Vec4 referenceValue = effectiveView.gatherOffsets(samplerParams.sampler, texCoord.x(), texCoord.y(), 0, glu::getDefaultGatherOffsets());
1142 if (!tcu::isGatherOffsetsResultValid(effectiveView, samplerParams.sampler, lookupPrecision, texCoord, 0, glu::getDefaultGatherOffsets(), resultValue))
1179 const tcu::Texture2DView effectiveView = tcu::getEffectiveTextureView(m_texture->getRefTexture(), srcLevelStorage, samplerParams.sampler);
1197 const tcu::Vec4 referenceValue = effectiveView.gatherOffsetsCompare(samplerParams.sampler, refZ, texCoord.x(), texCoord.y(), glu::getDefaultGatherOffsets());
1204 if (!tcu::isGatherOffsetsCompareResultValid(effectiveView, samplerParams.sampler, texComparePrecision, texCoord, glu::getDefaultGatherOffsets(), refZ, resultValue))
1209 if (!tcu::isGatherOffsetsCompareResultValid(effectiveView, samplerParams.sampler, lowQualityTexComparePrecision, texCoord, glu::getDefaultGatherOffsets(), refZ, resultValue))
1259 refParams.sampler = glu::mapGLSampler(config.sWrapMode, config.tWrapMode, config.minFilter, config.magFilter);
1260 refParams.sampler.borderColor = config.borderColor;
1261 refParams.sampler.compare = (!m_useShadowSampler) ? (tcu::Sampler::COMPAREMODE_NONE) : (glu::mapGLCompareFunc(config.compareMode));
1262 refParams.sampler.depthStencilMode = m_sampleMode;
1271 DE_ASSERT(refParams.sampler.compare == tcu::Sampler::COMPAREMODE_NONE);
1273 // sampler type must match compare mode
1357 tcu::Sampler::DepthStencilMode mode,
1380 tcu::Sampler::DepthStencilMode mode,
1484 tcu::Sampler::DepthStencilMode mode,
1501 tcu::Sampler::DepthStencilMode mode,
1675 tcu::Sampler::DepthStencilMode mode,
1699 tcu::Sampler::DepthStencilMode mode,
1796 tcu::Sampler::MODE_DEPTH,
1901 tcu::Sampler::DepthStencilMode depthStencilMode);
1916 tcu::Sampler::DepthStencilMode depthStencilMode)
2059 , m_channelClass (getFormatChannelClass(texFormat, tcu::Sampler::MODE_LAST))
2173 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, glu::getGLWrapMode(samplerParams.sampler.wrapS));
2174 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, glu::getGLWrapMode(samplerParams.sampler.wrapT));
2175 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, glu::getGLWrapMode(samplerParams.sampler.wrapR));
2176 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, glu::getGLFilterMode(samplerParams.sampler.minFilter));
2177 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, glu::getGLFilterMode(samplerParams.sampler.magFilter));
2253 refParams.sampler = glu::mapGLSampler(m_sWrap, m_tWrap, m_rWrap, m_filter, m_filter);
2254 refParams.sampler.borderColor = m_borderColor;
2309 tcu::Sampler::DepthStencilMode mode;
2312 { "luminance", GL_LUMINANCE, tcu::Sampler::MODE_LAST },
2313 { "alpha", GL_ALPHA, tcu::Sampler::MODE_LAST },
2314 { "luminance_alpha", GL_LUMINANCE_ALPHA, tcu::Sampler::MODE_LAST },
2315 { "bgra", GL_BGRA, tcu::Sampler::MODE_LAST },
2316 { "r8", GL_R8, tcu::Sampler::MODE_LAST },
2317 { "r8_snorm", GL_R8_SNORM, tcu::Sampler::MODE_LAST },
2318 { "rg8", GL_RG8, tcu::Sampler::MODE_LAST },
2319 { "rg8_snorm", GL_RG8_SNORM, tcu::Sampler::MODE_LAST },
2320 { "rgb8", GL_RGB8, tcu::Sampler::MODE_LAST },
2321 { "rgb8_snorm", GL_RGB8_SNORM, tcu::Sampler::MODE_LAST },
2322 { "rgb565", GL_RGB565, tcu::Sampler::MODE_LAST },
2323 { "rgba4", GL_RGBA4, tcu::Sampler::MODE_LAST },
2324 { "rgb5_a1", GL_RGB5_A1, tcu::Sampler::MODE_LAST },
2325 { "rgba8", GL_RGBA8, tcu::Sampler::MODE_LAST },
2326 { "rgba8_snorm", GL_RGBA8_SNORM, tcu::Sampler::MODE_LAST },
2327 { "rgb10_a2", GL_RGB10_A2, tcu::Sampler::MODE_LAST },
2328 { "rgb10_a2ui", GL_RGB10_A2UI, tcu::Sampler::MODE_LAST },
2329 { "srgb8", GL_SRGB8, tcu::Sampler::MODE_LAST },
2330 { "srgb8_alpha8", GL_SRGB8_ALPHA8, tcu::Sampler::MODE_LAST },
2331 { "r16f", GL_R16F, tcu::Sampler::MODE_LAST },
2332 { "rg16f", GL_RG16F, tcu::Sampler::MODE_LAST },
2333 { "rgb16f", GL_RGB16F, tcu::Sampler::MODE_LAST },
2334 { "rgba16f", GL_RGBA16F, tcu::Sampler::MODE_LAST },
2335 { "r32f", GL_R32F, tcu::Sampler::MODE_LAST },
2336 { "rg32f", GL_RG32F, tcu::Sampler::MODE_LAST },
2337 { "rgb32f", GL_RGB32F, tcu::Sampler::MODE_LAST },
2338 { "rgba32f", GL_RGBA32F, tcu::Sampler::MODE_LAST },
2339 { "r11f_g11f_b10f", GL_R11F_G11F_B10F, tcu::Sampler::MODE_LAST },
2340 { "rgb9_e5", GL_RGB9_E5, tcu::Sampler::MODE_LAST },
2341 { "r8i", GL_R8I, tcu::Sampler::MODE_LAST },
2342 { "r8ui", GL_R8UI, tcu::Sampler::MODE_LAST },
2343 { "r16i", GL_R16I, tcu::Sampler::MODE_LAST },
2344 { "r16ui", GL_R16UI, tcu::Sampler::MODE_LAST },
2345 { "r32i", GL_R32I, tcu::Sampler::MODE_LAST },
2346 { "r32ui", GL_R32UI, tcu::Sampler::MODE_LAST },
2347 { "rg8i", GL_RG8I, tcu::Sampler::MODE_LAST },
2348 { "rg8ui", GL_RG8UI, tcu::Sampler::MODE_LAST },
2349 { "rg16i", GL_RG16I, tcu::Sampler::MODE_LAST },
2350 { "rg16ui", GL_RG16UI, tcu::Sampler::MODE_LAST },
2351 { "rg32i", GL_RG32I, tcu::Sampler::MODE_LAST },
2352 { "rg32ui", GL_RG32UI, tcu::Sampler::MODE_LAST },
2353 { "rgb8i", GL_RGB8I, tcu::Sampler::MODE_LAST },
2354 { "rgb8ui", GL_RGB8UI, tcu::Sampler::MODE_LAST },
2355 { "rgb16i", GL_RGB16I, tcu::Sampler::MODE_LAST },
2356 { "rgb16ui", GL_RGB16UI, tcu::Sampler::MODE_LAST },
2357 { "rgb32i", GL_RGB32I, tcu::Sampler::MODE_LAST },
2358 { "rgb32ui", GL_RGB32UI, tcu::Sampler::MODE_LAST },
2359 { "rgba8i", GL_RGBA8I, tcu::Sampler::MODE_LAST },
2360 { "rgba8ui", GL_RGBA8UI, tcu::Sampler::MODE_LAST },
2361 { "rgba16i", GL_RGBA16I, tcu::Sampler::MODE_LAST },
2362 { "rgba16ui", GL_RGBA16UI, tcu::Sampler::MODE_LAST },
2363 { "rgba32i", GL_RGBA32I, tcu::Sampler::MODE_LAST },
2364 { "rgba32ui", GL_RGBA32UI, tcu::Sampler::MODE_LAST },
2365 { "depth_component16", GL_DEPTH_COMPONENT16, tcu::Sampler::MODE_DEPTH },
2366 { "depth_component24", GL_DEPTH_COMPONENT24, tcu::Sampler::MODE_DEPTH },
2367 { "depth_component32f", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH },
2368 { "stencil_index8", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL },
2369 { "depth24_stencil8_sample_depth", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_DEPTH },
2370 { "depth32f_stencil8_sample_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH },
2371 { "depth24_stencil8_sample_stencil", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_STENCIL },
2372 { "depth32f_stencil8_sample_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL },
2373 { "compressed_r11_eac", GL_COMPRESSED_R11_EAC, tcu::Sampler::MODE_LAST },
2374 { "compressed_signed_r11_eac", GL_COMPRESSED_SIGNED_R11_EAC, tcu::Sampler::MODE_LAST },
2375 { "compressed_rg11_eac", GL_COMPRESSED_RG11_EAC, tcu::Sampler::MODE_LAST },
2376 { "compressed_signed_rg11_eac", GL_COMPRESSED_SIGNED_RG11_EAC, tcu::Sampler::MODE_LAST },
2377 { "compressed_rgb8_etc2", GL_COMPRESSED_RGB8_ETC2, tcu::Sampler::MODE_LAST },
2378 { "compressed_srgb8_etc2", GL_COMPRESSED_SRGB8_ETC2, tcu::Sampler::MODE_LAST },
2379 { "compressed_rgb8_punchthrough_alpha1_etc2", GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, tcu::Sampler::MODE_LAST },
2380 { "compressed_srgb8_punchthrough_alpha1_etc2", GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, tcu::Sampler::MODE_LAST },
2381 { "compressed_rgba8_etc2_eac", GL_COMPRESSED_RGBA8_ETC2_EAC, tcu::Sampler::MODE_LAST },
2382 { "compressed_srgb8_alpha8_etc2_eac", GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, tcu::Sampler::MODE_LAST },
2392 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode;
2440 tcu::Sampler::DepthStencilMode mode;
2443 { "unorm_color", GL_R8, tcu::Sampler::MODE_LAST },
2444 { "snorm_color", GL_R8_SNORM, tcu::Sampler::MODE_LAST },
2445 { "float_color", GL_RG32F, tcu::Sampler::MODE_LAST },
2446 { "int_color", GL_R8I, tcu::Sampler::MODE_LAST },
2447 { "uint_color", GL_R16UI, tcu::Sampler::MODE_LAST },
2448 { "srgb_color", GL_SRGB8_ALPHA8, tcu::Sampler::MODE_LAST },
2449 { "unorm_depth", GL_DEPTH_COMPONENT24, tcu::Sampler::MODE_DEPTH },
2450 { "float_depth", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH },
2451 { "uint_stencil", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL },
2452 { "float_depth_uint_stencil_sample_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH },
2453 { "float_depth_uint_stencil_sample_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL },
2454 { "unorm_depth_uint_stencil_sample_depth", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_DEPTH },
2455 { "unorm_depth_uint_stencil_sample_stencil", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_STENCIL },
2456 { "compressed_color", GL_COMPRESSED_RG11_EAC, tcu::Sampler::MODE_LAST },
2466 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode;
2479 // .sampler
2485 tcu::Sampler::DepthStencilMode mode;
2488 { "unorm_color", GL_R8, tcu::Sampler::MODE_LAST },
2489 { "snorm_color", GL_R8_SNORM, tcu::Sampler::MODE_LAST },
2490 { "float_color", GL_RG32F, tcu::Sampler::MODE_LAST },
2491 { "int_color", GL_R8I, tcu::Sampler::MODE_LAST },
2492 { "uint_color", GL_R16UI, tcu::Sampler::MODE_LAST },
2493 { "unorm_depth", GL_DEPTH_COMPONENT24, tcu::Sampler::MODE_DEPTH },
2494 { "float_depth", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH },
2495 { "uint_stencil", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL },
2496 { "compressed_color", GL_COMPRESSED_RG11_EAC, tcu::Sampler::MODE_LAST },
2499 tcu::TestCaseGroup* const samplerGroup = new tcu::TestCaseGroup(m_testCtx, "sampler", "Sampler param tests");
2505 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode;
2535 tcu::Sampler::DepthStencilMode mode;
2539 { "unorm_color", GL_RG8, tcu::Sampler::MODE_LAST, true },
2540 { "snorm_color", GL_RG8_SNORM, tcu::Sampler::MODE_LAST, true },
2541 { "float_color", GL_R32F, tcu::Sampler::MODE_LAST, true },
2542 { "int_color", GL_RG16I, tcu::Sampler::MODE_LAST, true },
2543 { "uint_color", GL_R8UI, tcu::Sampler::MODE_LAST, true },
2544 { "unorm_depth", GL_DEPTH_COMPONENT16, tcu::Sampler::MODE_DEPTH, false },
2545 { "float_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH, false },
2546 { "uint_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL, false },
2547 { "compressed_color", GL_COMPRESSED_RGB8_ETC2, tcu::Sampler::MODE_LAST, false },
2587 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode;
2641 DE_ASSERT(sampleMode == tcu::Sampler::MODE_LAST);
2713 tcu::Sampler::DepthStencilMode mode;
2716 { "r8", GL_R8, tcu::Sampler::MODE_LAST },
2717 { "rg8_snorm", GL_RG8_SNORM, tcu::Sampler::MODE_LAST },
2718 { "rgb8", GL_RGB8, tcu::Sampler::MODE_LAST },
2719 { "rg32f", GL_RG32F, tcu::Sampler::MODE_LAST },
2720 { "r16i", GL_RG16I, tcu::Sampler::MODE_LAST },
2721 { "luminance", GL_LUMINANCE, tcu::Sampler::MODE_LAST },
2722 { "alpha", GL_ALPHA, tcu::Sampler::MODE_LAST },
2723 { "luminance_alpha", GL_LUMINANCE_ALPHA, tcu::Sampler::MODE_LAST },
2724 { "depth_component16", GL_DEPTH_COMPONENT16, tcu::Sampler::MODE_DEPTH },
2725 { "depth_component32f", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH },
2726 { "stencil_index8", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL },
2727 { "depth32f_stencil8_sample_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH },
2728 { "depth32f_stencil8_sample_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL },
2729 { "depth24_stencil8_sample_depth", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_DEPTH },
2730 { "depth24_stencil8_sample_stencil", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_STENCIL },
2731 { "compressed_r11_eac", GL_COMPRESSED_R11_EAC, tcu::Sampler::MODE_LAST },