mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 10:21:26 +00:00
Rearrange draw struct
This commit is contained in:
parent
67913127ef
commit
dffa052958
@ -112,10 +112,10 @@
|
||||
|
||||
_uniforms.outputSize = simd_make_float2(_context.viewport->full_width, _context.viewport->full_height);
|
||||
|
||||
draw->pipeline.backend_data = &_uniforms;
|
||||
draw->pipeline.backend_data_size = sizeof(_uniforms);
|
||||
draw->backend_data = &_uniforms;
|
||||
draw->backend_data_size = sizeof(_uniforms);
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
/* ribbon */
|
||||
default:
|
||||
@ -200,7 +200,7 @@
|
||||
[rce setScissorRect:_scissorRect];
|
||||
}
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
#if HAVE_SHADERPIPELINE
|
||||
case VIDEO_SHADER_MENU:
|
||||
@ -209,10 +209,10 @@
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
case VIDEO_SHADER_MENU_6:
|
||||
[rce setRenderPipelineState:[_context getStockShader:draw->pipeline.id blend:_blend]];
|
||||
[rce setVertexBytes:draw->pipeline.backend_data length:draw->pipeline.backend_data_size atIndex:BufferIndexUniforms];
|
||||
[rce setRenderPipelineState:[_context getStockShader:draw->pipeline_id blend:_blend]];
|
||||
[rce setVertexBytes:draw->backend_data length:draw->backend_data_size atIndex:BufferIndexUniforms];
|
||||
[rce setVertexBuffer:range.buffer offset:range.offset atIndex:BufferIndexPositions];
|
||||
[rce setFragmentBytes:draw->pipeline.backend_data length:draw->pipeline.backend_data_size atIndex:BufferIndexUniforms];
|
||||
[rce setFragmentBytes:draw->backend_data length:draw->backend_data_size atIndex:BufferIndexUniforms];
|
||||
[rce drawPrimitives:[self _toPrimitiveType:draw->prim_type] vertexStart:0 vertexCount:vertexCount];
|
||||
return;
|
||||
#endif
|
||||
|
@ -68,7 +68,7 @@ static void gfx_display_d3d10_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!d3d10 || !draw || !draw->texture)
|
||||
return;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -76,7 +76,7 @@ static void gfx_display_d3d10_draw(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
case VIDEO_SHADER_MENU_6:
|
||||
d3d10_set_shader(d3d10->device, &d3d10->shaders[draw->pipeline.id]);
|
||||
d3d10_set_shader(d3d10->device, &d3d10->shaders[draw->pipeline_id]);
|
||||
D3D10Draw(d3d10->device, draw->coords->vertices, 0);
|
||||
|
||||
D3D10SetBlendState(d3d10->device, d3d10->blend_enable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
|
||||
@ -189,7 +189,7 @@ static void gfx_display_d3d10_draw_pipeline(gfx_display_ctx_draw_t* draw,
|
||||
if (!d3d10 || !draw)
|
||||
return;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
|
@ -67,7 +67,7 @@ static void gfx_display_d3d11_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!d3d11 || !draw || !draw->texture)
|
||||
return;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -75,7 +75,7 @@ static void gfx_display_d3d11_draw(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
case VIDEO_SHADER_MENU_6:
|
||||
d3d11_set_shader(d3d11->context, &d3d11->shaders[draw->pipeline.id]);
|
||||
d3d11_set_shader(d3d11->context, &d3d11->shaders[draw->pipeline_id]);
|
||||
D3D11Draw(d3d11->context, draw->coords->vertices, 0);
|
||||
|
||||
D3D11SetBlendState(d3d11->context, d3d11->blend_enable, NULL, D3D11_DEFAULT_SAMPLE_MASK);
|
||||
@ -188,7 +188,7 @@ static void gfx_display_d3d11_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
if (!d3d11 || !draw)
|
||||
return;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
|
@ -69,7 +69,7 @@ static void gfx_display_d3d12_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!d3d12 || !draw || !draw->texture)
|
||||
return;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -77,7 +77,7 @@ static void gfx_display_d3d12_draw(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
case VIDEO_SHADER_MENU_6:
|
||||
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->pipes[draw->pipeline.id]);
|
||||
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->pipes[draw->pipeline_id]);
|
||||
D3D12DrawInstanced(d3d12->queue.cmd, draw->coords->vertices, 1, 0, 0);
|
||||
D3D12SetPipelineState(d3d12->queue.cmd, d3d12->sprites.pipe);
|
||||
D3D12IASetPrimitiveTopology(d3d12->queue.cmd, D3D_PRIMITIVE_TOPOLOGY_POINTLIST);
|
||||
@ -205,7 +205,7 @@ static void gfx_display_d3d12_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
if (!d3d12 || !draw)
|
||||
return;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
|
@ -125,7 +125,7 @@ static void gfx_display_d3d8_draw(gfx_display_ctx_draw_t *draw,
|
||||
const float *tex_coord = NULL;
|
||||
const float *color = NULL;
|
||||
|
||||
if (!d3d || !draw || draw->pipeline.id)
|
||||
if (!d3d || !draw || draw->pipeline_id)
|
||||
return;
|
||||
if ((d3d->menu_display.offset + draw->coords->vertices )
|
||||
> (unsigned)d3d->menu_display.size)
|
||||
|
@ -125,7 +125,7 @@ static void gfx_display_d3d9_draw(gfx_display_ctx_draw_t *draw,
|
||||
const float *tex_coord = NULL;
|
||||
const float *color = NULL;
|
||||
|
||||
if (!d3d || !draw || draw->pipeline.id)
|
||||
if (!d3d || !draw || draw->pipeline_id)
|
||||
return;
|
||||
|
||||
dev = d3d->dev;
|
||||
@ -233,7 +233,7 @@ static void gfx_display_d3d9_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
if (ca)
|
||||
draw->coords = (struct video_coords*)&ca->coords;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -247,7 +247,7 @@ static void gfx_display_d3d9_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
uniform_param.enabled = true;
|
||||
uniform_param.lookup.enable = true;
|
||||
uniform_param.lookup.add_prefix = true;
|
||||
uniform_param.lookup.idx = draw->pipeline.id;
|
||||
uniform_param.lookup.idx = draw->pipeline_id;
|
||||
uniform_param.lookup.type = SHADER_PROGRAM_VERTEX;
|
||||
uniform_param.type = UNIFORM_1F;
|
||||
uniform_param.lookup.ident = "time";
|
||||
|
@ -274,7 +274,7 @@ static void gfx_display_gl_draw_pipeline(
|
||||
draw->coords = (struct video_coords*)(&ca->coords);
|
||||
draw->matrix_data = NULL;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -285,7 +285,7 @@ static void gfx_display_gl_draw_pipeline(
|
||||
break;
|
||||
}
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -293,7 +293,7 @@ static void gfx_display_gl_draw_pipeline(
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
case VIDEO_SHADER_MENU_6:
|
||||
gl->shader->use(gl, gl->shader_data, draw->pipeline.id,
|
||||
gl->shader->use(gl, gl->shader_data, draw->pipeline_id,
|
||||
true);
|
||||
|
||||
t += 0.01;
|
||||
@ -305,7 +305,7 @@ static void gfx_display_gl_draw_pipeline(
|
||||
|
||||
uniform_param.lookup.type = SHADER_PROGRAM_VERTEX;
|
||||
uniform_param.lookup.ident = "time";
|
||||
uniform_param.lookup.idx = draw->pipeline.id;
|
||||
uniform_param.lookup.idx = draw->pipeline_id;
|
||||
uniform_param.lookup.add_prefix = true;
|
||||
uniform_param.lookup.enable = true;
|
||||
|
||||
@ -316,7 +316,7 @@ static void gfx_display_gl_draw_pipeline(
|
||||
break;
|
||||
}
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU_3:
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
|
@ -101,7 +101,7 @@ static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
output_size[0] = (float)video_width;
|
||||
output_size[1] = (float)video_height;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
/* Ribbon */
|
||||
default:
|
||||
@ -109,8 +109,8 @@ static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
ca = gfx_display_get_coords_array();
|
||||
draw->coords = (struct video_coords*)&ca->coords;
|
||||
draw->pipeline.backend_data = ubo_scratch_data;
|
||||
draw->pipeline.backend_data_size = 2 * sizeof(float);
|
||||
draw->backend_data = ubo_scratch_data;
|
||||
draw->backend_data_size = 2 * sizeof(float);
|
||||
|
||||
/* Match UBO layout in shader. */
|
||||
yflip = -1.0f;
|
||||
@ -122,8 +122,8 @@ static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU_3:
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
draw->pipeline.backend_data = ubo_scratch_data;
|
||||
draw->pipeline.backend_data_size = sizeof(math_matrix_4x4)
|
||||
draw->backend_data = ubo_scratch_data;
|
||||
draw->backend_data_size = sizeof(math_matrix_4x4)
|
||||
+ 4 * sizeof(float);
|
||||
|
||||
/* Match UBO layout in shader. */
|
||||
@ -134,7 +134,7 @@ static void gfx_display_gl_core_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
output_size,
|
||||
sizeof(output_size));
|
||||
|
||||
if (draw->pipeline.id == VIDEO_SHADER_MENU_5)
|
||||
if (draw->pipeline_id == VIDEO_SHADER_MENU_5)
|
||||
yflip = 1.0f;
|
||||
|
||||
memcpy(ubo_scratch_data + sizeof(math_matrix_4x4)
|
||||
@ -182,7 +182,7 @@ static void gfx_display_gl_core_draw(gfx_display_ctx_draw_t *draw,
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -193,7 +193,7 @@ static void gfx_display_gl_core_draw(gfx_display_ctx_draw_t *draw,
|
||||
break;
|
||||
}
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
case VIDEO_SHADER_MENU:
|
||||
@ -230,13 +230,13 @@ static void gfx_display_gl_core_draw(gfx_display_ctx_draw_t *draw,
|
||||
|
||||
if (loc && loc->flat_ubo_vertex >= 0)
|
||||
glUniform4fv(loc->flat_ubo_vertex,
|
||||
(GLsizei)((draw->pipeline.backend_data_size + 15) / 16),
|
||||
(const GLfloat*)draw->pipeline.backend_data);
|
||||
(GLsizei)((draw->backend_data_size + 15) / 16),
|
||||
(const GLfloat*)draw->backend_data);
|
||||
|
||||
if (loc && loc->flat_ubo_fragment >= 0)
|
||||
glUniform4fv(loc->flat_ubo_fragment,
|
||||
(GLsizei)((draw->pipeline.backend_data_size + 15) / 16),
|
||||
(const GLfloat*)draw->pipeline.backend_data);
|
||||
(GLsizei)((draw->backend_data_size + 15) / 16),
|
||||
(const GLfloat*)draw->backend_data);
|
||||
|
||||
if (!loc)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
||||
vertices[i].a = *color++;
|
||||
}
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
default:
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ static void gfx_display_vk_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
output_size[0] = (float)vk->context->swapchain_width;
|
||||
output_size[1] = (float)vk->context->swapchain_height;
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
/* Ribbon */
|
||||
default:
|
||||
@ -145,8 +145,8 @@ static void gfx_display_vk_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
ca = gfx_display_get_coords_array();
|
||||
draw->coords = (struct video_coords*)&ca->coords;
|
||||
draw->pipeline.backend_data = ubo_scratch_data;
|
||||
draw->pipeline.backend_data_size = 2 * sizeof(float);
|
||||
draw->backend_data = ubo_scratch_data;
|
||||
draw->backend_data_size = 2 * sizeof(float);
|
||||
|
||||
/* Match UBO layout in shader. */
|
||||
yflip = 1.0f;
|
||||
@ -158,8 +158,8 @@ static void gfx_display_vk_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
case VIDEO_SHADER_MENU_3:
|
||||
case VIDEO_SHADER_MENU_4:
|
||||
case VIDEO_SHADER_MENU_5:
|
||||
draw->pipeline.backend_data = ubo_scratch_data;
|
||||
draw->pipeline.backend_data_size = sizeof(math_matrix_4x4)
|
||||
draw->backend_data = ubo_scratch_data;
|
||||
draw->backend_data_size = sizeof(math_matrix_4x4)
|
||||
+ 4 * sizeof(float);
|
||||
|
||||
/* Match UBO layout in shader. */
|
||||
@ -171,7 +171,7 @@ static void gfx_display_vk_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
sizeof(output_size));
|
||||
|
||||
/* Shader uses FragCoord, need to fix up. */
|
||||
if (draw->pipeline.id == VIDEO_SHADER_MENU_5)
|
||||
if (draw->pipeline_id == VIDEO_SHADER_MENU_5)
|
||||
yflip = -1.0f;
|
||||
else
|
||||
yflip = 1.0f;
|
||||
@ -245,7 +245,7 @@ static void gfx_display_vk_draw(gfx_display_ctx_draw_t *draw,
|
||||
pv->color.a = *color++;
|
||||
}
|
||||
|
||||
switch (draw->pipeline.id)
|
||||
switch (draw->pipeline_id)
|
||||
{
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
case VIDEO_SHADER_MENU:
|
||||
@ -257,11 +257,11 @@ static void gfx_display_vk_draw(gfx_display_ctx_draw_t *draw,
|
||||
struct vk_draw_triangles call;
|
||||
|
||||
call.pipeline = vk->display.pipelines[
|
||||
to_menu_pipeline(draw->prim_type, draw->pipeline.id)];
|
||||
to_menu_pipeline(draw->prim_type, draw->pipeline_id)];
|
||||
call.texture = NULL;
|
||||
call.sampler = VK_NULL_HANDLE;
|
||||
call.uniform = draw->pipeline.backend_data;
|
||||
call.uniform_size = draw->pipeline.backend_data_size;
|
||||
call.uniform = draw->backend_data;
|
||||
call.uniform_size = draw->backend_data_size;
|
||||
call.vbo = ⦥
|
||||
call.vertices = draw->coords->vertices;
|
||||
|
||||
|
@ -43,11 +43,11 @@ static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
||||
if (!wiiu || !draw)
|
||||
return;
|
||||
|
||||
if (draw->pipeline.id)
|
||||
if (draw->pipeline_id)
|
||||
{
|
||||
GX2SetShaderMode(GX2_SHADER_MODE_UNIFORM_BLOCK);
|
||||
|
||||
switch(draw->pipeline.id)
|
||||
switch(draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
GX2SetShader(&ribbon_shader);
|
||||
@ -71,7 +71,7 @@ static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
||||
break;
|
||||
}
|
||||
|
||||
switch(draw->pipeline.id)
|
||||
switch(draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
@ -220,7 +220,7 @@ static void gfx_display_wiiu_draw_pipeline(gfx_display_ctx_draw_t *draw,
|
||||
if (!wiiu || !draw)
|
||||
return;
|
||||
|
||||
switch(draw->pipeline.id)
|
||||
switch(draw->pipeline_id)
|
||||
{
|
||||
case VIDEO_SHADER_MENU:
|
||||
case VIDEO_SHADER_MENU_2:
|
||||
|
@ -889,7 +889,7 @@ void gfx_display_draw_quad(
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
draw.scale_factor = 1.0f;
|
||||
draw.rotation = 0.0f;
|
||||
|
||||
@ -943,7 +943,7 @@ void gfx_display_draw_polygon(
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
draw.scale_factor = 1.0f;
|
||||
draw.rotation = 0.0f;
|
||||
|
||||
@ -982,7 +982,7 @@ void gfx_display_draw_texture(
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
coords.color = (const float*)color;
|
||||
|
||||
gfx_display_rotate_z(&rotate_draw, userdata);
|
||||
@ -1114,7 +1114,7 @@ void gfx_display_draw_texture_slice(
|
||||
draw.coords = &coords;
|
||||
draw.matrix_data = &mymat;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
coords.color = (const float*)(color == NULL ? colors : color);
|
||||
|
||||
gfx_display_rotate_z(&rotate_draw, userdata);
|
||||
@ -1399,7 +1399,7 @@ void gfx_display_draw_cursor(
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_draw(&draw, userdata, video_width, video_height);
|
||||
|
||||
|
@ -147,27 +147,24 @@ typedef struct gfx_display_ctx_driver
|
||||
|
||||
struct gfx_display_ctx_draw
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float *color;
|
||||
const float *vertex;
|
||||
const float *tex_coord;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
uintptr_t texture;
|
||||
size_t vertex_count;
|
||||
const void *backend_data;
|
||||
struct video_coords *coords;
|
||||
void *matrix_data;
|
||||
enum gfx_display_prim_type prim_type;
|
||||
struct
|
||||
{
|
||||
unsigned id;
|
||||
const void *backend_data;
|
||||
size_t backend_data_size;
|
||||
bool active;
|
||||
} pipeline;
|
||||
bool pipeline_active;
|
||||
float x;
|
||||
float y;
|
||||
float rotation;
|
||||
float scale_factor;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
unsigned pipeline_id;
|
||||
uintptr_t texture;
|
||||
size_t vertex_count;
|
||||
size_t backend_data_size;
|
||||
};
|
||||
|
||||
typedef struct gfx_display_ctx_rotate_draw
|
||||
|
@ -777,7 +777,7 @@ void gfx_thumbnail_draw(
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = thumbnail->texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
/* Set thumbnail alignment within bounding box */
|
||||
switch (alignment)
|
||||
|
@ -637,7 +637,7 @@ void gfx_widgets_draw_icon(
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_draw(&draw, userdata,
|
||||
video_width, video_height);
|
||||
@ -688,7 +688,7 @@ static void gfx_widgets_draw_icon_blend(
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_draw_blend(&draw, userdata,
|
||||
video_width, video_height);
|
||||
|
@ -2251,7 +2251,7 @@ static void materialui_draw_icon(
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_draw(&draw, userdata,
|
||||
video_width, video_height);
|
||||
@ -4904,9 +4904,9 @@ static void materialui_render_background(materialui_handle_t *mui,
|
||||
draw.vertex = NULL;
|
||||
draw.tex_coord = NULL;
|
||||
draw.vertex_count = 4;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline.active = false;
|
||||
draw.pipeline.backend_data = NULL;
|
||||
draw.pipeline_id = 0;
|
||||
draw.pipeline_active = false;
|
||||
draw.backend_data = NULL;
|
||||
draw.color = draw_color;
|
||||
|
||||
if (mui->textures.bg && !libretro_running)
|
||||
|
@ -323,7 +323,7 @@ void ozone_draw_icon(
|
||||
draw.matrix_data = &mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_draw(&draw, userdata,
|
||||
video_width, video_height);
|
||||
|
@ -606,7 +606,7 @@ static void stripes_draw_icon(
|
||||
draw.matrix_data = mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
if (xmb_shadows_enable)
|
||||
{
|
||||
@ -2795,7 +2795,7 @@ static void stripes_draw_bg(
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_blend_begin(userdata);
|
||||
gfx_display_draw(&draw, userdata,
|
||||
@ -2836,7 +2836,7 @@ static void stripes_draw_dark_layer(
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_blend_begin(userdata);
|
||||
gfx_display_draw(&draw, userdata,
|
||||
|
@ -822,7 +822,7 @@ static void xmb_draw_icon(
|
||||
draw.matrix_data = mymat;
|
||||
draw.texture = texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
if (xmb_shadows_enable)
|
||||
{
|
||||
@ -3796,8 +3796,8 @@ static void xmb_draw_bg(
|
||||
draw.tex_coord = NULL;
|
||||
draw.vertex_count = 4;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline.active = xmb_shader_pipeline_active(menu_shader_pipeline);
|
||||
draw.pipeline_id = 0;
|
||||
draw.pipeline_active = xmb_shader_pipeline_active(menu_shader_pipeline);
|
||||
|
||||
gfx_display_blend_begin(userdata);
|
||||
gfx_display_set_viewport(video_width, video_height);
|
||||
@ -3821,24 +3821,24 @@ static void xmb_draw_bg(
|
||||
menu_wallpaper_opacity
|
||||
);
|
||||
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_2;
|
||||
draw.pipeline_id = VIDEO_SHADER_MENU_2;
|
||||
|
||||
switch (menu_shader_pipeline)
|
||||
{
|
||||
case XMB_SHADER_PIPELINE_RIBBON:
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU;
|
||||
draw.pipeline_id = VIDEO_SHADER_MENU;
|
||||
break;
|
||||
case XMB_SHADER_PIPELINE_SIMPLE_SNOW:
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_3;
|
||||
draw.pipeline_id = VIDEO_SHADER_MENU_3;
|
||||
break;
|
||||
case XMB_SHADER_PIPELINE_SNOW:
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_4;
|
||||
draw.pipeline_id = VIDEO_SHADER_MENU_4;
|
||||
break;
|
||||
case XMB_SHADER_PIPELINE_BOKEH:
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_5;
|
||||
draw.pipeline_id = VIDEO_SHADER_MENU_5;
|
||||
break;
|
||||
case XMB_SHADER_PIPELINE_SNOWFLAKE:
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_6;
|
||||
draw.pipeline_id = VIDEO_SHADER_MENU_6;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -3922,7 +3922,7 @@ static void xmb_draw_dark_layer(
|
||||
draw.matrix_data = NULL;
|
||||
draw.texture = gfx_display_white_texture;
|
||||
draw.prim_type = GFX_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline_id = 0;
|
||||
|
||||
gfx_display_blend_begin(userdata);
|
||||
gfx_display_draw(&draw, userdata,
|
||||
|
Loading…
x
Reference in New Issue
Block a user