Rev 3255 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3255 | Rev 3280 | ||
---|---|---|---|
Line 91... | Line 91... | ||
91 | 91 | ||
Line 92... | Line 92... | ||
92 | free(stream->data); |
92 | free(stream->data); |
93 | 93 | ||
- | 94 | return bo; |
|
- | 95 | } |
|
- | 96 | ||
- | 97 | unsigned |
|
- | 98 | sna_static_stream_compile_sf(struct sna *sna, |
|
- | 99 | struct sna_static_stream *stream, |
|
- | 100 | bool (*compile)(struct brw_compile *)) |
|
- | 101 | { |
|
- | 102 | struct brw_compile p; |
|
- | 103 | ||
- | 104 | brw_compile_init(&p, sna->kgem.gen, |
|
- | 105 | sna_static_stream_map(stream, |
|
- | 106 | 64*sizeof(uint32_t), 64)); |
|
- | 107 | ||
- | 108 | if (!compile(&p)) { |
|
- | 109 | stream->used -= 64*sizeof(uint32_t); |
|
- | 110 | return 0; |
|
- | 111 | } |
|
- | 112 | ||
- | 113 | assert(p.nr_insn*sizeof(struct brw_instruction) <= 64*sizeof(uint32_t)); |
|
- | 114 | ||
- | 115 | stream->used -= 64*sizeof(uint32_t) - p.nr_insn*sizeof(struct brw_instruction); |
|
- | 116 | return sna_static_stream_offsetof(stream, p.store); |
|
- | 117 | } |
|
94 | return bo; |
118 | |
95 | } |
119 | |
96 | unsigned |
120 | unsigned |
97 | sna_static_stream_compile_wm(struct sna *sna, |
121 | sna_static_stream_compile_wm(struct sna *sna, |
98 | struct sna_static_stream *stream, |
122 | struct sna_static_stream *stream, |