python: Set PIPE_TEXTURE_USAGE_RENDER_TARGET instead of DISPLAY_TARGET.
As the python state tracker is not integrated with window system an cannot present surfaces directly.
This commit is contained in:
parent
1c75edf3e8
commit
76185ecad6
|
@ -136,7 +136,7 @@ def test(dev):
|
|||
cbuf = dev.texture_create(
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM,
|
||||
width, height,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
|
||||
).get_surface()
|
||||
zbuf = dev.texture_create(
|
||||
PIPE_FORMAT_Z16_UNORM,
|
||||
|
|
|
@ -136,7 +136,7 @@ def test(dev):
|
|||
cbuf = dev.texture_create(
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM,
|
||||
width, height,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
|
||||
).get_surface()
|
||||
zbuf = dev.texture_create(
|
||||
PIPE_FORMAT_Z16_UNORM,
|
||||
|
|
|
@ -114,7 +114,7 @@ def test(dev, name):
|
|||
cbuf = dev.texture_create(
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM,
|
||||
width, height,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
|
||||
).get_surface()
|
||||
fb = Framebuffer()
|
||||
fb.width = width
|
||||
|
|
|
@ -114,7 +114,7 @@ def test(dev, name):
|
|||
cbuf = dev.texture_create(
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM,
|
||||
width, height,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
|
||||
tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
|
||||
).get_surface()
|
||||
fb = Framebuffer()
|
||||
fb.width = width
|
||||
|
|
Loading…
Reference in New Issue