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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user