panfrost: Match sampler "nearest" names
Midgard calls this nearest but Bifrost calls it point sample. Of the two, nearest is the standard term, so change the Bifrost XML to use that name. That way we can share more code constructing samplers. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11851>
This commit is contained in:
committed by
Marge Bot
parent
fd298985c8
commit
c80732eab3
@@ -176,8 +176,8 @@ panfrost_sampler_desc_init_bifrost(const struct pipe_sampler_state *cso,
|
||||
bool using_nearest = cso->min_img_filter == PIPE_TEX_MIPFILTER_NEAREST;
|
||||
|
||||
pan_pack(hw, BIFROST_SAMPLER, cfg) {
|
||||
cfg.point_sample_magnify = cso->mag_img_filter == PIPE_TEX_FILTER_NEAREST;
|
||||
cfg.point_sample_minify = cso->min_img_filter == PIPE_TEX_FILTER_NEAREST;
|
||||
cfg.magnify_nearest = cso->mag_img_filter == PIPE_TEX_FILTER_NEAREST;
|
||||
cfg.minify_nearest = cso->min_img_filter == PIPE_TEX_FILTER_NEAREST;
|
||||
cfg.mipmap_mode = pan_pipe_to_mipmode(cso->min_mip_filter);
|
||||
cfg.normalized_coordinates = cso->normalized_coords;
|
||||
|
||||
|
||||
@@ -768,8 +768,8 @@
|
||||
<field name="Clamp integer coordinates" size="1" start="0:24" type="bool"/>
|
||||
<field name="Normalized Coordinates" size="1" start="0:25" type="bool" default="true"/>
|
||||
<field name="Clamp integer array indices" size="1" start="0:26" type="bool" default="true"/>
|
||||
<field name="Point sample minify" size="1" start="0:27" type="bool" default="false"/>
|
||||
<field name="Point sample magnify" size="1" start="0:28" type="bool" default="false"/>
|
||||
<field name="Minify nearest" size="1" start="0:27" type="bool" default="false"/>
|
||||
<field name="Magnify nearest" size="1" start="0:28" type="bool" default="false"/>
|
||||
<!--- Set for 0.5, clear for 0.0 -->
|
||||
<field name="Magnify cutoff" size="1" start="0:29" type="bool" default="false"/>
|
||||
<field name="Mipmap Mode" size="2" start="0:30" type="Mipmap Mode" default="Nearest"/>
|
||||
|
||||
@@ -901,8 +901,8 @@ pan_blitter_emit_bifrost_sampler(struct pan_pool *pool,
|
||||
pan_pack(sampler.cpu, BIFROST_SAMPLER, cfg) {
|
||||
cfg.seamless_cube_map = false;
|
||||
cfg.normalized_coordinates = false;
|
||||
cfg.point_sample_minify = nearest_filter;
|
||||
cfg.point_sample_magnify = nearest_filter;
|
||||
cfg.minify_nearest = nearest_filter;
|
||||
cfg.magnify_nearest = nearest_filter;
|
||||
}
|
||||
|
||||
return sampler.gpu;
|
||||
|
||||
@@ -1999,8 +1999,8 @@ panvk_init_bifrost_sampler(struct panvk_sampler *sampler,
|
||||
vk_find_struct_const(pCreateInfo->pNext, SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT);
|
||||
|
||||
pan_pack(&sampler->desc, BIFROST_SAMPLER, cfg) {
|
||||
cfg.point_sample_magnify = pCreateInfo->magFilter == VK_FILTER_LINEAR;
|
||||
cfg.point_sample_minify = pCreateInfo->minFilter == VK_FILTER_LINEAR;
|
||||
cfg.magnify_nearest = pCreateInfo->magFilter == VK_FILTER_LINEAR;
|
||||
cfg.minify_nearest = pCreateInfo->minFilter == VK_FILTER_LINEAR;
|
||||
cfg.mipmap_mode = panvk_translate_sampler_mipmap_mode(pCreateInfo->mipmapMode);
|
||||
cfg.normalized_coordinates = !pCreateInfo->unnormalizedCoordinates;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user