#include "main/teximage.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
#include "main/teximage.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
- usage = PIPE_BIND_RENDER_TARGET;
- ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
+ ps = st_manager_get_egl_image_surface(st, (void *) image_handle);
if (ps) {
strb->Base.Width = ps->width;
strb->Base.Height = ps->height;
strb->Base.Format = st_pipe_format_to_mesa_format(ps->format);
if (ps) {
strb->Base.Width = ps->width;
strb->Base.Height = ps->height;
strb->Base.Format = st_pipe_format_to_mesa_format(ps->format);
strb->Base._BaseFormat = st_pipe_format_to_base_format(ps->format);
strb->Base.InternalFormat = strb->Base._BaseFormat;
strb->Base._BaseFormat = st_pipe_format_to_base_format(ps->format);
strb->Base.InternalFormat = strb->Base._BaseFormat;
/* map pipe format to base format */
if (util_format_get_component_bits(ps->format, UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
/* map pipe format to base format */
if (util_format_get_component_bits(ps->format, UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
ps->width, ps->height, 1, 0, internalFormat,
texFormat);
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stObj->pt, ps->texture);
ps->width, ps->height, 1, 0, internalFormat,
texFormat);
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stObj->pt, ps->texture);
pipe_resource_reference(&stImage->pt, stObj->pt);
stObj->width0 = ps->width;
stObj->height0 = ps->height;
stObj->depth0 = 1;
pipe_resource_reference(&stImage->pt, stObj->pt);
stObj->width0 = ps->width;
stObj->height0 = ps->height;
stObj->depth0 = 1;
- usage = PIPE_BIND_SAMPLER_VIEW;
- ps = st_manager_get_egl_image_surface(st, (void *) image_handle, usage);
+ ps = st_manager_get_egl_image_surface(st, (void *) image_handle);
if (ps) {
st_bind_surface(ctx, target, texObj, texImage, ps);
pipe_surface_reference(&ps, NULL);
if (ps) {
st_bind_surface(ctx, target, texObj, texImage, ps);
pipe_surface_reference(&ps, NULL);
functions->EGLImageTargetTexture2D = st_egl_image_target_texture_2d;
functions->EGLImageTargetRenderbufferStorage = st_egl_image_target_renderbuffer_storage;
}
functions->EGLImageTargetTexture2D = st_egl_image_target_texture_2d;
functions->EGLImageTargetRenderbufferStorage = st_egl_image_target_renderbuffer_storage;
}