From: Matteo Bruni Subject: Re: [PATCH v3 2/9] wined3d: Add 1D textures to get_texture_view_target(). Message-Id: Date: Wed, 7 Feb 2018 19:25:14 +0100 In-Reply-To: <20180207153509.10627-2-shesse@codeweavers.com> References: <20180207153509.10627-1-shesse@codeweavers.com> <20180207153509.10627-2-shesse@codeweavers.com> 2018-02-07 16:35 GMT+01:00 Sven Hesse : > Signed-off-by: Sven Hesse > --- > dlls/wined3d/view.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c > index b06daccca1..dce585f6e2 100644 > --- a/dlls/wined3d/view.c > +++ b/dlls/wined3d/view.c > @@ -59,6 +59,11 @@ static GLenum get_texture_view_target(const struct wined3d_gl_info *gl_info, > {GL_TEXTURE_2D_MULTISAMPLE, WINED3D_VIEW_TEXTURE_ARRAY, GL_TEXTURE_2D_MULTISAMPLE_ARRAY}, > {GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 0, GL_TEXTURE_2D_MULTISAMPLE}, > {GL_TEXTURE_2D_MULTISAMPLE_ARRAY, WINED3D_VIEW_TEXTURE_ARRAY, GL_TEXTURE_2D_MULTISAMPLE_ARRAY}, > + > + {GL_TEXTURE_1D, 0, GL_TEXTURE_1D}, > + {GL_TEXTURE_1D, WINED3D_VIEW_TEXTURE_ARRAY, GL_TEXTURE_1D_ARRAY}, > + {GL_TEXTURE_1D_ARRAY, 0, GL_TEXTURE_1D}, > + {GL_TEXTURE_1D_ARRAY, WINED3D_VIEW_TEXTURE_ARRAY, GL_TEXTURE_1D_ARRAY}, > }; > unsigned int i; Just putting it out there for consideration: what about using GL_TEXTURE_2D and GL_TEXTURE_2D_ARRAY for 1D d3d textures instead? OpenGL ES doesn't support 1D textures so we'd have to add a code path using 2D textures anyway at some point. Also AFAIU 1D textures aren't supported in HW at least on AMD Vega, which means that, in some cases at least, they are emulated on top of 2D textures anyway. I think that should be mostly a matter of using 2D GL textures and samplers and fixing up texture coordinates in GLSL sample instructions. I haven't put too much thought into it though so there might be some caveat I don't see at the moment.