Correctly set normalized mode in zeSamplerCreate()
Change-Id: If9d595136668e2a12b1871c7dc06f96101eba10d Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
parent
e8085c5740
commit
ac4e9c129a
|
@ -22,6 +22,8 @@ ze_result_t SamplerCoreFamily<gfxCoreFamily>::initialize(Device *device, const z
|
|||
return ret;
|
||||
}
|
||||
|
||||
samplerState.setNonNormalizedCoordinateEnable(!desc->isNormalized);
|
||||
|
||||
auto addressControlModeX = SAMPLER_STATE::TEXTURE_COORDINATE_MODE_CLAMP_BORDER;
|
||||
auto addressControlModeY = SAMPLER_STATE::TEXTURE_COORDINATE_MODE_CLAMP_BORDER;
|
||||
auto addressControlModeZ = SAMPLER_STATE::TEXTURE_COORDINATE_MODE_CLAMP_BORDER;
|
||||
|
|
|
@ -57,6 +57,12 @@ HWTEST2_P(SamplerCreateTest, givenDifferentDescriptorValuesThenSamplerIsCorrectl
|
|||
|
||||
sampler->initialize(device, &desc);
|
||||
|
||||
if (isNormalized == static_cast<ze_bool_t>(true)) {
|
||||
EXPECT_FALSE(sampler->samplerState.getNonNormalizedCoordinateEnable());
|
||||
} else {
|
||||
EXPECT_TRUE(sampler->samplerState.getNonNormalizedCoordinateEnable());
|
||||
}
|
||||
|
||||
if (addressMode == ZE_SAMPLER_ADDRESS_MODE_NONE) {
|
||||
EXPECT_EQ(SAMPLER_STATE::TEXTURE_COORDINATE_MODE_CLAMP_BORDER,
|
||||
sampler->samplerState.getTcxAddressControlMode());
|
||||
|
|
Loading…
Reference in New Issue