On Wed, Jan 3, 2018 at 4:18 PM, Sven Hesse shesse@codeweavers.com wrote:
Signed-off-by: Sven Hesse shesse@codeweavers.com
dlls/wined3d/texture.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 03871d7158..ac441fe677 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1643,7 +1643,30 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
static void texture1d_prepare_texture(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) {
- FIXME("Not implemented.\n");
- const struct wined3d_format *format = texture->resource.format;
- GLenum internal = srgb ? format->glGammaInternal : format->glInternal;
- unsigned int sub_count = texture->level_count * texture->layer_count;
- const struct wined3d_gl_info *gl_info = context->gl_info;
- unsigned int i;
- wined3d_texture_bind_and_dirtify(texture, context, srgb);
- if (wined3d_texture_use_immutable_storage(texture, gl_info))
- {
GL_EXTCALL(glTexStorage1D(GL_TEXTURE_1D, texture->level_count, internal,
wined3d_texture_get_level_width(texture, 0)));
checkGLcall("glTexStorage1D");
- }
- else
- {
for (i = 0; i < sub_count; ++i)
{
gl_info->gl_ops.gl.p_glTexImage1D(GL_TEXTURE_1D, i, internal,
wined3d_texture_get_level_width(texture, i),
0, format->glFormat, format->glType, NULL);
checkGLcall("glTexImage1D");
}
- }
}
We need to handle 1D array textures in texture1d_prepare_texture().