[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Proposal: Generate INVALID_VALUE if value >= MAX_TEXTURE_IMAGE_UNITS on uniform1f(v) for samplers
- To: public webgl <firstname.lastname@example.org>
- Subject: [Public WebGL] Proposal: Generate INVALID_VALUE if value >= MAX_TEXTURE_IMAGE_UNITS on uniform1f(v) for samplers
- From: Gregg Tavares (勤) <email@example.com>
- Date: Tue, 1 May 2012 15:13:42 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record; bh=ufPpDGsblNNgkawbuGR/0gp36vXvX/IAm/u8FSeUnjE=; b=KdT5Qr4el/TvjzT3TOblsDEMwMoXAW1RdkikhgLfK5+Futd2x7lehYM1GCvlVif4VQ TOXxJxRzihjZmyObCUo34nZVy7a3JbSYxr3/HPKVP9u9kKGgExP3C3XLLPwAVfgrXAif KnYtYd4u/DayfnsTRuK7E2MVI5wDXvRGCuZcZkNnzfQsln+DsIhUqXZxmp23a7Erupzl 1LkrVwBy+CGN8d13yVXuAcYvyt7JboVQOLHZ4OEJ6GFY/lp3kWPLJcksgZ0+2iM2AKOn pgeuuvjyyobhC6OI25vxKHLEuqVX7VooR8dheV6bxGZAx3l4VP9v24gMBz77SDElI88k Cdkw==
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- Sender: firstname.lastname@example.org
A developer ran into a bug today where their app was working on Linux but not Mac and Windows.
The issue was they were calling
when they should have been calling
You could say this is their fault for writing bad code but the thing is there are no errors for this condition defined by OpenGL ES or WebGL AFAIK.
It just happens that on Linux calling gl.uniform1f(someSamplerLocation, 33984) uses texture unit 0 and on Mac and Windows it does something else.
Given that uniforms are program specific and given that at runtime we know whether or not a particular location is a sampler, should we generate an INVALID_VALUE
if the value set for a sampler uniform is greater than or MAX_TEXTURE_IMAGE_UNITS?