diff --git a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt index e066b512ffc..98a515a6ed0 100644 --- a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt +++ b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt @@ -140,12 +140,6 @@ spec@!opengl 1.2@texwrap 3d proj@GL_RGBA8- NPOT- projected,Fail spec@!opengl 1.2@texwrap 3d proj bordercolor,Fail spec@!opengl 1.2@texwrap 3d proj bordercolor@GL_RGBA8- projected- border color only,Fail spec@!opengl 1.4@gl-1.4-polygon-offset,Fail - -# 1D textures are treated as 2D, but we don't force -# the Y clamp to repeat or edge, so you get interpolation, and we get -# different undefined values in the y coordinate in the new shader. -spec@!opengl 1.4@gl-1.4-tex1d-2dborder,Fail - spec@!opengl 1.4@tex-miplevel-selection,Fail spec@!opengl 1.4@tex-miplevel-selection-lod,Fail spec@!opengl 1.4@tex-miplevel-selection-lod-bias,Fail diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c index c04059dcc2e..f8d478ea00b 100644 --- a/src/gallium/drivers/i915/i915_state_sampler.c +++ b/src/gallium/drivers/i915/i915_state_sampler.c @@ -89,6 +89,14 @@ update_sampler(struct i915_context *i915, uint32_t unit, state[0] |= SS2_REVERSE_GAMMA_ENABLE; } + /* There is no HW support for 1D textures, so we just make them 2D textures + * with h=1, but that means we need to make the Y coordinate not contribute + * to bringing any border color in. Clearing it sets it to WRAP. + */ + if (pt->target == PIPE_TEXTURE_1D) { + state[1] &= ~SS3_TCY_ADDR_MODE_MASK; + } + /* The GLES2 spec says textures are incomplete (return 0,0,0,1) if: * * "A cube map sampler is called, any of the corresponding texture images are