• Home
  • Raw
  • Download

Lines Matching refs:stwfb

81    struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);  in stw_st_framebuffer_validate_locked()  local
86 if (stwfb->texture_width != width || stwfb->texture_height != height) { in stw_st_framebuffer_validate_locked()
88 pipe_resource_reference(&stwfb->msaa_textures[i], NULL); in stw_st_framebuffer_validate_locked()
89 pipe_resource_reference(&stwfb->textures[i], NULL); in stw_st_framebuffer_validate_locked()
106 if (stwfb->textures[i] || !(mask & (1 << i))) { in stw_st_framebuffer_validate_locked()
108 if (stwfb->textures[i]) in stw_st_framebuffer_validate_locked()
116 format = stwfb->stvis.color_format; in stw_st_framebuffer_validate_locked()
122 format = stwfb->stvis.depth_stencil_format; in stw_st_framebuffer_validate_locked()
133 if (bind != PIPE_BIND_DEPTH_STENCIL && stwfb->stvis.samples > 1) { in stw_st_framebuffer_validate_locked()
136 stwfb->stvis.samples; in stw_st_framebuffer_validate_locked()
138 stwfb->msaa_textures[i] = in stw_st_framebuffer_validate_locked()
144 stwfb->textures[i] = in stw_st_framebuffer_validate_locked()
149 stwfb->texture_width = width; in stw_st_framebuffer_validate_locked()
150 stwfb->texture_height = height; in stw_st_framebuffer_validate_locked()
151 stwfb->texture_mask = mask; in stw_st_framebuffer_validate_locked()
161 struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); in stw_st_framebuffer_validate() local
168 stw_framebuffer_lock(stwfb->fb); in stw_st_framebuffer_validate()
170 if (stwfb->fb->must_resize || (statt_mask & ~stwfb->texture_mask)) { in stw_st_framebuffer_validate()
171 stw_st_framebuffer_validate_locked(&stwfb->base, in stw_st_framebuffer_validate()
172 stwfb->fb->width, stwfb->fb->height, statt_mask); in stw_st_framebuffer_validate()
173 stwfb->fb->must_resize = FALSE; in stw_st_framebuffer_validate()
177 stwfb->stvis.samples > 1 ? stwfb->msaa_textures in stw_st_framebuffer_validate()
178 : stwfb->textures; in stw_st_framebuffer_validate()
183 stw_framebuffer_unlock(stwfb->fb); in stw_st_framebuffer_validate()
242 struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); in stw_st_framebuffer_present_locked() local
245 assert(stw_own_mutex(&stwfb->fb->mutex)); in stw_st_framebuffer_present_locked()
247 if (stwfb->stvis.samples > 1) { in stw_st_framebuffer_present_locked()
249 stwfb->textures[statt], in stw_st_framebuffer_present_locked()
250 stwfb->msaa_textures[statt]); in stw_st_framebuffer_present_locked()
253 resource = stwfb->textures[statt]; in stw_st_framebuffer_present_locked()
255 stw_framebuffer_present_locked(hdc, stwfb->fb, resource); in stw_st_framebuffer_present_locked()
258 stw_framebuffer_unlock(stwfb->fb); in stw_st_framebuffer_present_locked()
261 assert(!stw_own_mutex(&stwfb->fb->mutex)); in stw_st_framebuffer_present_locked()
271 struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); in stw_st_framebuffer_flush_front() local
275 stw_framebuffer_lock(stwfb->fb); in stw_st_framebuffer_flush_front()
280 hDC = GetDC(stwfb->fb->hWnd); in stw_st_framebuffer_flush_front()
282 ret = stw_st_framebuffer_present_locked(hDC, stctx, &stwfb->base, statt); in stw_st_framebuffer_flush_front()
284 ReleaseDC(stwfb->fb->hWnd, hDC); in stw_st_framebuffer_flush_front()
295 struct stw_st_framebuffer *stwfb; in stw_st_create_framebuffer() local
297 stwfb = CALLOC_STRUCT(stw_st_framebuffer); in stw_st_create_framebuffer()
298 if (!stwfb) in stw_st_create_framebuffer()
301 stwfb->fb = fb; in stw_st_create_framebuffer()
302 stwfb->stvis = fb->pfi->stvis; in stw_st_create_framebuffer()
303 stwfb->base.ID = p_atomic_inc_return(&stwfb_ID); in stw_st_create_framebuffer()
304 stwfb->base.state_manager = stw_dev->smapi; in stw_st_create_framebuffer()
306 stwfb->base.visual = &stwfb->stvis; in stw_st_create_framebuffer()
307 p_atomic_set(&stwfb->base.stamp, 1); in stw_st_create_framebuffer()
308 stwfb->base.flush_front = stw_st_framebuffer_flush_front; in stw_st_create_framebuffer()
309 stwfb->base.validate = stw_st_framebuffer_validate; in stw_st_create_framebuffer()
311 return &stwfb->base; in stw_st_create_framebuffer()
320 struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); in stw_st_destroy_framebuffer_locked() local
324 pipe_resource_reference(&stwfb->msaa_textures[i], NULL); in stw_st_destroy_framebuffer_locked()
325 pipe_resource_reference(&stwfb->textures[i], NULL); in stw_st_destroy_framebuffer_locked()
331 stw_dev->stapi->destroy_drawable(stw_dev->stapi, &stwfb->base); in stw_st_destroy_framebuffer_locked()
333 FREE(stwfb); in stw_st_destroy_framebuffer_locked()
343 struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); in stw_st_swap_framebuffer_locked() local
349 ptex = stwfb->textures[front]; in stw_st_swap_framebuffer_locked()
350 stwfb->textures[front] = stwfb->textures[back]; in stw_st_swap_framebuffer_locked()
351 stwfb->textures[back] = ptex; in stw_st_swap_framebuffer_locked()
354 ptex = stwfb->msaa_textures[front]; in stw_st_swap_framebuffer_locked()
355 stwfb->msaa_textures[front] = stwfb->msaa_textures[back]; in stw_st_swap_framebuffer_locked()
356 stwfb->msaa_textures[back] = ptex; in stw_st_swap_framebuffer_locked()
363 mask = stwfb->texture_mask & ~(front | back); in stw_st_swap_framebuffer_locked()
364 if (stwfb->texture_mask & front) in stw_st_swap_framebuffer_locked()
366 if (stwfb->texture_mask & back) in stw_st_swap_framebuffer_locked()
368 stwfb->texture_mask = mask; in stw_st_swap_framebuffer_locked()
371 return stw_st_framebuffer_present_locked(hdc, stctx, &stwfb->base, front); in stw_st_swap_framebuffer_locked()
382 struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); in stw_get_framebuffer_resource() local
383 return stwfb->textures[att]; in stw_get_framebuffer_resource()