Commit 0347d1c3 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig Committed by Marge Bot
Browse files

asahi: Identify seamful cube map bit

Fixes

   dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_nearest

when run with a GLES2 version.

We wire up seamless cube maps for GLES3+ only, working around an obscure
mesa/st limitation. See 6148e3aa

 ("mesa: Fix
ctx->Texture.CubeMapSeamless") for the full context.

Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <!20365>
parent dc87d83a
......@@ -90,7 +90,7 @@ GL 3.2, GLSL 1.50 --- all DONE: freedreno, i965, nv50, nvc0, r600, radeonsi, llv
GL_ARB_draw_elements_base_vertex (Base vertex offset) DONE (v3d, vc4, panfrost, lima, asahi)
GL_ARB_fragment_coord_conventions (Frag shader coord) DONE (v3d, vc4, panfrost, lima, asahi)
GL_ARB_provoking_vertex (Provoking vertex) DONE (v3d, vc4, panfrost, lima, asahi)
GL_ARB_seamless_cube_map (Seamless cubemaps) DONE (panfrost)
GL_ARB_seamless_cube_map (Seamless cubemaps) DONE (panfrost, asahi)
GL_ARB_texture_multisample (Multisample textures) DONE (freedreno/a5xx+, v3d, vc4, panfrost)
GL_ARB_depth_clamp (Frag depth clamp) DONE (panfrost)
GL_ARB_sync (Fence objects) DONE (v3d, vc4, panfrost, lima)
......
......@@ -291,6 +291,7 @@
<field name="Compare func" size="3" start="39" type="Compare func"/>
<field name="Unk 3" size="1" start="42" type="hex" default="1"/>
<field name="Border colour" size="2" start="55" type="Border colour"/>
<field name="Seamful cube maps" size="1" start="57" type="bool"/>
</struct>
<!--- Pointed to from the command buffer -->
......
......@@ -1270,6 +1270,8 @@ agx_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_TEXTURE_MULTISAMPLE:
case PIPE_CAP_SURFACE_SAMPLE_COUNT:
case PIPE_CAP_SAMPLE_SHADING:
case PIPE_CAP_SEAMLESS_CUBE_MAP:
case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
return is_deqp;
case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
......@@ -1318,8 +1320,6 @@ agx_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_FS_FACE_IS_INTEGER_SYSVAL:
case PIPE_CAP_FS_POSITION_IS_SYSVAL:
case PIPE_CAP_SEAMLESS_CUBE_MAP:
case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
return true;
case PIPE_CAP_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_FS_COORD_PIXEL_CENTER_INTEGER:
......
......@@ -407,6 +407,14 @@ agx_create_sampler_state(struct pipe_context *pctx,
cfg.wrap_r = agx_wrap_from_pipe(state->wrap_r);
cfg.pixel_coordinates = state->unnormalized_coords;
cfg.compare_func = agx_compare_funcs[state->compare_func];
/* Only support seamless cube maps if we advertise GLES3. Works around a
* mesa/st bug where seamless_cube_map is set in GLES2 contrary to the
* spec. When we advertise GLES3, this check can be removed.
*/
cfg.seamful_cube_maps =
!(agx_device(pctx->screen)->debug & AGX_DBG_DEQP) ||
!state->seamless_cube_map;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment