i915g: Force 1D textures to use wrap mode for the Y coordinate.
There are no 1D textures in HW, so we use 2D, but at the shader level there no Y coordinate to 1D sampling, so we need that value to be ignored. WRAP mode can get us that. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11457>
This commit is contained in:
parent
9cc4ce16fd
commit
d0ac174fda
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue