|
|
@ -1562,8 +1562,8 @@ void vrend_set_framebuffer_state(struct vrend_context *ctx, |
|
|
|
* an FBO already so don't need to invert rendering? |
|
|
|
* an FBO already so don't need to invert rendering? |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void vrend_set_viewport_states(struct vrend_context *ctx, |
|
|
|
void vrend_set_viewport_states(struct vrend_context *ctx, |
|
|
|
int start_slot, |
|
|
|
uint32_t start_slot, |
|
|
|
int num_viewports, |
|
|
|
uint32_t num_viewports, |
|
|
|
const struct pipe_viewport_state *state) |
|
|
|
const struct pipe_viewport_state *state) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/* convert back to glViewport */ |
|
|
|
/* convert back to glViewport */ |
|
|
@ -1574,6 +1574,12 @@ void vrend_set_viewport_states(struct vrend_context *ctx, |
|
|
|
GLfloat abs_s1 = fabsf(state->scale[1]); |
|
|
|
GLfloat abs_s1 = fabsf(state->scale[1]); |
|
|
|
int i, idx; |
|
|
|
int i, idx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (num_viewports > PIPE_MAX_VIEWPORTS || |
|
|
|
|
|
|
|
start_slot > (PIPE_MAX_VIEWPORTS - num_viewports)) { |
|
|
|
|
|
|
|
report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_CMD_BUFFER, num_viewports); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < num_viewports; i++) { |
|
|
|
for (i = 0; i < num_viewports; i++) { |
|
|
|
idx = start_slot + i; |
|
|
|
idx = start_slot + i; |
|
|
|
|
|
|
|
|
|
|
|