Subversion Repositories Kolibri OS

Rev

Rev 3280 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3280 Rev 3291
Line 253... Line 253...
253
 
253
 
254
 
254
 
Line -... Line 255...
-
 
255
    src = GEN7_BLENDFACTOR_ONE; //gen6_blend_op[op].src_blend;
255
    src = GEN7_BLENDFACTOR_ONE; //gen6_blend_op[op].src_blend;
256
    dst = GEN7_BLENDFACTOR_INV_SRC_ALPHA; //gen6_blend_op[op].dst_blend;
256
    dst = GEN7_BLENDFACTOR_INV_SRC_ALPHA; //gen6_blend_op[op].dst_blend;
257
 
257
 
258
 
258
#if 0
259
#if 0
259
	/* If there's no dst alpha channel, adjust the blend op so that
260
	/* If there's no dst alpha channel, adjust the blend op so that
Line 1355... Line 1356...
1355
		sna->render.vertex_used = sna->render.vertex_index * op->floats_per_vertex;
1356
		sna->render.vertex_used = sna->render.vertex_index * op->floats_per_vertex;
1356
		sna->render_state.gen7.floats_per_vertex = op->floats_per_vertex;
1357
		sna->render_state.gen7.floats_per_vertex = op->floats_per_vertex;
1357
	}
1358
	}
1358
}
1359
}
Line -... Line 1360...
-
 
1360
 
-
 
1361
fastcall static void
-
 
1362
gen7_render_composite_blt(struct sna *sna,
-
 
1363
			  const struct sna_composite_op *op,
-
 
1364
			  const struct sna_composite_rectangles *r)
-
 
1365
{
-
 
1366
	gen7_get_rectangles(sna, op, 1, gen7_emit_composite_state);
-
 
1367
	op->prim_emit(sna, op, r);
1359
 
1368
}
1360
static uint32_t
1369
static uint32_t
1361
gen7_composite_create_blend_state(struct sna_static_stream *stream)
1370
gen7_composite_create_blend_state(struct sna_static_stream *stream)
1362
{
1371
{
1363
	char *base, *ptr;
1372
	char *base, *ptr;
Line 1388... Line 1397...
1388
 
1397
 
1389
	return sna_static_stream_offsetof(stream, base);
1398
	return sna_static_stream_offsetof(stream, base);
Line 1390... Line -...
1390
}
-
 
1391
 
-
 
1392
 
-
 
1393
fastcall static void
-
 
1394
gen7_render_composite_blt(struct sna *sna,
-
 
1395
			  const struct sna_composite_op *op,
-
 
1396
			  const struct sna_composite_rectangles *r)
-
 
1397
{
-
 
Line 1398... Line 1399...
1398
	gen7_get_rectangles(sna, op, 1, gen7_emit_composite_state);
1399
}
1399
	op->prim_emit(sna, op, r);
1400
 
1400
}
1401
 
1401
 
1402
 
Line -... Line 1501...
-
 
1501
 
-
 
1502
 
-
 
1503
 
-
 
1504
 
-
 
1505
 
-
 
1506
 
-
 
1507
 
-
 
1508
 
-
 
1509
 
-
 
1510
 
-
 
1511
 
-
 
1512
 
-
 
1513
 
-
 
1514
 
-
 
1515
 
-
 
1516
 
-
 
1517
 
-
 
1518
 
-
 
1519
 
-
 
1520
 
-
 
1521
 
-
 
1522
 
-
 
1523
 
-
 
1524
 
-
 
1525
 
-
 
1526
 
-
 
1527
 
-
 
1528
 
-
 
1529
 
-
 
1530
 
-
 
1531
 
-
 
1532
 
-
 
1533
 
-
 
1534
 
-
 
1535
 
-
 
1536
 
-
 
1537
 
-
 
1538
 
-
 
1539
 
-
 
1540
 
-
 
1541
 
-
 
1542
 
-
 
1543
 
-
 
1544
 
-
 
1545
 
-
 
1546
 
-
 
1547
 
-
 
1548
 
-
 
1549
 
-
 
1550
 
-
 
1551
 
-
 
1552
 
-
 
1553
 
-
 
1554
 
-
 
1555
 
-
 
1556
 
-
 
1557
 
-
 
1558
 
-
 
1559
 
-
 
1560
 
-
 
1561
 
-
 
1562
 
-
 
1563
 
-
 
1564
 
-
 
1565
 
-
 
1566
 
-
 
1567
 
-
 
1568
 
-
 
1569
 
-
 
1570
 
-
 
1571
 
-
 
1572
 
-
 
1573
 
-
 
1574
 
-
 
1575
 
-
 
1576
 
-
 
1577
 
-
 
1578
 
-
 
1579
 
-
 
1580
 
-
 
1581
 
-
 
1582
 
-
 
1583
 
-
 
1584
 
-
 
1585
 
-
 
1586
 
-
 
1587
 
1500
 
1588
 
1501
 
1589
 
1502
 
1590
 
Line 1503... Line 1591...
1503
 
1591
 
1504
 
1592
 
1505
static void gen7_render_flush(struct sna *sna)
1593
static void gen7_render_flush(struct sna *sna)
Line 1506... Line -...
1506
{
-
 
1507
	gen4_vertex_close(sna);
-
 
1508
 
1594
{
1509
	assert(sna->render.vb_id == 0);
1595
	gen4_vertex_close(sna);
1510
	assert(sna->render.vertex_offset == 0);
1596
 
1511
}
1597
	assert(sna->render.vb_id == 0);
1512
 
1598
	assert(sna->render.vertex_offset == 0);
Line 1591... Line 1677...
1591
static bool is_mobile(struct sna *sna)
1677
static bool is_mobile(struct sna *sna)
1592
{
1678
{
1593
	return (DEVICE_ID(sna->PciInfo) & 0xf) == 0x6;
1679
	return (DEVICE_ID(sna->PciInfo) & 0xf) == 0x6;
1594
}
1680
}
Line 1595... Line -...
1595
 
-
 
1596
 
1681
 
1597
static bool gen7_render_setup(struct sna *sna)
1682
static bool gen7_render_setup(struct sna *sna)
1598
{
1683
{
1599
    struct gen7_render_state *state = &sna->render_state.gen7;
1684
    struct gen7_render_state *state = &sna->render_state.gen7;
1600
    struct sna_static_stream general;
1685
    struct sna_static_stream general;
Line 1678... Line 1763...
1678
 
1763
 
1679
    state->general_bo = sna_static_stream_fini(sna, &general);
1764
    state->general_bo = sna_static_stream_fini(sna, &general);
1680
    return state->general_bo != NULL;
1765
    return state->general_bo != NULL;
Line 1681... Line -...
1681
}
-
 
1682
 
1766
}
1683
 
1767
 
1684
bool gen7_render_init(struct sna *sna)
1768
bool gen7_render_init(struct sna *sna)
1685
{
1769
{
Line 1696... Line 1780...
1696
    sna->render.reset = gen7_render_reset;
1780
    sna->render.reset = gen7_render_reset;
1697
    sna->render.fini = gen7_render_fini;
1781
    sna->render.fini = gen7_render_fini;
Line 1698... Line 1782...
1698
 
1782
 
1699
    sna->render.max_3d_size = GEN7_MAX_SIZE;
1783
    sna->render.max_3d_size = GEN7_MAX_SIZE;
-
 
1784
    sna->render.max_3d_pitch = 1 << 18;
-
 
1785
    sna->render.caps = HW_BIT_BLIT | HW_TEX_BLIT;
1700
    sna->render.max_3d_pitch = 1 << 18;
1786
    
1701
    return true;
1787
    return true;