intel-2D: update layout

git-svn-id: svn://kolibrios.org@4304 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2013-11-27 15:43:13 +00:00
parent e840cc28ad
commit 19d2a1e87e
100 changed files with 171 additions and 145 deletions

View File

@ -2345,7 +2345,7 @@ gen4_blit_tex(struct sna *sna,
tmp->dst.bo = dst_bo; tmp->dst.bo = dst_bo;
tmp->dst.width = dst->drawable.width; tmp->dst.width = dst->drawable.width;
tmp->dst.height = dst->drawable.height; tmp->dst.height = dst->drawable.height;
tmp->dst.format = PICT_x8r8g8b8; tmp->dst.format = PICT_a8r8g8b8;
tmp->src.repeat = RepeatNone; tmp->src.repeat = RepeatNone;

View File

@ -3496,7 +3496,7 @@ gen6_blit_tex(struct sna *sna,
tmp->dst.bo = dst_bo; tmp->dst.bo = dst_bo;
tmp->dst.width = dst->drawable.width; tmp->dst.width = dst->drawable.width;
tmp->dst.height = dst->drawable.height; tmp->dst.height = dst->drawable.height;
tmp->dst.format = PICT_x8r8g8b8; tmp->dst.format = PICT_a8r8g8b8;
tmp->src.repeat = SAMPLER_EXTEND_NONE; tmp->src.repeat = SAMPLER_EXTEND_NONE;

View File

@ -2249,7 +2249,7 @@ gen7_blit_tex(struct sna *sna,
tmp->dst.bo = dst_bo; tmp->dst.bo = dst_bo;
tmp->dst.width = dst->drawable.width; tmp->dst.width = dst->drawable.width;
tmp->dst.height = dst->drawable.height; tmp->dst.height = dst->drawable.height;
tmp->dst.format = PICT_x8r8g8b8; tmp->dst.format = PICT_a8r8g8b8;
tmp->src.repeat = RepeatNone; tmp->src.repeat = RepeatNone;

View File

@ -2655,6 +2655,16 @@ void _kgem_submit(struct kgem *kgem)
execbuf.batch_len = batch_end*sizeof(uint32_t); execbuf.batch_len = batch_end*sizeof(uint32_t);
execbuf.flags = kgem->ring | kgem->batch_flags; execbuf.flags = kgem->ring | kgem->batch_flags;
if (DEBUG_DUMP)
{
int fd = open("/tmp1/1/batchbuffer.bin", O_CREAT|O_WRONLY|O_BINARY);
if (fd != -1) {
write(fd, kgem->batch, size);
close(fd);
}
else printf("SNA: failed to write batchbuffer\n");
asm volatile("int3");
}
ret = drmIoctl(kgem->fd, ret = drmIoctl(kgem->fd,
DRM_IOCTL_I915_GEM_EXECBUFFER2, DRM_IOCTL_I915_GEM_EXECBUFFER2,
@ -2676,8 +2686,8 @@ void _kgem_submit(struct kgem *kgem)
ret = drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain); ret = drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain);
} }
if (ret == -1) { if (ret == -1) {
// DBG(("%s: GPU hang detected [%d]\n", DBG(("%s: GPU hang detected [%d]\n",
// __FUNCTION__, errno)); __FUNCTION__, errno));
kgem_throttle(kgem); kgem_throttle(kgem);
kgem->wedged = true; kgem->wedged = true;

View File

@ -28,6 +28,7 @@
#include "sna.h" #include "sna.h"
#include "sna_render.h" #include "sna_render.h"
#include "brw/brw.h" #include "brw/brw.h"
#include <fcntl.h>
int sna_static_stream_init(struct sna_static_stream *stream) int sna_static_stream_init(struct sna_static_stream *stream)
{ {
@ -83,6 +84,21 @@ struct kgem_bo *sna_static_stream_fini(struct sna *sna,
DBG(("uploaded %d bytes of static state\n", stream->used)); DBG(("uploaded %d bytes of static state\n", stream->used));
if (DEBUG_DUMP)
{
int fd = open("/tmp1/1/static.bin", O_CREAT|O_WRONLY|O_BINARY);
if (fd != -1) {
write(fd, stream->data, stream->used);
close(fd);
}
else
{
printf("SNA: failed to write static stream\n");
asm volatile("int3");
}
}
bo = kgem_create_linear(&sna->kgem, stream->used, 0); bo = kgem_create_linear(&sna->kgem, stream->used, 0);
if (bo && !kgem_bo_write(&sna->kgem, bo, stream->data, stream->used)) { if (bo && !kgem_bo_write(&sna->kgem, bo, stream->data, stream->used)) {
kgem_bo_destroy(&sna->kgem, bo); kgem_bo_destroy(&sna->kgem, bo);